item

Your Checkfront inventory is made up of ‘items’ that are added to bookings, and have complex availability controls and rules defining their stock and prices.

When no dates are passed in the API call, a full list of enabled items in the inventory is displayed, without specific availability and pricing.

However, if you pass in the relevant booking dates (and optionally parameters, discount codes, etc), the API will return a “rated” response that includes pricing and availablity, as well as a “SLIP” that will be used to add the item to a session.

SLIP

The item SLIP is an encoded string returned when making a rated query to a specific item. The slip contains the information needed to make a booking. Don’t attempt to reverse engineer this, as the format changes. It must be optioned via a rated API call.

Booking Parameters

Booking parameters are defined globally in your system, and can be configured on a per item basis. Your parameters specify the number of items to book, for example Child and Adult. These are completely configurable in your Checkfront account under Manage / Settings / Configure.

To query specific pricing and availability, you need to pass the appropriate parameters in your API call (using the parameter IDs as specified in your configuration).

Say for instance you have 2 parameters configured: Adults (id: adults), and Children (id: children). To get pricing for 2 adults and one child you would pass: param[adults]=2&param[children]=1 in your API call.

Booking parameters have many options, and can be configured to control inventory in very specific ways. See the Checkfront support centre or ask us for more information.

Public API

If the Public API is enabled, unauthenticated users can make requests to the /item, /item/{id}, /item/cal, and /item/{id}/cal endpoints. This is the same functionality as a customer viewing the item or availability calendar on the Hosted Booking Page.

For the item/ and item/{id} endpoints, the responses between the internal and public API versions have an identical structure. The public response for these endpoints will only return customer rules and item visibility; staff rules and visibility will not be returned.

For the item/cal and item/{id}/cal endpoints the public response will return 1 if the item is available instead of the available inventory.

Request

GET /api/3.0/item

Retrieve a list of the enabled items in the system.

Query Parameters:
  • start_date (date) – (rated) Booking start date.

  • end_date (date) – (rated) Booking end date.

  • date (date) – (rated) Alias of start date (for same-day bookings).

  • start_time (date) – (rated) Start time (used in hourly bookings).

  • end_time (date) – (rated) End time (used in hourly bookings).

  • category_id (integer) – Filter items by category.

  • packages (boolean) – Show package options.

  • available (integer) – (rated) Filter to items with at least this many left in stock.

  • keyword (string) – Filter to items with a name containing this keyword.

  • item_id (string) – A comma-seperated list of items to filter to.

  • discount_code (string) – (rated) The discount code to apply to the price.

  • rules (string) – ‘soft’ will prevent triggering date based rule errors, or ‘off’ will disable rule checking.

  • param (array) – (rated) See Booking Parameters.

GET /api/3.0/item/{item_id}

Retrieve details for a single item. Shares same params as above for rated requests.

Parameters:
  • item_id (string) – The unique item_id of the item to query, as found in a response or your Checkfront panel.

GET /api/3.0/item/{item_id}/cal

Retrieve calendar availability for a single item.

Parameters:
  • item_id (string) – The unique item_id of the item to query.

Query Parameters:
  • start_date (date) – Availability range start date.

  • end_date (date) – Availability range start date.

GET /api/3.0/item/cal

Retrieve calendar availability for a set of items.

Query Parameters:
  • item_id (array|integer) – The unique item_id of the item to query, or an array of item IDs

  • category_id (integer) – A category of items to filter to.

  • start_date (date) – Availability range start date.

  • end_date (date) – Availability range start date.

