API reference
Book services
POST
Books one or more services at a free time, confirmed straight away unless the shop confirms bookings itself; payUrl when the services ask for payment when booking.
publishableKeyheader
AuthorizationBearer <pk_live_…>The shop’s publishable key, from Settings, Developers in Cashiar. Safe to use in a browser.
idempotency-key*stringIdempotency-Key?stringAny unique string (8–100 letters, digits, - or _). A retry with the same key gets the first answer instead of placing it twice.
application/json- body
branchId?stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidcustomerName*stringLength
1 <= length <= 120customerPhone*stringdate?stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Format
datestartTime?stringMatch
^([01]\d|2[0-3]):[0-5]\d$place?stringValue in
"shop""visit""online"note?|Length
length <= 500services*array<>Items
1 <= items <= 10payNow?booleanapplication/json- response
number*stringstatus*stringValue in
"new""confirmed"payUrl*string|nullcurl -X POST 'https://api.cashiar.app/v1/storefront/bookings' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"customerName": "string",
"customerPhone": "string",
"services": [
{
"serviceId": "8f8bb40f-b96b-40fe-9064-5031fbe483f9"
}
]
}'Example Response201
{
"number": "string",
"status": "new",
"payUrl": "string"
}