> For the complete documentation index, see [llms.txt](https://klook.gitbook.io/openapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://klook.gitbook.io/openapi/capabilities/pricing.md). Agents can also search and read this documentation through its [MCP server](https://klook.gitbook.io/openapi/~gitbook/mcp).

# Pricing (Mandatory)

Adds pricing fields to various endpoints

To use this capability add `octo/pricing` to your `Octo-Capabilities` header. This capability adds pricing to most endpoints giving you advanced static and dynamic pricing capabilities.

## Product Pricing

### Product Pricing <a href="#product-pricing" id="product-pricing"></a>

<mark style="color:blue;">`GET`</mark> `{host}/products/:id`

Returns top-level pricing by unit on each product.

**Path Parameters**

| Name | Type   | Description                                          |
| ---- | ------ | ---------------------------------------------------- |
| id   | string | The product id, leave this out to get every product. |

{% tabs %}
{% tab title="200" %}

```json
{
  "id": "93c335bc-07b9-4f10-84e2-3df8f2daa257",
  "internalName": "Mega Pass",
  "reference": null,
  "locale": "en",
  "timeZone": "America/Los_Angeles",
  "allowFreesale": false,
  "availabilityRequired": true,
  "availabilityType": "OPENING_HOURS",
  "deliveryFormats": [
    "PDF_URL",
    "QRCODE"
  ],
  "deliveryMethods": [
    "VOUCHER",
    "TICKET"
  ],
  "redemptionMethod": "DIGITAL",
  "options": [
    {
      "id": "6963c6a3-5d6a-4f15-924c-be2530589422",
      "default": false,
      "internalName": "Pick 3",
      "reference": null,
      "restrictions": {
        "minUnits": 0,
        "maxUnits": null
      },
      "units": [
        {
          "id": "adult",
          "internalName": "Adult",
          "reference": "adult",
          "type": "ADULT",
          "restrictions": {
            "minAge": 0,
            "maxAge": 99,
            "idRequired": false,
            "minQuantity": null,
            "maxQuantity": null,
            "paxCount": 1,
            "accompaniedBy": []
          },
          "pricingFrom": [
            {
              "original": 7999,
              "retail": 7999,
              "net": null,
              "currency": "USD",
              "currencyPrecision": 2
            }
          ]
        },
        {
          "id": "child",
          "internalName": "Child",
          "reference": "child",
          "type": "CHILD",
          "restrictions": {
            "minAge": 0,
            "maxAge": 99,
            "idRequired": false,
            "minQuantity": null,
            "maxQuantity": null,
            "paxCount": 1,
            "accompaniedBy": []
          },
          "pricingFrom": [
            {
              "original": 5999,
              "retail": 5999,
              "net": null,
              "currency": "USD",
              "currencyPrecision": 2
            }
          ]
        }
      ]
    },
    {
      "id": "f39bde2f-2cc0-48c1-b404-af68ce2370ae",
      "default": false,
      "internalName": "Pick 4",
      "reference": null,
      "restrictions": {
        "minUnits": 0,
        "maxUnits": null
      },
      "units": [
        {
          "id": "adult",
          "internalName": "Adult",
          "reference": "adult",
          "type": "ADULT",
          "restrictions": {
            "minAge": 0,
            "maxAge": 99,
            "idRequired": false,
            "minQuantity": null,
            "maxQuantity": null,
            "paxCount": 1,
            "accompaniedBy": []
          },
          "pricingFrom": [
            {
              "original": 9999,
              "retail": 9999,
              "net": null,
              "currency": "USD",
              "currencyPrecision": 2
            }
          ]
        },
        {
          "id": "child",
          "internalName": "Child",
          "reference": "child",
          "type": "CHILD",
          "restrictions": {
            "minAge": 0,
            "maxAge": 99,
            "idRequired": false,
            "minQuantity": null,
            "maxQuantity": null,
            "paxCount": 1,
            "accompaniedBy": []
          },
          "pricingFrom": [
            {
              "original": 7999,
              "retail": 7999,
              "net": null,
              "currency": "USD",
              "currencyPrecision": 2
            }
          ]
        }
      ]
    },
    {
      "id": "f996c316-7541-4cb4-a96f-4a6f08cea70a",
      "default": false,
      "internalName": "Pick 5",
      "reference": null,
      "restrictions": {
        "minUnits": 0,
        "maxUnits": null
      },
      "units": [
        {
          "id": "adult",
          "internalName": "Adult",
          "reference": "adult",
          "type": "ADULT",
          "restrictions": {
            "minAge": 0,
            "maxAge": 99,
            "idRequired": false,
            "minQuantity": null,
            "maxQuantity": null,
            "paxCount": 1,
            "accompaniedBy": []
          },
          "pricingFrom": [
            {
              "original": 11499,
              "retail": 11499,
              "net": null,
              "currency": "USD",
              "currencyPrecision": 2
            }
          ]
        },
        {
          "id": "child",
          "internalName": "Child",
          "reference": "child",
          "type": "CHILD",
          "restrictions": {
            "minAge": 0,
            "maxAge": 99,
            "idRequired": false,
            "minQuantity": null,
            "maxQuantity": null,
            "paxCount": 1,
            "accompaniedBy": []
          },
          "pricingFrom": [
            {
              "original": 9299,
              "retail": 9299,
              "net": null,
              "currency": "USD",
              "currencyPrecision": 2
            }
          ]
        }
      ]
    }
  ],
  "defaultCurrency": "USD",
  "availableCurrencies": [
    "USD"
  ]
}
```

{% endtab %}
{% endtabs %}

On the response, the only changes from the original schema is on the Product object:

```json
{
  // ...rest of Product object
  "defaultCurrency": "USD",
  "availableCurrencies": ["USD", "EUR", "GBP"],
  "pricingPer": "UNIT"
}
```

The `defaultCurrency` is the default currency for this product, if you omit the `currency` parameter on future endpoints this is the value the reservation system will fallback to. `availableCurrencies` are all the possible currencies that we accept for this product.

`pricingPer` indicates whether the pricing is per unit ~~(most common), or per booking. Pricing which is per booking is common for private charters or group booking products where the price is the same regardless of how many tickets are purchased.~~

~~Next, if `pricingPer = "UNIT"`, on each Unit (adult, child, etc.) we add the following:~~

~~If `pricingPer = "BOOKING"` then these fields will be on the Product itself instead of the Unit as the pricing applies once to the booking regardless of how many units (tickets) are purchased.~~

We'll produce one `pricingFrom` object for each currency in `availableCurrencies` . The meaning of each pricing field is given below:

| Field                                                            | Description                                                                                                                                                                                                                                                |
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `original`<mark style="color:orange;">(required)</mark>          | The original price for this product which will be the same or higher than the retail amount. Use this to show a discount has been applied e.g. ~~$10~~ **$8.50** meaning original price $10, retail price $8.50                                            |
| `retail`<mark style="color:orange;">(required)</mark>            | The selling price Klook will show & charge to customers.                                                                                                                                                                                                   |
| `net`<mark style="color:orange;">(required)</mark>               | The wholesale rate the supplier will charge Klook for this sale.                                                                                                                                                                                           |
| `currency`<mark style="color:orange;">(required)</mark>          | The currency.                                                                                                                                                                                                                                              |
| `currencyPrecision`<mark style="color:orange;">(required)</mark> | All pricing is given in integers to avoid floating point rounding issues. e.g. USD = 2 and JPY = 0. To convert a price to decimal you should do: `price / (10 ** currencyPrecision)` where \*\* is to the power of e.g. `Math.pow(10, currencyPrecision)`. |
| `includedTaxes`(optional)                                        | Any taxes included in the retail and/or net price.                                                                                                                                                                                                         |

### ~~Pricing Calendar~~ <a href="#pricing-calendar" id="pricing-calendar"></a>

~~<mark style="color:green;">`POST`</mark>~~ ~~`{host}/availability/calendar`~~

~~Returns pricing per day for when you're generating a calendar view.~~

~~**Request Body**~~

~~The documentation above only shows the additions this capability adds to the availability calendar endpoint. See the documentation here to see the full request parameters and response object.~~

~~Each availability object is given a new `unitPricingFrom` field with an array of unit prices in the currency for example:~~

~~which is also included by default if `pricingPer = BOOKING` as the number of units isn't needed to know what the price of the booking is.~~ For example:

~~Having the `pricingFrom` value calculated for you makes it much easier to display a single price on each date on the calendar (assuming the guest has chosen how many units they want before you display the calendar).~~

~~If pricingPer = BOOKING then unitPricingFrom will not be provided.~~

### Pricing Check <a href="#pricing-check" id="pricing-check"></a>

<mark style="color:green;">`POST`</mark> `{host}/availability`

Returns all prices on each time slots. If we pass the `units` to the request then we'll need the total pricing for the selection under the `pricingFrom` field.&#x20;

**Request Body**

{% tabs %}
{% tab title="Request" %}

```json
{
  "productId": "1a7213eb-3a33-4cbb-b114-64d771c201ac",
  "optionId": "DEFAULT",
  "localDateStart": "2020-07-01",
  "localDateEnd": "2020-08-02"
  /*"units": [ //units objects are optional
    {
      "id": "unit_adult123",
      "quantity": 2
    },
    {
      "id": "unit_child321",
      "quantity": 1
    }
  ]*/
}
```

{% endtab %}

{% tab title="Response" %}

```json
[
  {
    "id": "2020-07-01T11:30:00-05:00",
    "localDateTimeStart": "2020-07-01T11:30:00-05:00",
    "localDateTimeEnd": "2020-07-01T23:30:00-05:00",
    "utcCutoffAt": "2020-07-01T16:30:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  },
  {
    "id": "2020-07-01T12:00:00-05:00",
    "localDateTimeStart": "2020-07-01T12:00:00-05:00",
    "localDateTimeEnd": "2020-07-02T00:00:00-05:00",
    "utcCutoffAt": "2020-07-01T17:00:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currencyPrecision": 2,
      "currency": "USD"
    }
  },
  {
    "id": "2020-07-01T14:30:00-05:00",
    "localDateTimeStart": "2020-07-01T14:30:00-05:00",
    "localDateTimeEnd": "2020-07-02T02:30:00-05:00",
    "utcCutoffAt": "2020-07-01T19:00:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  },
  {
    "id": "2020-07-01T15:00:00-05:00",
    "localDateTimeStart": "2020-07-01T15:00:00-05:00",
    "localDateTimeEnd": "2020-07-02T03:00:00-05:00",
    "utcCutoffAt": "2020-07-01T20:00:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  },
  {
    "id": "2020-07-01T10:30:00-05:00",
    "localDateTimeStart": "2020-07-01T10:30:00-05:00",
    "localDateTimeEnd": "2020-07-01T22:30:00-05:00",
    "utcCutoffAt": "2020-07-01T15:30:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  },
  {
    "id": "2020-07-01T13:30:00-05:00",
    "localDateTimeStart": "2020-07-01T13:30:00-05:00",
    "localDateTimeEnd": "2020-07-02T01:30:00-05:00",
    "utcCutoffAt": "2020-07-01T15:30:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  },
  {
    "id": "2020-07-01T09:30:00-05:00",
    "localDateTimeStart": "2020-07-01T09:30:00-05:00",
    "localDateTimeEnd": "2020-07-01T21:30:00-05:00",
    "utcCutoffAt": "2020-07-01T14:30:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  },
  {
    "id": "2020-07-01T12:30:00-05:00",
    "localDateTimeStart": "2020-07-01T12:30:00-05:00",
    "localDateTimeEnd": "2020-07-02T00:30:00-05:00",
    "utcCutoffAt": "2020-07-01T17:30:00Z",
    "allDay": false,
    "status": "AVAILABLE",
    "vacancies": 24,
    "capacity": 24,
    "maxUnits": 24,
    "openingHours": [],
    "unitPricing": [
      {
        "original": 3995,
        "retail": 3995,
        "net": 2996,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "adult"
      },
      {
        "original": 1995,
        "retail": 1995,
        "net": 1496,
        "currency": "USD",
        "currencyPrecision": 2,
        "unitId": "child"
      }
    ],
    "pricing": {
      "original": 9985,
      "retail": 9985,
      "net": 7488,
      "currency": "USD",
      "currencyPrecision": 2
    }
  }
]
```

{% endtab %}
{% endtabs %}

This endpoint is the availability check endpoint which has been extended to add pricing.&#x20;

Notice how the response fields are `unitPricing` and `pricing` (without the From suffix). That is because this is the final price, and this is what the booking will be once confirmed.

### Booking Reservation <a href="#booking-reservation" id="booking-reservation"></a>

<mark style="color:green;">`POST`</mark> `{host}/bookings`

The booking reservation call

**Request Body**

{% tabs %}
{% tab title="200" %}

```json
{
  "uuid": "4de58057-e7bd-4ec0-be9b-08eb674098b9",
  "testMode": true,
  "resellerReference": null,
  "supplierReference": "DV2JG2",
  "status": "ON_HOLD",
  "utcExpiresAt": "2020-06-08T07:32:24Z",
  "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": "4c4a52cd-c0a5-49d9-b1e7-a713564993d4",
      "resellerReference": null,
      "supplierReference": "VD8KTS",
      "unitId": "unit_321abcchild",
      "ticket": {
        "redemptionMethod": "DIGITAL",
        "utcRedeemedAt": null,
        "deliveryOptions": []
      }
    },
    {
      "uuid": "8d4e198d-e337-465c-b17c-e3a55798ee97",
      "resellerReference": null,
      "supplierReference": "ENV98P",
      "unitId": "unit_123abcadult",
      "ticket": {
        "redemptionMethod": "DIGITAL",
        "utcRedeemedAt": null,
        "deliveryOptions": []
      }
    },
    {
      "uuid": "f3183108-32f4-4816-99e6-b04ae40dd433",
      "resellerReference": null,
      "supplierReference": "43FJJ4",
      "unitId": "unit_123abcadult",
      "ticket": {
        "redemptionMethod": "DIGITAL",
        "utcRedeemedAt": null,
        "deliveryOptions": []
      }
    }
  ],
  "pricing": {
    "original": 8800,
    "retail": 8800,
    "net": 5500,
    "currency": "EUR",
    "currencyPrecision": 2,
    "includedTaxes": [
      {
        "name": "VAT 10",
        "retail": 800,
        "net": 500
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

This capability extends the booking schema to add a `pricing` field which gives you the final price of the booking as well as any included taxes. The final price includes tax, and should be what Klook display to the guest as the amount they need to pay.

```json
  "pricing": {
    "original": 8800,
    "retail": 8800,
    "net": 5500,
    "currency": "EUR",
    "currencyPrecision": 2,
    "includedTaxes": [ //optional
      {
        "name": "VAT 10",
        "retail": 800,
        "net": 500
      }
    ]
  }
```

We include the net amount as well as any taxes included in the net price.
