service89 ops

API de Service

Service marketplace — bookings, providers, service types, and scheduling.

Consultas

CONSULTA

adminServiceOrder

#

The service job behind an order, for the admin console. Addressed by **order** id rather than request id because that is what the console has: service jobs are listed through adminListOrders, which returns OrderEntity rows, and nothing exposed the way back to the request they were created from. requests.order_id has been written by selectOffer since orders existed and find_by_order_id has been on the repo since the cross-vertical cancellation flow needed it — only the read was missing. Returns null for an order with no service request behind it: an order of another kind, or one whose request was hard-deleted. That is a legitimate answer for a console that lists orders by kind and can be pointed at any id, not an error worth raising. Separate from serviceRequest(id:), which is scoped to the customer who raised the request and the providers bidding on it, and redacts the address for every provider but the one hired. An admin is neither of those parties, so that query answers NotFound for them.

Argumentos

  • orderId!
Devuelve
CONSULTA

adminServiceQuestions

#

Every question on a service, for the console's question builder. Named adminServiceQuestions, not serviceQuestions, because BrowseQuery already owns that name. Two resolvers declaring the same field on a MergedObject do not conflict loudly — one simply wins the merge, and the browse one did, so this query has been unreachable since it was written and the console had no way to read a *disabled* question or an isEnabled flag at all. The difference is not only the flag. BrowseQuestionResponse is the customer's view of a question; this returns the whole row, which is what an editor needs.

Argumentos

  • serviceId!
  • includeDisabledBoolean
Devuelve[!]!
CONSULTA

availableRequests

#

Open leads I can bid on. serviceId narrows the board to one of my services. Omit it for the union across everything I offer — the provider home feed wants that, and used to fake it with one query per service stitched together on the client, which skewed paging whenever one of them failed. search matches words in a lead's title or summary; urgency keeps one urgency. Each lead's isNew says whether I have opened it yet.

Argumentos

  • serviceId
  • searchString
  • urgency
  • pagination
Devuelve!
CONSULTA

browseCategories

#

Browse active service categories.

Argumentos

  • parentId
Devuelve[!]!
CONSULTA

browseServices

#

Browse active services in a category.

Argumentos

  • categoryId!
Devuelve[!]!
CONSULTA

creditPackages

#

Packages a provider can buy right now.

Devuelve[!]!
CONSULTA

myCreditBalance

#

How many credits I have left.

Devuelve!
CONSULTA

myCreditTransactions

#

My credit history, newest first.

Argumentos

  • limitInt!

    Por defecto

    20
  • offsetInt!

    Por defecto

    0
Devuelve[!]!
CONSULTA

myJobCount

#

How many jobs I have — offers a customer accepted — whose request is in one of requestStatuses, or in any status when it is omitted or empty. One COUNT. The provider app badges its Orders tab with the jobs under way rather than paging through every accepted offer it ever made.

Argumentos

  • requestStatuses[!]
DevuelveInt!
CONSULTA

myOfferForRequest

#

My own response to one request — a quote, a call request, or a request for more information — or null if I have not responded. A provider's job screen needs their own offer beside the request: its status picks the primary action, and startedAt is what separates a booked job from one under way. Nothing addressed it by request, so the client paged myOffers looking for a match and stopped after three pages — past which a busy provider's own bid simply disappeared.

Argumentos

  • requestId!
Devuelve
CONSULTA

myOffers

#

List my submitted offers. Takes pagination and returns page_info like every other list on the platform. It used to take bare limit/offset and return a plain array, which left the client with no total and no way to know whether another page existed. serviceId, search and urgency narrow it by the request each offer was made on.

Argumentos

  • status
  • serviceId
  • searchString
  • urgency
  • pagination
Devuelve!
CONSULTA

myProviderDayCounts

Obsoleta#

Jobs per day for the signed-in provider, for the home week strip. Days with no jobs are absent rather than returned as zero — the client knows which dates it asked for.

Motivo de la obsolescencia: Legacy scheduled-jobs counters; current provider apps use the request board. Retain until installed app release floors permit retirement; BET-222

Argumentos

  • from!
  • to!
Devuelve[!]!
CONSULTA

myProviderEarningsChart

#

The signed-in provider's earnings chart.

Argumentos

  • timeframe!
Devuelve!
CONSULTA

myProviderProfile

#

Get my provider profile.

Devuelve
CONSULTA

myProviderServices

#

The services I offer, including any I have paused.

Devuelve[!]!
CONSULTA

myServiceRequestCount

#

How many of my service requests are in one of statuses, or in any status when it is omitted or empty. One COUNT over the caller's own rows. The customer app badges its Booking tab with it rather than paging myServiceRequests once per status to read the totals.

Argumentos

  • statuses[!]
