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.

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
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
    "version": "3.0",
    "account_id": 1,
    "host_id": "your-company.checkfront.com",
    "name": "Your Company",
    "locale": {
        "id": "en_US",
        "lang": "en",
        "currency": "CAD"
    },
    "request": {
        "status": "OK",
        "resource": "item",
        "id": "18",
        "records": 0,
        "limit": 0,
        "page": 1,
        "pages": 1,
        "time": 0.0027,
        "method": "get"
    },
    "query": [],
    "item": {
        "unit": "D",
        "item_id": 18,
        "sku": "bungeejumpingfromthetopoftheo2arena",
        "url": "",
        "lock": 1,
        "visibility": "*",
        "name": "Bungee Jumping from the Top of the O2 Arena",
        "pos": 0,
        "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>",
        "details": "",
        "meta": "{\"display_mode\":\"dropdown\",\"item_package_rate\":\"\",\"delay\":0}",
        "stock": 15,
        "unlimited": 0,
        "video": {
            "id": "B6MwTLgmFMM",
            "start": 0
        },
        "image": {
            "1": {
                "title": "",
                "src": "18-1--1523520394960863",
                "path": "/media/M18-1--1523520394960863.jpg",
                "url": "https://storage.googleapis.com/cf-public-us/thelondonexperience-67672/media/L18-1?t=1523520395338205",
                "url_medium": "https://storage.googleapis.com/cf-public-us/thelondonexperience-67672/media/M18-1?t=1523520395617178",
                "url_small": "https://storage.googleapis.com/cf-public-us/thelondonexperience-67672/media/S18-1?t=1523520395895660"
            }
        },
        "category_id": 6,
        "rated": 1,
        "product_group_type": "",
        "product_group_children": "",
        "type": "I",
        "status": "A",
        "alias_id": 0,
        "len": 1,
        "rules": "{\"param\":{\"adults\":{\"MIN\":\"0\",\"MAX\":\"0\"},\"children\":{\"MIN\":\"0\",\"MAX\":\"0\"}},\"fixed\":{\"start_time\":\"\"}}",
        "category": "Activities"
    }
}

Rated Response

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