Skip to main content

Creating a booking

These endpoints create a booking, in the order described in the booking flow. The whole sequence is tied together by a cbUuid, the reservation id that the reserve call returns. Pass it in every following call.

Reserve a slot

POST /booking/reserve

Holds a slot so no one else can book it while the customer fills in their details.

Request

FieldRequiredDescription
slotKeyYesThe key of a slot from the slots endpoint
cbUuidNoYour current reservation id, when the customer picks a new time. That hold is released before the new one is made
captchaResponseNoSend null, see Captcha
{
"slotKey": "MTo4Mjc0OjQ2MzY4OjE3ODU0ODEyMDAwMDA6MzA6ZmFsc2U6NTAwLjAwOk5VTEw6"
}

Response 200

{
"cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6",
"cbRef": "mK0k22O3",
"reservationExpiry": "2026-07-23T09:46:24Z",
"services": [
{ "id": 66638, "name": "Påminnelser", "price": 0.0, "priceFrom": false, "duration": 10 }
],
"price": 0.0
}

The cbUuid in the response is the id of the new reservation. Pass it in all following calls. cbRef is the short booking reference shown to the customer. The reservation expires at reservationExpiry, about five minutes after the call.

Errors

StatusWhen
410The slot is already taken or held by someone else. Fetch slots again

Release a reservation

POST /booking/release

Releases a held slot. Call it when the customer abandons the booking or picks a new time, so the slot opens up for others right away. Reservations that are not released expire on their own.

Request

{ "cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6" }

Response is 204 with no body.

Add customer details

POST /booking/customer

Attaches the customer's details to the reservation.

Request

FieldRequiredDescription
cbUuidYesThe reservation to attach the customer to
nameYesFull name
phoneYesMobile number in E.164 format, for example +46701234567
emailSee settingsRequired when web_requireEmail is on
noteNoMessage from the customer, free text
personalNumberSee settingsSwedish personal number, required when web_requirePNo is on
personalNumberTypeWith personalNumberSE_PNO, or INTL_PNO for a foreign number
orgName, orgNoNoCompany name and organization number for company bookings
orgNoTypeWith orgNoSE_ORG
vehicleRegNoSee settingsVehicle registration number, used by workshops
vehicleRegNoTypeWith vehicleRegNoSE_VEHICLE
customFieldsNoAnswers to the account's custom fields, a list of {key, type, label, value}
allowMarketingNoThe customer accepted marketing
bookedSpecificResourceNotrue when the customer picked a specific resource, false when your UI picked one for them
captchaResponseNoSend null, see Captcha
{
"cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6",
"name": "Test Testsson",
"phone": "+46701234567",
"email": "test@example.com",
"note": "",
"customFields": [],
"allowMarketing": false,
"bookedSpecificResource": false
}

Response is 200. The body carries no information.

Which fields your form must collect is controlled by the account's settings preferences and features.

Errors

StatusWhen
404The cbUuid has no active reservation

Get confirmation options

POST /booking/confirmation-options

Call this after the customer details are saved. It tells you how the booking must be confirmed, and triggers the confirmation PIN SMS when the account uses SMS verification.

Request

{ "cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6" }

Response 200

{
"cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6",
"cbRef": "mK0k22O3",
"reservationExpiry": "2026-07-23T09:46:24Z",
"confirmationMethod": "NoPin",
"paymentAmountIncVat": null,
"paymentProviders": [],
"allowDiscountVoucher": false,
"saleItems": [],
"attributes": { "pbk_allowMarketing": false },
"prefs": { "...": "same preference object as in settings, shortened here" }
}
FieldDescription
confirmationMethodNoPin, Pin or Payment, see the booking flow
paymentAmountIncVatAmount to pay online, null when no payment is required
paymentProvidersAvailable payment providers when payment is required, see Payments
allowDiscountVoucherThe customer may enter a discount or gift card code
saleItemsLine items for the payment

Confirm the booking

POST /booking/confirm

Turns the reservation into a real booking. Use this when confirmationMethod is NoPin or Pin. Bookings that require payment are instead completed through the payment endpoints, see Payments.

Request

FieldRequiredDescription
cbUuidYesThe reservation to confirm
pinWith PinThe PIN code from the SMS. Send null when the method is NoPin
captchaResponseNoSend null, see Captcha
{ "cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6", "pin": null }

Response 201

{
"cbUuid": "4674c65b-a64f-43a5-94c7-af3b59053cc6",
"cbRef": "mK0k22O3",
"smsReminderEnabled": true,
"emailConfirmSent": true,
"smsConfirmSent": true,
"paymentStatus": "Unpaid",
"paymentProvider": "None"
}

The booking now exists in the calendar. Cliento sends the confirmation and reminder messages, your client does not need to.

Errors

StatusWhen
410The reservation expired before the call. Reserve a new slot
403The PIN code was wrong, or the request was blocked