Skip to Content
devhelp shopDocs

Storefront — Bookings & Enquiries

Check bookable service availability and submit enquiries.

Send a booking enquiry

POST
/storefront/v1/enquiries

Stores the enquiry for the merchant to answer. Refused (403) while the store is not live.

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
name*string
phone*string
serviceText*string
preferredText?|
Defaultnull
note?|
Defaultnull

Response Body

OK

application/json
  1. response
received*unknown
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/enquiries' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "phone": "string",  "serviceText": "string"}'
Example Response
{  "received": true}

Free starts for a visit

GET
/storefront/v1/bookings/availability

Only people offered online. Never cached: the answer changes with every booking.

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Query Parameters

variantIds*array<string>
staffIds?array<string|unknown>
from*string
to*string
excludeLineBookingId?string

Response Body

OK

application/json
  1. response
timezone*string
days*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/bookings/availability?variantIds=string&from=string&to=string'
Example Response
{  "timezone": "string",  "days": [    {      "date": "string",      "starts": [        {          "startsAt": "2019-08-24T14:15:22Z",          "staff": [            [              {                "id": "string",                "name": "string"              }            ]          ]        }      ]    }  ]}
GET
/storefront/v1/bookings/setup

Hours, special dates, the people and services offered online. Setup only: cacheable.

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
available*boolean
timezone*string
windowDays*number
cancelWindowHours*number
customerCanReschedule*boolean
customerCanCancel*boolean
policyText*string
hours*array<>
specialDates*array<>
staff*array<>
services*array<>
weekendDays*array<number>
sessions*array<>
packages*array<>
consentText*string
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/bookings/setup'
Example Response
{  "available": true,  "timezone": "string",  "windowDays": 0,  "cancelWindowHours": 0,  "customerCanReschedule": true,  "customerCanCancel": true,  "policyText": "string",  "hours": [    {      "weekday": 0,      "opens": "string",      "closes": "string"    }  ],  "specialDates": [    {      "startsOn": "string",      "endsOn": "string",      "closed": true,      "opens": "string",      "closes": "string",      "label": "string"    }  ],  "staff": [    {      "id": "string",      "name": "string",      "title": "string",      "colourIndex": 0,      "photoUrl": "string",      "productIds": [        "string"      ]    }  ],  "services": [    {      "productId": "string",      "staffChoice": "choose",      "variants": [        {          "variantId": "string",          "durationMin": 0        }      ]    }  ],  "weekendDays": [    0  ],  "sessions": [    {      "productId": "string",      "minQuantity": 0,      "maxQuantity": 0,      "asksParticipants": true,      "tickets": [        {          "variantId": "string",          "takesPlace": true,          "weekendPricePaisa": 0,          "minAge": 0,          "maxAge": 0        }      ],      "schedule": [        {          "weekdays": [            0          ],          "startTimes": [            "string"          ],          "durationMin": 0        }      ]    }  ],  "packages": [    {      "productId": "string",      "includedGuests": 0,      "variants": [        {          "variantId": "string",          "durationMin": 0        }      ]    }  ],  "consentText": "string"}
GET
/storefront/v1/bookings/sessions

At most a month of dates. Never cached: places change with every ticket sold.

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Query Parameters

productId*string
from*string
to*string

Response Body

OK

application/json
  1. response
timezone*string
days*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/bookings/sessions?productId=string&from=string&to=string'
Example Response
{  "timezone": "string",  "days": [    {      "date": "string",      "weekend": true,      "sessions": [        {          "startsAt": "2019-08-24T14:15:22Z",          "endsAt": "2019-08-24T14:15:22Z",          "left": 0,          "state": "open"        }      ]    }  ]}

On this page