booking/form

This call can easily be cached if your configuration does not often change, but depending on your setup, a number of the fields returned in this request may be required to complete a booking.

You will receive an error indicating missing information if you attempt to call booking/create without the required fields, either those required by staff if you’re acting on behalf of a staff member, or by a customer otherwise.

Public API

If the Public API is enabled, unauthenticated users can make requests to the /booking/forms endpoint. This is the same functionality as a customer viewing the form when making a booking on the Customer Booking Page. Only form fields that are set to show on the Customer Booking Form will be returned. See out our Knowledge Base for more information on Booking Form Field Options.

GET /api/3.0/booking/form

Retrieve the customer details input form for the booking. Some fields may be required to call booking/create.

Response JSON Object:
  • booking_form_ui – An array of form field definitions

  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": ""
 13    },
 14    "booking_form_ui": {
 15        "msg": [],
 16        "errors": 0,
 17        "mode": "html",
 18        "_cnf": [],
 19        "customer_name": {
 20            "value": "",
 21            "define": {
 22                "required": 1,
 23                "layout": {
 24                    "staff": {
 25                        "invoice": 1,
 26                        "form": 1,
 27                        "required": 1
 28                    },
 29                    "customer": {
 30                        "invoice": 1,
 31                        "form": 1,
 32                        "required": 1
 33                    },
 34                    "sys": 0,
 35                    "lbl": "Name",
 36                    "type": "text"
 37                }
 38            }
 39        },
 40        "booking_policy":{
 41            "body":"This is your <strong style='color: firebrick'>sample booking policy<\/strong>.  It's included in customer e-mails, your booking receipt page and in PDF print outs.\n\nYou can edit this policy by logging into your Checkfront account, and navigating to Manage \/ Layout \/ Invoice.",
 42            "fields":{
 43                "customer_tos_agree":{
 44                    "value":0,
 45                    "define":{
 46                        "required":1,
 47                        "layout":{
 48                            "staff":{
 49                                "invoice":1,
 50                                "form":1,
 51                                "required":0
 52                            },
 53                            "customer":{
 54                                "invoice":1,
 55                                "form":1,
 56                                "required":1
 57                            },
 58                            "lbl":"I have read and agreed to the Terms of Service",
 59                            "type":"checkbox"
 60                        }
 61                    }
 62                }
 63            }
 64        },
 65        "customer_email": {
 66            "value": "",
 67            "define": {
 68                "mask": "email",
 69                "layout": {
 70                    "staff": {
 71                        "invoice": 1,
 72                        "form": 1,
 73                        "required": 0
 74                    },
 75                    "customer": {
 76                        "invoice": 1,
 77                        "form": 1,
 78                        "required": 1
 79                    },
 80                    "sys": 0,
 81                    "lbl": "E-mail",
 82                    "type": "text"
 83                },
 84                "required": 0
 85            }
 86        },
 87        "customer_phone": {
 88            "value": "",
 89            "define": {
 90                "mask": "simple",
 91                "layout": {
 92                    "staff": {
 93                        "invoice": 1,
 94                        "form": 1,
 95                        "required": 0
 96                    },
 97                    "customer": {
 98                        "invoice": 1,
 99                        "form": 1,
100                        "required": 0
101                    },
102                    "sys": 0,
103                    "lbl": "Phone",
104                    "type": "text",
105                    "customer_address": true
106                },
107                "required": 0
108            }
109        },
110        "customer_address": {
111            "value": "",
112            "define": {
113                "layout": {
114                    "staff": {
115                        "invoice": 1,
116                        "form": 1,
117                        "required": 0
118                    },
119                    "customer": {
120                        "invoice": 1,
121                        "form": 1,
122                        "required": 0
123                    },
124                    "sys": 0,
125                    "lbl": "Address",
126                    "type": "text",
127                    "customer_address": true
128                },
129                "required": 0
130            }
131        },
132        "customer_city": {
133            "value": "",
134            "define": {
135                "layout": {
136                    "staff": {
137                        "invoice": 1,
138                        "form": 1,
139                        "required": 0
140                    },
141                    "customer": {
142                        "invoice": 1,
143                        "form": 1,
144                        "required": 0
145                    },
146                    "sys": 0,
147                    "lbl": "City",
148                    "type": "text",
149                    "customer_address": true
150                },
151                "required": 0
152            }
153        },
154        "customer_country": {
155            "value": "CA",
156            "define": {
157                "layout": {
158                    "staff": {
159                        "invoice": 1,
160                        "form": 1,
161                        "required": 0
162                    },
163                    "customer": {
164                        "invoice": 1,
165                        "form": 1,
166                        "required": 0
167                    },
168                    "sys": 0,
169                    "lbl": "Country",
170                    "type": "select",
171                    "customer_address": true,
172                    "options": {
173                        "AF": "Afghanistan",
174                        "AL": "Albania",
175                        "DZ": "Algeria",
176                        "AS": "American Samoa",
177                        "AD": "Andorra",
178                        "AO": "Angola",
179                        "AG": "Antigua And Barbuda",
180                        "AR": "Argentina",
181                        "AM": "Armenia",
182                        "AU": "Australia",
183                        "AT": "Austria",
184                        "AZ": "Azerbaijan",
185                        "BS": "Bahamas",
186                        "BH": "Bahrain",
187                        "BD": "Bangladesh",
188                        "BB": "Barbados",
189                        "BY": "Belarus",
190                        "BE": "Belgium",
191                        "BZ": "Belize",
192                        "BJ": "Benin",
193                        "BM": "Bermuda",
194                        "BT": "Bhutan",
195                        "BO": "Bolivia",
196                        "BA": "Bosnia And Herzegovina",
197                        "BW": "Botswana",
198                        "BR": "Brazil",
199                        "BN": "Brunei Darussalam",
200                        "BG": "Bulgaria",
201                        "BF": "Burkina Faso",
202                        "BI": "Burundi",
203                        "KH": "Cambodia",
204                        "CM": "Cameroon",
205                        "CA": "Canada",
206                        "CV": "Cape Verde",
207                        "KY": "Cayman Islands",
208                        "CF": "Central African Republic",
209                        "TD": "Chad",
210                        "CL": "Chile",
211                        "CN": "China",
212                        "CO": "Colombia",
213                        "KM": "Comoros",
214                        "CD": "Congo (DC)",
215                        "CG": "Congo (R)",
216                        "CK": "Cook Islands",
217                        "CR": "Costa Rica",
218                        "HR": "Croatia",
219                        "CU": "Cuba",
220                        "CY": "Cyprus",
221                        "CZ": "Czech Republic",
222                        "DK": "Denmark",
223                        "DJ": "Djibouti",
224                        "DM": "Dominica",
225                        "DO": "Dominican Republic",
226                        "TP": "East Timor",
227                        "EC": "Ecuador",
228                        "EG": "Egypt",
229                        "SV": "El Salvador",
230                        "GQ": "Equatorial Guinea",
231                        "ER": "Eritrea",
232                        "EE": "Estonia",
233                        "ET": "Ethiopia",
234                        "FK": "Falkland Islands",
235                        "FO": "Faroe Islands",
236                        "FJ": "Fiji",
237                        "FI": "Finland",
238                        "FR": "France",
239                        "PF": "French Polynesia",
240                        "GA": "Gabon",
241                        "GM": "Gambia",
242                        "GE": "Georgia",
243                        "DE": "Germany",
244                        "GH": "Ghana",
245                        "GI": "Gibraltar",
246                        "GR": "Greece",
247                        "GL": "Greenland",
248                        "GD": "Grenada",
249                        "GP": "Guadeloupe",
250                        "GU": "Guam",
251                        "GT": "Guatemala",
252                        "GN": "Guinea",
253                        "GW": "Guinea-bissau",
254                        "HT": "Haiti",
255                        "VA": "Holy See",
256                        "HN": "Honduras",
257                        "HK": "Hong Kong",
258                        "HU": "Hungary",
259                        "IS": "Iceland",
260                        "IN": "India",
261                        "ID": "Indonesia",
262                        "IR": "Iran",
263                        "IQ": "Iraq",
264                        "IE": "Ireland",
265                        "IL": "Israel",
266                        "IT": "Italy",
267                        "CI": "Ivory coast",
268                        "JM": "Jamaica",
269                        "JP": "Japan",
270                        "JO": "Jordan",
271                        "KZ": "Kazakhstan",
272                        "KE": "Kenya",
273                        "KI": "Kiribati",
274                        "KW": "Kuwait",
275                        "KG": "Kyrgyzstan",
276                        "LA": "Laos",
277                        "LV": "Latvia",
278                        "LB": "Lebanon",
279                        "LS": "Lesotho",
280                        "LR": "Liberia",
281                        "LI": "Liechtenstein",
282                        "LT": "Lithuania",
283                        "LU": "Luxembourg",
284                        "LY": "Lybia",
285                        "MO": "Macao",
286                        "MK": "Macedonia",
287                        "MG": "Madagascar",
288                        "MW": "Malawi",
289                        "MY": "Malaysia",
290                        "MV": "Maldives",
291                        "ML": "Mali",
292                        "MT": "Malta",
293                        "MQ": "Martinique",
294                        "MR": "Mauritania",
295                        "MU": "Mauritius",
296                        "MX": "Mexico",
297                        "MD": "Moldova",
298                        "MC": "Monaco",
299                        "MN": "Mongolia",
300                        "MS": "Montserrat",
301                        "MA": "Morocco",
302                        "MZ": "Mozambique",
303                        "MM": "Myanmar",
304                        "NA": "Namibia",
305                        "NR": "Nauru",
306                        "NP": "Nepal",
307                        "NL": "Netherlands",
308                        "AN": "Netherlands Antilles",
309                        "NC": "New Caledonia",
310                        "NZ": "New Zealand",
311                        "NI": "Nicaragua",
312                        "NE": "Niger",
313                        "NG": "Nigeria",
314                        "KP": "North Korea",
315                        "MP": "Northern Mariana Islands",
316                        "NO": "Norway",
317                        "OM": "Oman",
318                        "PK": "Pakistan",
319                        "PW": "Palau",
320                        "PS": "Palestine",
321                        "PA": "Panama",
322                        "PG": "Papua New Guinea",
323                        "PY": "Paraguay",
324                        "PE": "Peru",
325                        "PH": "Philippines",
326                        "PL": "Poland",
327                        "PT": "Portugal",
328                        "PR": "Puerto Rico",
329                        "QA": "Qatar",
330                        "RE": "Reunion",
331                        "RO": "Romania",
332                        "RU": "Russian Federation",
333                        "RW": "Rwanda",
334                        "SPM": "Saint-Pierre et Miquelon",
335                        "WS": "Samoa",
336                        "SM": "San Marino",
337                        "ST": "Sao Tome And Principe",
338                        "SA": "Saudi Arabia",
339                        "SN": "Senegal",
340                        "YU": "Serbia and Montenegro",
341                        "SC": "Seychelles",
342                        "SL": "Sierra Leone",
343                        "SG": "Singapore",
344                        "SK": "Slovakia",
345                        "SI": "Slovenia",
346                        "SB": "Solomon Islands",
347                        "SO": "Somalia",
348                        "ZA": "South Africa",
349                        "KR": "South Korea",
350                        "ES": "Spain",
351                        "LK": "Sri Lanka",
352                        "VC": "St Vincent And The Grenadines",
353                        "SD": "Sudan",
354                        "SR": "Suriname",
355                        "SZ": "Swaziland",
356                        "SE": "Sweden",
357                        "CH": "Switzerland",
358                        "SY": "Syria",
359                        "TW": "Taiwan",
360                        "TJ": "Tajikistan",
361                        "TZ": "Tanzania",
362                        "TH": "Thailand",
363                        "TG": "Togo",
364                        "TO": "Tonga",
365                        "TT": "Trinidad And Tobago",
366                        "TN": "Tunisia",
367                        "TR": "Turkey",
368                        "TM": "Turkmenistan",
369                        "TV": "Tuvalu",
370                        "UG": "Uganda",
371                        "UA": "Ukraine",
372                        "AE": "United Arab Emirates",
373                        "GB": "United Kingdom",
374                        "US": "United States",
375                        "UY": "Uruguay",
376                        "UZ": "Uzbekistan",
377                        "VU": "Vanuatu",
378                        "VE": "Venezuela",
379                        "VN": "Vietnam",
380                        "VG": "Virgin Islands, British",
381                        "VI": "Virgin Islands, U.S.",
382                        "YE": "Yemen",
383                        "ZM": "Zambia",
384                        "ZW": "Zimbabwe"
385                    }
386                },
387                "required": 0
388            }
389        },
390        "customer_region": {
391            "value": "BC",
392            "define": {
393                "layout": {
394                    "staff": {
395                        "invoice": 1,
396                        "form": 1,
397                        "required": 0
398                    },
399                    "customer": {
400                        "invoice": 1,
401                        "form": 1,
402                        "required": 0
403                    },
404                    "sys": 0,
405                    "lbl": "Province",
406                    "type": "select",
407                    "customer_address": true,
408                    "options": {
409                        "AB": "Alberta",
410                        "BC": "British Columbia",
411                        "MB": "Manitoba",
412                        "NB": "New Brunswick",
413                        "NF": "Newfoundland",
414                        "NWT": "Northwest Territories",
415                        "NS": "Nova Scotia",
416                        "NU": "Nunavut",
417                        "ON": "Ontario",
418                        "PE": "Prince-Edward Island",
419                        "QC": "Quebec",
420                        "SK": "Saskatchewan",
421                        "YK": "Yukon"
422                    }
423                },
424                "required": 0
425            }
426        },
427        "customer_postal_zip": {
428            "value": "",
429            "define": {
430                "mask": "simple",
431                "layout": {
432                    "staff": {
433                        "invoice": 1,
434                        "form": 1,
435                        "required": 0
436                    },
437                    "customer": {
438                        "invoice": 1,
439                        "form": 1,
440                        "required": 0
441                    },
442                    "sys": 0,
443                    "lbl": "Postal code",
444                    "type": "text",
445                    "customer_address": true
446                },
447                "required": 0
448            }
449        },
450        "note": {
451            "value": "",
452            "define": {
453                "layout": {
454                    "staff": {
455                        "invoice": 0,
456                        "form": 1,
457                        "required": 0
458                    },
459                    "customer": {
460                        "invoice": 0,
461                        "form": 1,
462                        "required": 0
463                    },
464                    "sys": 1,
465                    "lbl": "Note",
466                    "type": "textarea"
467                },
468                "required": 0
469            }
470        }
471    }
472}