DevuelveInt!
CONSULTA

myServiceRequests

#

List my service requests.

Argumentos

  • status
  • pagination
Devuelve!
CONSULTA

mySkippedRequests

#

Leads I dismissed with skipRequest, newest dismissal first. availableRequests filters these out, so the Skipped tab had no source at all and could only show what the current session happened to remember. unskipRequest puts one back on the board.

Argumentos

  • serviceId
  • searchString
  • urgency
  • pagination
Devuelve!
CONSULTA

newLeadCount

#

How many leads on my board I have not opened yet — the "New" count on the Orders tab. Zero while my provider profile is not active.

DevuelveInt!
CONSULTA

pendingServiceProviders

#

Providers whose application is waiting on KYC (PENDING_KYC) or its review (KYC_IN_REVIEW). Admin-tier sessions only.

Argumentos

  • pagination
Devuelve!
CONSULTA

predefinedInfoQuestions

#

Questions a provider can ask about jobs for this service, so the app can render the checklist rather than a blank box.

Argumentos

  • serviceId!
Devuelve[!]!
CONSULTA

requestInfoRequests

#

Every question asked about one request, oldest first. Readable by the customer who raised the request and by any provider who has responded to it. The provider's ask screen used to keep a session-local list that emptied on every reopen; the customer had no list at all.

Argumentos

  • requestId!
Devuelve[!]!
CONSULTA

requestOffers

#

List offers for a service request (customer only). Bids on a request, ordered by sort. Defaults to RECOMMENDED, which uses the same scorer Quick Match uses — so the list the customer sees and the choice made on their behalf cannot disagree.

Argumentos

  • requestId!
  • sort
Devuelve[!]!
CONSULTA

rootServiceCategories

#

List root-level service categories (no parent).

Argumentos

  • includeInactiveBoolean
  • pagination
Devuelve!
CONSULTA

service

#

Get a service by ID.

Argumentos

  • id!
Devuelve
CONSULTA

serviceCatalogue

#

The workspace's root service categories, each with its services, in one read. Categories by position then name, at most 500. includeInactive (default false) also returns inactive categories and every service that is not active (inactive and archived), matching rootServiceCategories / servicesByCategory.

Argumentos

  • includeInactiveBoolean!

    Por defecto

    false
Devuelve[!]!
CONSULTA

serviceCategory

#

Get a service category by ID.

Argumentos

  • id!
Devuelve
CONSULTA

serviceCreditPackages

#

Every package, including retired ones. Admin view.

Devuelve[!]!
CONSULTA

serviceCreditSettings

#

This workspace's credit policy. Returns the defaults when none has been configured.

Devuelve!
CONSULTA

servicePriceAdjustments

#

Every extended-fee request on a job, newest first. Includes the refused and withdrawn ones on purpose: they are the record of what was asked for, and a customer looking at a job they argued about should be able to see the argument. Readable by the job's customer and by the provider who holds it.

Argumentos

  • requestId!
Devuelve[!]!
CONSULTA

serviceProvider

#

Get a service provider by ID. Admin-tier sessions read any provider in the workspace. Other callers read their own provider profile or an ACTIVE provider (the profile a customer sees on a bid); anything else is null.

Argumentos

  • id!
Devuelve
CONSULTA

serviceProviders

#

List service providers with pagination and filters. Admin-tier sessions only (FORBIDDEN otherwise). status keeps providers in any of the listed statuses; omitted or empty, every status. A single value is accepted too (GraphQL list input coercion), which is what older clients send.

Argumentos

  • status[!]
  • searchString
  • pagination
Devuelve!
CONSULTA

serviceProvidersNear

#

Providers who offer this service and can reach this location, nearest first.

Argumentos

  • serviceId!
  • latitudeFloat!
  • longitudeFloat!
  • limitInt
Devuelve[!]!
CONSULTA

serviceQuestion

#

Get a service question by ID.

Argumentos

  • id!
Devuelve
CONSULTA

serviceQuestions

#

Get questions for a service (for request form).

Argumentos

  • serviceId!
Devuelve[!]!
CONSULTA

serviceRequest

#

One service request, by id. Readable by the customer who raised it and by a provider who has responded to it or can still bid on it; the address stays redacted for every provider but the one the customer hired. Both apps needed this and neither had it: the customer's detail screen was paging through myServiceRequests looking for one id, and the provider's job detail could not be rendered at all once a job left the open lead board.

Argumentos

  • id!
Devuelve!
CONSULTA

servicesByCategory

#

List services by category with pagination. Archived rows are included by default for existing callers; catalog managers may exclude them.

Argumentos

  • categoryId!
  • includeInactiveBoolean
  • includeArchivedBoolean
  • pagination
