How-to implement booking options in forms.
Type 1: List
"options": {
"perBooking": [
{
"uuid": "0062a019-9924-4d02-bb19-614d746c24a6",
"name": "Select pickup hotel and time",
"description": "",
"required": true,
"formatRegex": null,
"inputType": 1,
"validFrom": null,
"validTo": null,
"items": [
{
"label": "(09:00) Hotel Hilton",
"value": "(09:00) Hotel Hilton"
},
{
"label": "(09:30) Hotel Mariott",
"value": "(09:30) Hotel Mariott"
}
]
}
],
"perPax": []
},
form element implementation
Select pickup hotel and time
Sample product in the DEMO environment
Product UUID : 8beacd85-51b3-55f3-880a-ee52f1f113f2
Product Type UUID : 211e7d28-a368-57ae-a406-f904c33cef51
Example of Create Booking request
"options": {
"perBooking": [
{
"uuid": "0062a019-9924-4d02-bb19-614d746c24a6",
"value": "(09:30) Hotel Mariott"
}
],
"perPax": []
},
Type 2: List multiple
"options": {
"perBooking": [
{
"uuid": "46db421e-5727-46fc-9f2c-10679e026582",
"name": "Please select which entrance you want to use",
"description": "Can select more than one",
"required": true,
"formatRegex": null,
"inputType": 2,
"validFrom": null,
"validTo": null,
"items": [
{
"label": "Entrance 1",
"value": "1"
},
{
"label": "Entrance 2",
"value": "2"
},
{
"label": "Entrance 3",
"value": "3"
},
{
"label": "Entrance 4",
"value": "4"
}
]
}
],
"perPax": []
},
form element implementation
Please select which entrance you want to use.
Can select more than one
Sample product in the DEMO environment
Product UUID : f9d5a777-4a58-5fd7-b5d6-b3ac2bb5a02b
Product Type UUID : 4dd361a3-a964-597a-8a99-06b2a2ca9224
Example of Create Booking request
"options": {
"perBooking": [
{
"uuid": "46db421e-5727-46fc-9f2c-10679e026582",
"value": "1"
}
],
"perPax": []
},
Type 3: Number
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "543f0e45-bdfe-4dc7-af73-e7fd5eda8246",
"name": "Guest age",
"description": "Please provide age of each guest.",
"required": true,
"formatRegex": null,
"inputType": 3,
"validFrom": null,
"validTo": null
}
]
},
form element implementation (foreach pax as it is "per pax" option)
Guest age
Please provide age of each guest.
Sample product in the DEMO environment
Product UUID : f9d5a777-4a58-5fd7-b5d6-b3ac2bb5a02b
Product Type UUID : 4dd361a3-a964-597a-8a99-06b2a2ca9224
Example of Create Booking request for 2 pax
"options": {
"perBooking": [],
"perPax": [
[
{
"uuid":"543f0e45-bdfe-4dc7-af73-e7fd5eda8246",
"value":20
}
],
[
{
"uuid":"543f0e45-bdfe-4dc7-af73-e7fd5eda8246",
"value":10
}
]
]
},
Type 4: String
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "f056a776-1076-4f6d-9008-378d8edb08be",
"name": "Full name",
"description": "as shown on passport",
"required": true,
"formatRegex": null,
"inputType": 4,
"validFrom": null,
"validTo": null
}
]
},
form element implementation (foreach pax as it is "per pax" option)
Full name
as shown on passport
Sample product in the DEMO environment
Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
Example of Create Booking request for 2 pax
"options": {
"perBooking": [],
"perPax": [
[
{
"uuid":"f056a776-1076-4f6d-9008-378d8edb08be",
"value":"Tester Tester 1"
}
],
[
{
"uuid":"f056a776-1076-4f6d-9008-378d8edb08be",
"value":"Tester Tester 2"
}
]
]
},
Type 5: Boolean
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "ed45c24b-0518-49ee-b60a-93e6e60a237a",
"name": "Free lunch",
"description": "Supplier offers free lunch.",
"required": true,
"formatRegex": null,
"inputType": 5,
"validFrom": null,
"validTo": null
}
]
},
form element implementation (foreach pax as it is "per pax" option)
Free lunch?
Sample product in the DEMO environment
Product UUID : fcc8b273-f744-5af4-8115-61f0ff72c326
Product Type UUID : e7f15ee4-ae02-5c59-b202-9e4fff59f2db
Example of Create Booking request for 2 pax
"options": {
"perBooking": [],
"perPax": [
[
{
"uuid":"ed45c24b-0518-49ee-b60a-93e6e60a237a",
"value":true
}
],
[
{
"uuid":"ed45c24b-0518-49ee-b60a-93e6e60a237a",
"value":false
}
]
]
},
Type 6: Date (foreach pax as it is "per pax" option)
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "7d947dbe-c877-4d52-9da9-9014270b226d",
"name": "Date of birth",
"description": "",
"required": true,
"formatRegex": null,
"inputType": 6,
"validFrom": null,
"validTo": null
}
]
},
form element implementation
Date of birth
Sample product in the DEMO environment
Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
Example of Create Booking request for 2 pax
"options": {
"perBooking": [],
"perPax": [
[
{
"uuid":"7d947dbe-c877-4d52-9da9-9014270b226d",
"value":"1999-09-09"
}
],
[
{
"uuid":"7d947dbe-c877-4d52-9da9-9014270b226d",
"value":"2001-08-08"
}
]
]
},
Type7 & 8: Image (file) (foreach pax as it is "per pax" option)
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "eec6cfc0-a722-43ad-b1b2-207e44cf54a4",
"name": "Guest photo",
"description": "To issue a personalised ticket, supplier needs guest photo as jpg",
"required": true,
"formatRegex": null,
"inputType": 8,
"validFrom": null,
"validTo": null
}
]
}
form element implementation
Guest photo
To issue a personalised ticket, supplier needs guest photo as jpg
Sample product in the DEMO environment
Product UUID : 01504e4e-128c-59d1-93d2-9b50dbb5ed39
Product Type UUID : d4d84ded-d769-5147-8e00-21c0c2d67dac
Type 9: Address
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "a867ff62-1d3d-4378-9283-1a97804e8ac5",
"name": "Drop-off Address",
"description": "",
"required": true,
"formatRegex": null,
"inputType": 9,
"validFrom": null,
"validTo": null
}
]
}
form element implementation
Drop-off Address
Sample product in the DEMO environment
Product UUID : b32945ad-29db-570f-96a1-0ff058f35481
Product Type UUID : c28b2938-a13b-51d0-9a40-a7649c18da84
Example of Create Booking request for 2 pax
"options": {
"perBooking": [],
"perPax": [
[
{
"uuid":"a867ff62-1d3d-4378-9283-1a97804e8ac5",
"value":"121 Baker Street"
}
],
[
{
"uuid":"a867ff62-1d3d-4378-9283-1a97804e8ac5",
"value":"124 Baker Street"
}
]
]
},
Type 10: time
"options": {
"perBooking": [
{
"uuid": "fb42877b-b912-4d52-9da9-9014270b226d",
"name": "Arrival Time",
"description": "",
"required": true,
"formatRegex": null,
"inputType": 11,
"validFrom": null,
"validTo": null
}
],
"perPax": []
}
form element implementation
Arrival Time
Sample product in the DEMO environment
Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
Example of Create Booking request
"options": {
"perBooking": [
{
"uuid": "fb42877b-b912-4d52-9da9-9014270b226d",
"value": "09:30"
}
],
"perPax": []
},
Type 11: Datetime
"options": {
"perBooking": [
{
"uuid": "fb42877b-b912-40ae-9e53-b2c25294ea76",
"name": "Arrival Date/Time",
"description": "",
"required": true,
"formatRegex": null,
"inputType": 11,
"validFrom": null,
"validTo": null
}
],
"perPax": []
}
form element implementation
Arrival Date/Time
Sample product in the DEMO environment
Product UUID : b32945ad-29db-570f-96a1-0ff058f35481
Product Type UUID : c28b2938-a13b-51d0-9a40-a7649c18da84
Example of Create Booking request
"options": {
"perBooking": [
{
"uuid": "fb42877b-b912-4d52-9da9-9014270b226d",
"value": "2018-09-15 09:30"
}
],
"perPax": []
},
Type 12: String: country
"options": {
"perBooking": [],
"perPax": [
{
"uuid": "5f23acb4-a721-4c1f-8b76-49ad67b3eed7",
"name": "Nationality",
"description": "",
"required": true,
"formatRegex": null,
"inputType": 12,
"validFrom": null,
"validTo": null
}
]
}
form element implementation (foreach pax as it is "per pax" option)
Nationality
Sample product in the DEMO environment
Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
Example of Create Booking request for 2 pax
"options": {
"perBooking": [],
"perPax": [
[
{
"uuid":"5f23acb4-a721-4c1f-8b76-49ad67b3eed7",
"value":"Singapore"
}
],
[
{
"uuid":"5f23acb4-a721-4c1f-8b76-49ad67b3eed7",
"value":"Singapore"
}
]
]
},
Type 14: String: flight no
"options": {
"perBooking": [
{
"uuid": "ef821931-a865-42bb-bfb4-361b93b0e646",
"name": "Flight Number",
"description": "",
"required": true,
"formatRegex": "^[A-Z0-9][A-Z0-9][0-9]{0,4}$",
"inputType": 4,
"validFrom": null,
"validTo": null
}
],
"perPax": []
}
form element implementation
Flight Number
Sample product in the DEMO environment
Product UUID : b32945ad-29db-570f-96a1-0ff058f35481
Product Type UUID : c28b2938-a13b-51d0-9a40-a7649c18da84
Example of Create Booking request
"options": {
"perBooking": [
{
"uuid": "ef821931-a865-42bb-bfb4-361b93b0e646",
"value": "SQ1234"
}
],
"perPax": []
},