订单选项例子

如何在表格中实施订单选项.

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": []
},
订单元素实现
选择接送酒店和时间
DEMO环境中的示例产品

Product UUID : 8beacd85-51b3-55f3-880a-ee52f1f113f2
Product Type UUID : 211e7d28-a368-57ae-a406-f904c33cef51
Sample product in the DEMO environment

Product UUID : 8beacd85-51b3-55f3-880a-ee52f1f113f2
Product Type UUID : 211e7d28-a368-57ae-a406-f904c33cef51
创建订单请求样本

"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": []
},
订单元素实现
请选择您要使用的入口. Can select more than one
DEMO环境中的示例产品

Product UUID : f9d5a777-4a58-5fd7-b5d6-b3ac2bb5a02b
Product Type UUID : 4dd361a3-a964-597a-8a99-06b2a2ca9224
创建订单请求样本
"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
        }
    ]
},
订单元素实现(对于每个pax)
客人年龄 请提供每位客人的年龄。
DEMO环境中的示例产品

Product UUID : f9d5a777-4a58-5fd7-b5d6-b3ac2bb5a02b
Product Type UUID : 4dd361a3-a964-597a-8a99-06b2a2ca9224
为2人创建订单请求的示例
"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
        }
    ]
},
订单元素实现(对于每个pax)
客人名字 如护照上所示
DEMO环境中的示例产品

Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
为2人创建订单请求的示例
"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
        }
    ]
},
订单元素实现(对于每个pax)
免费午餐?
DEMO环境中的示例产品

Product UUID : fcc8b273-f744-5af4-8115-61f0ff72c326
Product Type UUID : e7f15ee4-ae02-5c59-b202-9e4fff59f2db
为2人创建订单请求的示例
"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
        }        
    ]
},
订单元素实现
出生日期
DEMO环境中的示例产品

Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
为2人创建订单请求的示例
"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
        }
    ]
}
订单元素实现
客人照片 要发布个性化票证,供应商需要客人照片作为jpg
DEMO环境中的示例产品

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
        }
    ]
}
订单元素实现
送货地址
DEMO环境中的示例产品

Product UUID : b32945ad-29db-570f-96a1-0ff058f35481
Product Type UUID : c28b2938-a13b-51d0-9a40-a7649c18da84
为2人创建订单请求的示例
"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": []
}
订单元素实现
出游时间
DEMO环境中的示例产品

Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
创建订单请求样本

"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": []
}
订单元素实现
出游日期时间
DEMO环境中的示例产品

Product UUID : b32945ad-29db-570f-96a1-0ff058f35481
Product Type UUID : c28b2938-a13b-51d0-9a40-a7649c18da84
创建订单请求样本

"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
        }
    ]
}
订单元素实现(对于每个pax)
国籍
DEMO环境中的示例产品

Product UUID : ec1897a3-86fb-525c-914b-bfe39a4d5396
Product Type UUID : 5f775003-4111-565d-a3d2-568e7ec57506
为2人创建订单请求的示例
"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": []
}
订单元素实现
飞机航班编号
DEMO环境中的示例产品

Product UUID : b32945ad-29db-570f-96a1-0ff058f35481
Product Type UUID : c28b2938-a13b-51d0-9a40-a7649c18da84
创建订单请求样本

"options": {
    "perBooking": [
        {
            "uuid": "ef821931-a865-42bb-bfb4-361b93b0e646",
            "value": "SQ1234"
        }
    ],
    "perPax": []
},