Usta flow
Taking and running jobs with an usta key (role: usta).
GET /jobs → POST /jobs/{id}/accept → POST /jobs/{id}/on-the-way → POST /jobs/{id}/start → (if needed POST /extra-work) → POST /jobs/{id}/completion-code → POST /jobs/{id}/complete → GET /payouts → POST /payouts/{id}/approve
Before jobs arrive
The shop (POST /shop) must exist with at least one category, and the call center must have approved it. When no job can come, GET /jobs is empty and usta_block says why: PENDING_ADMIN_APPROVAL, SERVICE_CATEGORIES_REQUIRED, CATEGORY_DOCUMENTS_REQUIRED … The missing items are listed in GET /shop/onboarding.
1. See the job and accept it
GET /jobs returns the usta's jobs and the open jobs they can take. Before accepting, the address is province-level only. POST /jobs/{id}/accept: first to accept wins. Not interested? POST /jobs/{id}/reject — the job stays open to other ustas.
2. Head out, start with the code
POST /jobs/{id}/on-the-way notifies the customer and issues the start code. The code is only on the customer's screen; the usta reads it at the door and sends it with POST /jobs/{id}/start:
{ "code": "482913" }A wrong code is 400 VISIT_CODE_INVALID.
3. Extra work (if needed)
If more work turns up on site, put it to the customer line by line with POST /extra-work. If they reject it: a lower counter-offer (/counter-offer, at most twice) or an appeal to the team (/escalate).
4. Finish with the code
POST /jobs/{id}/completion-code sends the completion code to the customer by SMS and notification. POST /jobs/{id}/complete:
{
"code": "907145",
"note": "Serviced the AC, cleaned the filters, measured the gas pressure.",
"photos": [{ "url": "https://…/store/ug/files/shared/…" }]
}A note of at least 50 characters and 1–5 photos (POST /uploads/photo). The job goes to the customer; their confirmation releases the payment.
5. Payouts
Weekly statements: GET /payouts. POST /payouts/{id}/approve (scope money) approves one; without a valid IBAN you get 409 PAYOUT_DETAILS_REQUIRED — set it with POST /shop.
Discovery-priced jobs
For work priced after inspection, quote with POST /quotes (within the service's price range); when the customer accepts, the amount is written to the booking.