Skip to content
Hydda One API
Esc
↑↓navigate↵open⌘Jpreview

Get a booking request

Reads one request this Application made, to follow its status while an operator approves or rejects it. A booking the Application did not request answers 404.

GET/v1/booking/booking-requests/{bookingId}
Authorization
AuthorizationOAuth2 access token · headerrequired

An access token for an Application, from the client_credentials grant. An integration of your own uses the same grant. A connector from Hydda gets its token from the installation-token grant instead. Send it as Authorization: Bearer <token>.

Path parameters
bookingIdstring<uuid>required

The bookingId the Application sent with the request.

Responses
200

The request and where it stands.

bookingIdstring<uuid>required

The id the Application gave the request.

bookableResourceIdstring<uuid>required

The resource requested.

statusstringrequired

Where the booking stands. pending_approval waits for an operator. confirmed holds the time. cancelled, rejected and expired have released it.

Allowed:pending_approvalconfirmedcancelledrejectedexpired
startsAtstring<date-time>required

When the booking starts, as an ISO 8601 timestamp in UTC.

endsAtstring<date-time>required

When the booking ends, as an ISO 8601 timestamp in UTC.

amountobjectrequired

An amount of money in one currency, never negative.

Show properties
minorUnitsintegerrequired

The amount in minor units of the currency, such as öre for SEK. 0 means free.

min 0 · max 9007199254740991
currencystringrequired

An ISO 4217 currency code, for example SEK.

Allowed:SEKNOKDKKEURUSDGBP
discountobject

The discount on the room's price. The booking's amount is already net of it, so the price before it is amount plus amountOff.

Show properties
bookingDiscountIdstring<uuid>required

The discount the booking took.

namestringrequired

The discount's name when the booking took it.

entryKindstringrequired

percent for a percentage or free, fixed for an amount off or a fixed price.

Allowed:percentfixed
basisPointsinteger

The percentage in basis points, 2000 is 20%. Present exactly when entryKind is percent.

min 1 · max 10000
amountOffobjectrequired

What the discount took off the room's price.

Show properties
minorUnitsintegerrequired

The amount in minor units of the currency, such as öre for SEK. 0 means free.

min 0 · max 9007199254740991
currencystringrequired

An ISO 4217 currency code, for example SEK.

Allowed:SEKNOKDKKEURUSDGBP
viaCodeboolean

True when the booking took the discount through a shared or a personal code, false for an automatic discount.

addOnAmountobject

An amount of money in one currency, never negative.

Show properties
minorUnitsintegerrequired

The amount in minor units of the currency, such as öre for SEK. 0 means free.

min 0 · max 9007199254740991
currencystringrequired

An ISO 4217 currency code, for example SEK.

Allowed:SEKNOKDKKEURUSDGBP
roomLayoutstring

A furniture layout for a room: conference chairs facing the front, u_shape tables in a U, islands round tables with chairs around them.

Allowed:conferenceu_shapeislands
createdAtstring<date-time>required

When the request was made, as an ISO 8601 timestamp in UTC.

400

The request is not valid, or a business rule refused it. code names the rule.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request, when the failure has one. Match on this, not on detail.

Allowed:VALIDATION_FAILED
parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

401

The access token is missing, expired or not valid.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

403

The token does not allow this request.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

404

The resource does not exist, or the token cannot see it.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

Request
curl -X GET 'https://api.hydda.one/v1/booking/booking-requests/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "bookingId": "9a471128-954e-4e64-bde9-e8147015df89",
  "bookableResourceId": "a7680a56-e013-43cc-a54c-cfce58b19ae9",
  "status": "pending_approval",
  "startsAt": "2019-08-24T14:15:22Z",
  "endsAt": "2019-08-24T14:15:22Z",
  "amount": {
    "minorUnits": 0,
    "currency": "SEK"
  },
  "discount": {
    "bookingDiscountId": "d41aebc3-4422-492d-9d9f-a12ed9eb59ea",
    "name": "string",
    "entryKind": "percent",
    "basisPoints": 1,
    "amountOff": {
      "minorUnits": 0,
      "currency": "SEK"
    },
    "viaCode": true
  },
  "addOnAmount": {
    "minorUnits": 0,
    "currency": "SEK"
  },
  "roomLayout": "conference",
  "createdAt": "2019-08-24T14:15:22Z"
}

Was this page helpful?