Unrated Response

 1{
 2    "version": "3.0",
 3    "account_id": 1,
 4    "host_id": "your-company.checkfront.com",
 5    "name": "Your Company",
 6    "locale": {
 7        "id": "en_US",
 8        "lang": "en",
 9        "currency": "CAD"
10    },
11    "request": {
12        "status": "OK",
13        "resource": "item",
14        "id": "18",
15        "records": 0,
16        "limit": 0,
17        "page": 1,
18        "pages": 1,
19        "time": 0.0027,
20        "method": "get"
21    },
22    "query": [],
23    "item": {
24        "unit": "D",
25        "item_id": 18,
26        "sku": "bungeejumpingfromthetopoftheo2arena",
27        "url": "",
28        "lock": 1,
29        "visibility": "*",
30        "name": "Bungee Jumping from the Top of the O2 Arena",
31        "pos": 0,
32        "summary": "<p>Take a trip to the top of London's most famous concert venue, the O2 Arena, and right back down again. This exhilarating chance of a lifetime starts with a tour through the Memorabilia Halls of the O2, and finishes with a 160 ft bungee jump. Days and space are limited, so book today!</p>",
33        "details": "",
34        "meta": "{\"display_mode\":\"dropdown\",\"item_package_rate\":\"\",\"delay\":0}",
35        "stock": 15,
36        "unlimited": 0,
37        "video": {
38            "id": "B6MwTLgmFMM",
39            "start": 0
40        },
41        "image": {
42            "1": {
43                "title": "",
44                "src": "18-1--1523520394960863",
45                "path": "/media/M18-1--1523520394960863.jpg",
46                "url": "https://storage.googleapis.com/cf-public-us/thelondonexperience-67672/media/L18-1?t=1523520395338205",
47                "url_medium": "https://storage.googleapis.com/cf-public-us/thelondonexperience-67672/media/M18-1?t=1523520395617178",
48                "url_small": "https://storage.googleapis.com/cf-public-us/thelondonexperience-67672/media/S18-1?t=1523520395895660"
49            }
50        },
51        "category_id": 6,
52        "rated": 1,
53        "product_group_type": "",
54        "product_group_children": "",
55        "type": "I",
56        "status": "A",
57        "alias_id": 0,
58        "len": 1,
59        "rules": "{\"param\":{\"adults\":{\"MIN\":\"0\",\"MAX\":\"0\"},\"children\":{\"MIN\":\"0\",\"MAX\":\"0\"}},\"fixed\":{\"start_time\":\"\"}}",
60        "category": "Activities"
61    }
62}

