API reference

Book services

POST
/v1/storefront/bookings

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.

Authorization

publishableKey
headerAuthorizationBearer <pk_live_…>

The shop’s publishable key, from Settings, Developers in Cashiar. Safe to use in a browser.

Header Parameters

idempotency-key*string
Idempotency-Key?string

Any unique string (8–100 letters, digits, - or _). A retry with the same key gets the first answer instead of placing it twice.

Request Body

application/json
  1. body
branchId?string
Match^([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)$
Formatuuid
customerName*string
Length1 <= length <= 120
customerPhone*string
date?string
Match^(?:(?:\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])))$
Formatdate
startTime?string
Match^([01]\d|2[0-3]):[0-5]\d$
place?string
Value in"shop""visit""online"
note?|
Lengthlength <= 500
services*array<>
Items1 <= items <= 10
payNow?boolean

Response Body

application/json
  1. response
number*string
status*string
Value in"new""confirmed"
payUrl*string|null
Example Request
curl -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"
}