Create Booking
Create a pending draft booking for an existing customer with products and optional custom lines. Checks stock availability. Nothing is sent to the customer and nothing is charged. Confirm it afterwards with confirm_booking. Pass idempotency_key so a retry cannot create a duplicate.
App connections need the booking:write scope.
curl -X POST "https://dash.lockii.app/api/v1/booking" \
-H "x-api-key: $LOCKII_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "string",
"location_id": "string",
"start_hire_date": 0,
"end_hire_date": 0
}'Authorization
x-api-keystringheaderAPI key from Settings → Integrations → API.
AuthorizationstringheaderThe same API key, or an OAuth access token, sent as Authorization: Bearer.
api_keystringqueryAPI key query parameter.
Body
customer_idstringrequiredExisting customer id. Use search_customers or create_customer first.
location_idstringrequiredPickup location id
start_hire_dateintegerrequiredPickup time in Unix milliseconds
end_hire_dateintegerrequiredReturn time in Unix milliseconds
itemsobject[]Products to hire
Default:[]custom_linesobject[]Custom charges or discounts, e.g. a delivery fee
Default:[]idempotency_keystringAny unique string for this request. Retrying with the same key returns the booking it already created instead of making a second one.
Response
JSON result for this operation.
{}