Devuelve!
CONSULTA

serviceStats

#

Headline numbers for a service's detail screen.

Argumentos

  • serviceId!
Devuelve!

Mutaciones

MUTACIÓN

approveServiceProvider

#

Approve a service provider (set status to Active).

Argumentos

  • input!
Devuelve!
MUTACIÓN

askForInformation

#

Ask the customer for what you need before quoting.

Argumentos

  • input!
Devuelve[!]!
MUTACIÓN

cancelServiceFee

#

Take back a fee request the customer has not answered yet.

Argumentos

  • adjustmentId!
Devuelve!
MUTACIÓN

cancelServiceRequest

#

Cancel a service request.

Argumentos

  • requestId!
Devuelve!
MUTACIÓN

confirmCompletion

#

Customer confirms completion.

Argumentos

  • requestId!
Devuelve!
MUTACIÓN

confirmServiceCreditPurchase

#

Finish a purchase that needed 3DS. Safe to call more than once.

Argumentos

  • purchaseId!
Devuelve!
MUTACIÓN

confirmServicePayment3ds

#

Finish a card payment the customer had to authenticate (3DS). payServiceRequest hands back a client secret when the bank wants a challenge and leaves the job awaiting payment. This is what the client calls once the challenge is done — without it the customer authenticated and the booking stayed unpaid for ever. Safe to call twice: a payment already captured returns the job as it stands rather than charging again.

Argumentos

  • input!
Devuelve!
MUTACIÓN

createPushProvider

#

Create a push provider (FCM). Platform-owned providers require a platform admin; tenant-owned providers are scoped to the caller's tenant.

Argumentos

  • input
  • details
Devuelve!
MUTACIÓN

createService

#

Create a new service.

Argumentos

  • input!
Devuelve!
MUTACIÓN

createServiceCategory

#

Create a new service category.

Argumentos

  • input!
Devuelve!
MUTACIÓN

createServiceCreditPackage

#

Argumentos

  • input!
Devuelve!
MUTACIÓN

createServiceQuestion

#

Create a new service question.

Argumentos

  • input!
Devuelve!
MUTACIÓN

createServiceRequest

#

Create a new service request.

Argumentos

  • input!
Devuelve!
MUTACIÓN

decideServiceFee

#

The customer's answer. Approving is the only thing that moves a job's total after the customer has been shown it, so it is deliberately a separate call from reading the request — and it is idempotent: the second answer is refused rather than applied.

Argumentos

  • adjustmentId!
  • approvedBoolean!
Devuelve!
MUTACIÓN

deletePushProvider

#

Delete a push provider.

Argumentos

  • idString!
DevuelveBoolean!
MUTACIÓN

deleteService

#

Delete a service (soft delete).

Argumentos

  • id!
DevuelveBoolean!
MUTACIÓN

deleteServiceCategory

#

Delete a service category (soft delete).

Argumentos

  • id!
DevuelveBoolean!
MUTACIÓN

deleteServiceCreditPackage

#

Retire a package. Past purchases keep referencing it.

Argumentos

  • id!
DevuelveBoolean!
MUTACIÓN

deleteServiceQuestion

#

Delete a service question.

Argumentos

  • id!
DevuelveBoolean!
MUTACIÓN

generateServiceQuestionTemplate

#

Ask the tenant's default LLM for a starter set of intake questions for a new service category. The admin reviews, edits, and accepts; this mutation does NOT persist the questions. Admin-only. Requires the tenant to have serviceQuestionGenEnabled turned on under Settings → AI Features and at least one configured AI provider with a remaining monthly budget.

Argumentos

  • input!
Devuelve!
MUTACIÓN

markRequestSeen

#

I opened this lead: it stops counting as "New" on my Orders tab. Idempotent.

Argumentos

  • requestId!
DevuelveBoolean!
MUTACIÓN

markServiceComplete

#

Provider marks a service as complete.

Argumentos

  • requestId!
  • completionNotesString
Devuelve!
MUTACIÓN

pauseMyProviderLeads

#

Take a break from new jobs until until, at most 90 days ahead. Until then no new-job pushes, an empty lead board, and no place among the providers a customer is shown. Jobs already won, open offers and chats carry on. Calling it while paused moves the end.

Argumentos

  • until!
Devuelve!
MUTACIÓN

payServiceRequest

#

Pay for an accepted job.

Argumentos

  • input!
Devuelve!
MUTACIÓN

proposeServiceFee

#

Ask the customer to agree to an extended fee on a job in progress. One at a time per job: a second request while the first is unanswered is refused, because the customer would otherwise be agreeing to one of two live figures.

Argumentos

  • input!
Devuelve!
MUTACIÓN

purchaseServiceCreditPackage

#

Buy a credit package.