Rated Response

  1{
  2    "version": "3.0",
  3    "account_id": 1,
  4    "host_id": "your-company.checkfront.com",
  5    "name": "Your Company",
  6    "locale": {
  7        "id": "en_US",
  8        "lang": "en",
  9        "currency": "CAD"
 10    },
 11    "request": {
 12        "status": "OK",
 13        "resource": "item",
 14        "id": "18",
 15        "records": 0,
 16        "limit": 0,
 17        "page": 1,
 18        "pages": 1,
 19        "time": 0.0101,
 20        "method": "get"
 21    },
 22    "query": {
 23        "start_date": "20171005",
 24        "end_date": "20171005",
 25        "param": {
 26            "qty": "1",
 27            "rooms": "1",
 28            "adults": "1",
 29            "children": "0",
 30            "guests": "1",
 31            "familyticket2ad": "1",
 32            "familyticket": "4"
 33        },
 34        "local_end_date": "10/05/17",
 35        "local_start_date": "10/05/17"
 36    },
 37    "item": {
 38        "unit": "D",
 39        "item_id": 18,
 40        "sku": "bungeejumpingfromthetopoftheo2arena",
 41        "url": "",
 42        "lock": 1,
 43        "visibility": "*",
 44        "name": "Bungee Jumping from the Top of the O2 Arena",
 45        "pos": 0,
 46        "summary": "<p>Take a trip to the top of London's most famous concert venue, the O2 Arena, and right back down again. This exhilarating chance of a lifetime starts with a tour through the Memorabilia Halls of the O2, and finishes with a 160 ft bungee jump. Days and space are limited, so book today!</p>",
 47        "details": "",
 48        "meta": {
 49            "display_mode": "dropdown",
 50            "item_package_rate": "",
 51            "delay": 0,
 52            "default_len": 1
 53        },
 54        "stock": 15,
 55        "unlimited": 0,
 56        "video": {
 57            "id": "B6MwTLgmFMM",
 58            "start": 0
 59        },
 60        "image": {
 61            "1": {
 62                "title": "",
 63                "src": "18-1--3942",
 64                "path": "/media/M18-1--3942.jpg"
 65            },
 66            "2": {
 67                "title": "",
 68                "src": "18-2--9804",
 69                "path": "/media/M18-2--9804.jpg"
 70            }
 71        },
 72        "category_id": 6,
 73        "rated": 1,
 74        "type": "I",
 75        "status": "A",
 76        "alias_id": 0,
 77        "len": 1,
 78        "rules": "{\"param\":{\"adults\":{\"MIN\":\"0\",\"MAX\":\"0\"},\"children\":{\"MIN\":\"0\",\"MAX\":\"0\"}},\"fixed\":{\"start_time\":\"\"}}",
 79        "category": "Activities",
 80        "package": [
 81            {
 82                "package_id": 21,
 83                "optin": "O",
 84                "select_package_params": 1
 85            },
 86            {
 87                "package_id": 20,
 88                "optin": "O",
 89                "select_package_params": 1
 90            },
 91            {
 92                "package_id": 19,
 93                "optin": "O",
 94                "select_package_params": 1
 95            }
 96        ],
 97        "param": {
 98            "adults": {
 99                "price": 1,
100                "lbl": "Adults",
101                "lock": 1,
102                "qty": 1,
103                "hide": 0,
104                "customer_hide": 0,
105                "req": 1,
106                "range": 1,
107                "def": 1,
108                "MIN": 0,
109                "MAX": 0
110            },
111            "children": {
112                "price": 1,
113                "lbl": "Children",
114                "lock": 1,
115                "qty": 0,
116                "hide": 0,
117                "customer_hide": 0,
118                "req": 0,
119                "range": 1,
120                "def": 0,
121                "MIN": 0,
122                "MAX": 0
123            }
124        },
125        "qty": 1,
126        "rate": {
127            "status": "AVAILABLE",
128            "available": 9,
129            "slip": "18.20171005X1-adults.1-children.0",
130            "summary": {
131                "title": "9 Available",
132                "details": "<strong title='Adults'>Adults:</strong> 1 Day @ $130.00",
133                "price": {
134                    "total": "$130.00",
135                    "title": "$110.00 - $130.00",
136                    "unit": "per day",
137                    "param": {
138                        "adults": "$130.00",
139                        "children": "$110.00"
140                    }
141                },
142                "date": "Thu Oct 5, 2017"
143            },
144            "sub_total": "130.00",
145            "event": [
146                {
147                    "adults": {
148                        "amount": 130,
149                        "days": 1,
150                        "type": "q",
151                        "range": "1-5"
152                    },
153                    "adults~1-5": {
154                        "amount": 130,
155                        "type": "q"
156                    },
157                    "adults~6-15": {
158                        "amount": 115,
159                        "type": "q"
160                    },
161                    "children": {
162                        "amount": 110,
163                        "days": 1,
164                        "type": "q"
165                    },
166                    "children~1-5": {
167                        "amount": 110,
168                        "type": "q"
169                    },
170                    "children~6-15": {
171                        "amount": 100,
172                        "type": "q"
173                    }
174                }
175            ],
176            "start_date": "20171005",
177            "end_date": "20171005",
178            "dates": {
179                "20171005": {
180                    "status": "A",
181                    "price": {
182                        "adults": 130,
183                        "children": 110
184                    },
185                    "dow": "4",
186                    "stock": {
187                        "T": 15,
188                        "B": 6,
189                        "A": 9,
190                        "MinA": 9
191                    },
192                    "rates": [],
193                    "discount": [],
194                    "sub_total": 130
195                }
196            }
197        },
198        "days": 1,
199        "discount": {
200            "amount": 0
201        },
202        "gprice": {
203            "adults": {
204                "1-5": "q",
205                "6-15": "q"
206            },
207            "children": {
208                "1-5": "q",
209                "6-15": "q"
210            }
211        },
212        "local_start_date": "10/05/17",
213        "local_end_date": "10/05/17"
214    },
215    "events": {
216        "9": {
217            "name": "Group Booking",
218            "start_date": "",
219            "end_date": ""
220        }
221    }
222}