Skip to content
Coursey CreativeSign in

POST /mechanic/booking

/api/store/[slug]/mechanic/booking

Sends a drop-off request. The time is optional: a slot from the slots endpoint, a preferred time in the customer's words, or neither. Nothing is held or promised. The request opens a job on the shop's board at Off Site - Need To Schedule, and the shop confirms it (setting the appointment), suggests another time, or declines it (cancelling that job). The customer is emailed that it is a request, not a booking, and the shop is emailed about it.

Public - no auth neededRate limit 5 per 15 minutes per client IP + slugHow authentication works

Path parameters

slugstringrequired

Business (store) slug

Body parameters

slot_startstringoptional

ISO 8601 start of a slot from the slots endpoint (any UTC offset). Omit or send null for a request with no time.

preferred_timestringoptional

Up to 200 characters: when the customer would like to come, in their words. Shown to the shop, never promised.

customer_namestringrequired

1-120 characters.

customer_emailstringrequired

Valid email address; the confirmation goes here.

customer_phonestringoptional

Up to 32 characters with at least 3 digits.

vehicle_yearnumberoptional

Four-digit year, 1900-2100 (a numeric string is accepted).

vehicle_makestringoptional

Up to 60 characters.

vehicle_modelstringoptional

Up to 60 characters.

vehicle_platestringoptional

Up to 16 characters.

concernstringrequired

What the car needs, 1-2000 characters.

Responses

201

The resource was created.

400

A field failed validation. The response names the fields that failed, not just the first.

404

No such store, or no such record inside it.

409

The request conflicts with something that already exists.

429

Too many requests. Back off and retry after the window in the response.

500

Something failed on our side. The response carries no detail; retry is safe on a GET.

What comes back

201 with { success: true, data: { booking_id, status: 'requested', slot_start, slot_end, slot_label, preferred_time } }; the slot fields are null when no time was picked. The same request (same email and concern) sent again within 30 minutes answers with the first request's booking_id. Errors: { error } with 400 (invalid JSON or body; also carries field), 404 (store not found, or code: 'booking_off' when the shop is not taking bookings online), 409 (code: 'slot_unavailable' when the time is not one the shop offers now, or 'slot_full' when it filled in the meantime: fetch the slots again), 429 ({ error, retryAfter } plus a Retry-After header when rate limited, or code: 'too_many_requests' when the email already has 3 requests waiting), 500. CORS open, OPTIONS supported.