Customer flow: end to end
Running a job from start to finish with a customer key (role: customer).
GET /catalog → POST /pricing/preview → POST /bookings → POST /payments → (an usta accepts) → GET /bookings/{id} → POST /bookings/{id}/confirm → POST /ratings
1. Pick the service
curl https://api.example.com/partner/v1/catalog -H "Authorization: Bearer ugp_…"Use products[].variants[].id as the booking's variant_id. If the service has questions (ug_service_questions), send the answers in answers; the options of catalog questions (brand/model) come from GET /reference-catalogs/{key}.
2. Show the price
curl -X POST https://api.example.com/partner/v1/pricing/preview \
-H "Authorization: Bearer ugp_…" -H "Content-Type: application/json" \
-d '{"items":[{"variant_id":"variant_…"}],"city":"İstanbul","district":"Kadıköy"}'Prices vary by area; total is what the booking will charge.
3. Pick a slot
GET /appointment-slots?date=2026-10-06 → slots[].slot.
4. Open the booking
curl -X POST https://api.example.com/partner/v1/bookings \
-H "Authorization: Bearer ugp_…" -H "Content-Type: application/json" \
-d '{
"items": [{ "variant_id": "variant_…" }],
"appointment_date": "2026-10-06",
"appointment_slot": "09:00-11:00",
"city": "İstanbul",
"district": "Kadıköy",
"address_summary": "Moda Cad. No: 12 D: 3"
}'You get request (and for a multi-trade basket, requests + group_id). If you collect contract acceptance, show the GET /legal texts and add legal_acceptance.
5. Open the payment
POST /payments for each leg. Details: Bank transfer and Card. Once held, the job is dispatched to ustas.
6. Follow the job
Poll GET /bookings/{id} or GET /notifications/sync. When the usta heads out, metadata.on_the_way_at is set and the start code is shown to the customer; the usta types it in to start. When the usta finishes, the completion code reaches the customer by SMS and notification.
7. Confirm and rate
Once the job is completed the customer confirms: POST /bookings/{id}/confirm (scope money) releases the payment to the usta. Then POST /ratings.
Cancellation and problems
POST /bookings/{id}/canceldecides by stage; no money moves on cancel, the team executes the refund request.- For a problem after the job started:
POST /payments/{id}/dispute. - General support:
POST /tickets.