Multi-Booking Cart

Sell more than one booking together in a cart

To use this capability add octo/cart to your Octo-Capabilities header.

This capability gives you the ability to book multiple bookings from the same supplier together in a single "cart". In Ventrata we call a "cart" an "order", and that's what it will be referred to in the rest of this document.

Booking Reservation

POST https://api.ventrata.com/octo/bookings

The first step of the booking process

Request Body

Name
Type
Description

orderId

string

The Order ID to add this booking to

{
  "uuid": "ff7ec5b6-d018-415d-a2f0-dc9ad6202d4c",
  "testMode": true,
  "resellerReference": null,
  "supplierReference": "Y2JPAG",
  "status": "ON_HOLD",
  "utcExpiresAt": "2020-06-08T08:02:27Z",
  "utcConfirmedAt": null,
  "productId": "8d7519d2-cac2-4daa-8aab-d9f97265e495",
  "optionId": "23df0f5c-781a-4bee-9dae-2355bdd792c5",
  "cancellable": true,
  "cancellation": null,
  "freesale": false,
  "availability": {
    "id": "2020-06-27T00:00:00+02:00",
    "localDateTimeStart": "2020-06-27T00:00:00+02:00",
    "localDateTimeEnd": "2020-06-28T00:00:00+02:00",
    "allDay": true,
    "openingHours": []
  },
  "contact": {
    "fullName": null,
    "emailAddress": null,
    "phoneNumber": null,
    "locales": [],
    "country": null,
    "notes": null
  },
  "notes": null,
  "deliveryMethods": [
    "VOUCHER",
    "TICKET"
  ],
  "voucher": {
    "redemptionMethod": "DIGITAL",
    "utcRedeemedAt": null,
    "deliveryOptions": []
  },
  "unitItems": [
    {
      "uuid": "319e9367-b88c-490c-83f6-5fd0bc3a9cb8",
      "resellerReference": null,
      "supplierReference": "B1MPE6",
      "unitId": "child",
      "ticket": {
        "redemptionMethod": "DIGITAL",
        "utcRedeemedAt": null,
        "deliveryOptions": []
      }
    },
    {
      "uuid": "065818a2-be0c-4d4e-a71b-1021664cc60b",
      "resellerReference": null,
      "supplierReference": "PPHQNX",
      "unitId": "adult",
      "ticket": {
        "redemptionMethod": "DIGITAL",
        "utcRedeemedAt": null,
        "deliveryOptions": []
      }
    },
    {
      "uuid": "1090129a-db9c-4815-8a99-7bc6f24fd482",
      "resellerReference": null,
      "supplierReference": "M105TS",
      "unitId": "adult",
      "ticket": {
        "redemptionMethod": "DIGITAL",
        "utcRedeemedAt": null,
        "deliveryOptions": []
      }
    }
  ],
  "orderId": "09af0a55-f87a-423e-b27d-f2e38c1c9674",
  "primary": true
}

This capability adds the following fields to the booking response:

  "orderId": "09af0a55-f87a-423e-b27d-f2e38c1c9674",
  "primary": true

When using this capability if you omit the orderId from the original request Ventrata will create a new order (cart) for you behind the scenes and return the orderId in the response. You can then re-use this orderId in any future booking requests and the bookings will all get added to the same order.

Create Order

POST https://api.ventrata.com/octo/orders

Using this endpoint is optional if you prefer to create the order first before creating your first booking.

Request Body

Name
Type
Description

currency

string

The currency you want to use. If you're also using the pricing capability.

expirationMinutes

integer

The expiration time in minutes.

{
  "id": "0effd05e-d61e-47f2-8fc9-512f3144c69d",
  "status": "ON_HOLD",
  "utcExpiresAt": "2020-06-08T08:43:26Z",
  "utcConfirmedAt": null,
  "bookings": [],
  "contact": null
}

The Order object has the following fields:

Field

Description

id

The order ID. Use this for future booking reservation requests.

status

The status of the order. Possible values are:

ON_HOLD This is the first status when the order is created

CONFIRMED Once the order is confirmed

CANCELLED If the order is cancelled

EXPIRED If the order wasn't confirmed in time

utcExpiresAt

The ISO8601 in UTC when the order will expire.

utcConfirmedAt

The ISO8601 in UTC when the order was confirmed.

bookings

An array of booking objects within this order

contact

This is the guest contact information, previously this was on the booking

Retrieve Order

GET https://api.ventrata.com/octo/orders/:id

A convenient method to retrieve an existing order

Path Parameters

Name
Type
Description

:id

string

The order ID

{
  "id": "0effd05e-d61e-47f2-8fc9-512f3144c69d",
  "status": "ON_HOLD",
  "utcExpiresAt": "2020-06-08T08:43:26Z",
  "utcConfirmedAt": null,
  "bookings": [],
  "contact": null
}

The meaning of each field is described above.

Extend Order

POST https://api.ventrata.com/octo/orders/:id/extend

If the order has a status of ON_HOLD and you need more time before confirming the order.

Path Parameters

Name
Type
Description

expirationMinutes

integer

How many minutes from now to extend the hold until

{
  "id": "0effd05e-d61e-47f2-8fc9-512f3144c69d",
  "status": "ON_HOLD",
  "utcExpiresAt": "2020-06-08T08:53:26Z",
  "utcConfirmedAt": null,
  "bookings": [],
  "contact": null
}

Order Confirmation

POST https://api.ventrata.com/octo/orders/:id/confirm

Confirm the order and all the bookings it contains.

Request Body

Name
Type
Description

contact.fullname

string

The guest's full name

contact.emailAddress

string

The guest's email address

contact.phoneNumber

string

The guest's phone number

contact.locales

string

A list of locales for the guest

contact.country

string

The country of the guest

{
  "id": "0effd05e-d61e-47f2-8fc9-512f3144c69d",
  "status": "ON_HOLD",
  "utcExpiresAt": "2020-06-08T08:53:26Z",
  "utcConfirmedAt": null,
  "bookings": [],
  "contact": {
    "fullName": "Oliver Morgan",
    "emailAddress": "ollym@me.com",
    "phoneNumber": "+447840739436",
    "locales": ["en-GB", "en-US", "en"],
    "country": "GB"
  }
}

A typical request body would be:

{
  "contact": {
    "fullName": "Oliver Morgan",
    "emailAddress": "ollym@me.com",
    "phoneNumber": "+447840739436",
    "locales": ["en-GB", "en-US", "en"],
    "country": "GB"
  }
}

If you're using the cart capability and want to set a resellerReference you should do so as a booking update as there are no reseller references on the order level.

Once you call this method, each of the bookings contained within the order will be confirmed too.

Order Cancellation

DELETE https://api.ventrata.com/octo/orders/:id

This cancels the order and any bookings inside it.

Path Parameters

Name
Type
Description

:id

string

The order ID

Request Body

Name
Type
Description

reason

string

A text description reason for cancelling

{
  "id": "0effd05e-d61e-47f2-8fc9-512f3144c69d",
  "status": "CANCELLED",
  "utcExpiresAt": null,
  "utcConfirmedAt": null,
  "bookings": [],
  "contact": {
    "fullName": "Oliver Morgan",
    "emailAddress": "ollym@me.com",
    "phoneNumber": "+447840739436",
    "locales": ["en-GB", "en-US", "en"],
    "country": "GB"
  }
}

This endpoint is the same as cancelling the booking except it's on the order level.

Last updated