Argumentos

  • input!
Devuelve!
MUTACIÓN

raiseDispute

#

Report a problem with a job: its customer or the provider doing it, once an offer is accepted — while it is under way or after it is done. Files a support ticket on the job's order, filed as the caller, and leaves the job's status as it is. Returns the request unchanged.

Argumentos

  • requestId!
  • reasonString!
Devuelve!
MUTACIÓN

recordServiceCashPayment

#

Provider confirms cash changed hands. Cash-only — card and wallet settle through the PSP.

Argumentos

  • requestId!
Devuelve!
MUTACIÓN

registerAsProvider

#

Register as a service provider.

Argumentos

  • input
  • details
Devuelve!
MUTACIÓN

rejectServiceProvider

#

Reject a provider application that has not been approved into work (PENDING_KYC, KYC_IN_REVIEW or APPROVED): the provider becomes DEACTIVATED with rejectionReason set. reason is required.

Argumentos

  • input!
Devuelve!
MUTACIÓN

reorderServiceQuestions

#

Reorder service questions.

Argumentos

  • input!
DevuelveBoolean!
MUTACIÓN

respondToInformationRequest

#

Answer one of a provider's questions.

Argumentos

  • infoRequestId!
  • responseString!
Devuelve!
MUTACIÓN

resumeMyProviderLeads

#

End a break from new jobs now.

Devuelve!
MUTACIÓN

selectOffer

#

Select an offer for a service request. Select an offer for a service request. couponCode is optional and forgiving: a code that is invalid, expired, not applicable or under its minimum is ignored and the booking goes through at full price. Refusing the whole selection over a coupon would strand a customer who has already chosen and a provider who has already paid a credit to be chosen.

Argumentos

  • offerId!
  • couponCodeString
Devuelve!
MUTACIÓN

setDefaultPushProvider

#

Set a push provider as the default within its owner scope.

Argumentos

  • idString!
DevuelveBoolean!
MUTACIÓN

setMyProviderServices

#

Replace the services you offer. Services you leave out are paused, not deleted, so their completed-job count and rating survive.

Argumentos

  • input[!]!
Devuelve[!]!
MUTACIÓN

skipRequest

#

"Not Interested" — dismiss a lead so it stops appearing in your list. Idempotent; call unskipRequest to bring it back.

Argumentos

  • requestId!
  • reasonString
DevuelveBoolean!
MUTACIÓN

startServiceJob

#

Provider marks the job as started. Records started_at on the accepted offer, which is what distinguishes a booked job from one under way.

Argumentos

  • requestId!
Devuelve!
MUTACIÓN

submitOffer

#

Submit an offer on a service request.

Argumentos

  • input!
Devuelve!
MUTACIÓN

suspendServiceProvider

#

Suspend a service provider.

Argumentos

  • input!
Devuelve!
MUTACIÓN

testPushProvider

Obsoleta#

Motivo de la obsolescencia: Use testPushProviderResult; BET-205

Argumentos

  • idString!
  • deviceTokenString
Devuelve!
MUTACIÓN

testPushProviderResult

#

Test a push provider. Without device_token it just verifies the credentials authenticate with Google; with a device_token it sends a real test notification to that device for an end-to-end check.

Argumentos

  • idString!
  • deviceTokenString
Devuelve!
MUTACIÓN

unskipRequest

#

Undo a dismissal.

Argumentos

  • requestId!
DevuelveBoolean!
MUTACIÓN

unsuspendServiceProvider

#

Unsuspend a service provider (set status back to Active).

Argumentos

  • providerId!
Devuelve!
MUTACIÓN

updateMyProviderProfile

#

Update provider profile.

Argumentos

  • input
  • details
Devuelve!
MUTACIÓN

updateService

#

Update an existing service.

Argumentos

  • input
  • details
Devuelve!
MUTACIÓN

updateServiceCategory

#

Update an existing service category.

Argumentos

  • input
  • details
Devuelve!
MUTACIÓN

updateServiceCreditPackage

#

Argumentos

  • input!
Devuelve!
MUTACIÓN

updateServiceCreditSettings

#

Change the credit policy. Omitted fields keep their current value.

Argumentos

  • input!
Devuelve!
MUTACIÓN

updateServiceQuestion

#

Update an existing service question.

Argumentos

  • input!
Devuelve!
MUTACIÓN

withdrawOffer

#

Take back a bid the customer has not chosen yet. The credit it cost is **not** refunded: responding shows the customer's name and opens a conversation with them, and a refunded withdrawal would make "bid, talk, withdraw" a free way to work the board. An accepted offer cannot be withdrawn — that is a booked job with an order behind it, and leaving one goes through cancellation.

Argumentos

  • offerId!
Devuelve!