Creates a booking sheet

POST /api/booking-sheets

Overview

Creates a booking sheet: a named group of products, held at one site, that the other booking-sheet endpoints then report bookings and exceptions against.

You may supply your own id or have one allocated. When id is omitted the next sequential identifier with the PRCP prefix is generated. Either way the sheet's identifier is returned in the Location header of the 201 Created response, and it is the value you pass as {id} to the other booking-sheet endpoints.

The sheet is filed against a site group as well as a site: the site group that contains siteId is used, and created if none exists.

Use this endpoint to:

Endpoint

POST {base_url}/api/booking-sheets

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Request body

FieldTypeRequiredDescription
idstringNoYour own identifier for the new booking sheet, maximum 15 characters. It must be unique and must not contain any of !£$%^&*()_+=[]{};:@~#?.,<>| — either fault returns 400. Omit it and the next free identifier prefixed PRCP is generated.
descriptionstringYesThe sheet's display description. Must not be blank and cannot exceed 255 characters.
siteIdstringYesThe site the booking sheet belongs to. Must not be blank and cannot exceed 15 characters. The sheet is also filed under the site group covering this site, which is created if none exists.
productsarray of stringYesThe IDs of the products that make up the sheet — the resources whose bookings this sheet groups together. At least one is required; an empty array or an omitted field is rejected with One or more Products must be specified. Each product is added to the sheet with a quantity of 0. Product IDs are not checked individually, so an unknown product returns the 400 "A database error occurred" response rather than a specific message.

Sample request

cURL
curl -X POST '{base_url}/api/booking-sheets' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "string",
  "description": "string",
  "siteId": "string",
  "products": [
    "string"
  ]
}'

Errors

StatusMeaningWhen
400Bad requestThe ID supplied contains one or more invalid characters. An ID cannot contain any of the characters !£$%^&*()_+=[]{};:@~#?.,<>|. A database error occurred. Please ensure that the ID supplied is unique.
500Internal server error

This page as markdown · All pages · llms.txt