Skip to content

OfferBundles and offers

What is offerBundle and offer

In general, offers deliver all information a guest needs to make a decision to actually buy the product with certain options and given times. There can be several offer-bundles in the response and the guest always chooses a full bundle (not a single offer). A bundle will always cover the full group and make sure they stay together (for example the same route or same rafting trip).

An Offerbundle contains a list of offers for each traveler and the total price information about it.

An Offer contains all information from the provider's system about the product for a single unit of the offerBundle (usually it corresponds to a traveler). Model defintion for Offerbundle and Offer : see here

Where to use offerBundle

OfferBundle can be used for:

How to work with offerBundle

Get the offerBundle

First of all it is necessary to get offers

Before you start it's important to know that products with PotentialAction.AdditionalType = Offers can be ordered only through the offers endpoint. At the same time product without that potential action can be ordered only with order/order-item endpoint (offerBundleId will be assigned automatically under the hood and must be used for the order-item update)

To get offers there are 2 ways (depending on the potential action of the product):

  • find offerBundle manually
  • provide product configuration with orderItem create/update request, then offerBundle will be searched and assigned automatically.

Get offerBundle with find offer endpoint

Info

Some products don't require travelers information during getting of the offer. However, if you decide to use this offerBundle, then required information must be provided later or at this stage. Required for offering fields have RequiredForOffers = true

Get offerBundle with productIdentifier

To get offers it's not necessary to know what product variant is needed. It's possible to provide productIdentifier and offers will be search among all product variant inside of this product. To get more specific offers it's possible to use optionValueIdentifier array which contains value identifier of the options.

POST https://api.discover.swiss/test/b2bmarket/v1/orders/{orderNumber}/offers
{
    "productIdentifier":"tom_tds00020013518617825",
    "dateFrom": "2022-09-20T00:00:00",
    "dateUntil": "2022-09-21T00:00:00",
    "numberOfTravelers": 1,
    "optionValueIdentifier": ["Rate_09:00 Uhr"]
}
POST https://api.discover.swiss/test/b2bmarket/v1/orders/{orderId}/offers
{
    "validationMessages": [],
    "offerBundle": [
        {
            "id": "40d0d443-3264-4181-a3f8-2b5fc7b0bfbd_252fbc86-4e45-42e1-ae2d-5bc7757dcb2c",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518621336_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518621336_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Kind (0-12 Jahre)",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518621336/TDS00020010010367324/TDS00020013518685558.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigifffi",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigifffi"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Kind",
                            "name": "Name",
                            "value": "Kind",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-19T22:00:00+00:00",
                "validUntil": "2022-09-20T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 25.0,
            "totalPriceCHF": 25.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T21:00:08.3248287+00:00",
            "offer": [
                {
                    "id": "6f4b16dd-6483-46f9-a8d4-a07a5713c20f",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Kind (0-12 Jahre)",
                    "priceInformation": "0-12 Jahre",
                    "price": 25.0,
                    "priceCHF": 25.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "40d0d443-3264-4181-a3f8-2b5fc7b0bfbd_b0ae6808-613c-4788-b2d7-9886fe6f9c61",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518617826_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518617826_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Adult",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518617826/TDS00020010010367324/TDS00020013518685526.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigiffcg",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigiffcg"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Erwachsener",
                            "name": "Name",
                            "value": "Adult",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-19T22:00:00+00:00",
                "validUntil": "2022-09-20T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 50.0,
            "totalPriceCHF": 50.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T21:00:08.3248454+00:00",
            "offer": [
                {
                    "id": "5dc4f871-bf6f-478e-8754-b9c0fb986b6c",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Adult",
                    "priceInformation": "",
                    "price": 50.0,
                    "priceCHF": 50.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "40d0d443-3264-4181-a3f8-2b5fc7b0bfbd_77e5adac-011f-49b3-8fed-0458a4d864cc",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518621336_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518621336_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Kind (0-12 Jahre)",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518621336/TDS00020010010367324/TDS00020013518685558.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigifffi",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigifffi"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Kind",
                            "name": "Name",
                            "value": "Kind",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-19T22:00:00+00:00",
                "validUntil": "2022-09-21T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 25.0,
            "totalPriceCHF": 25.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T21:00:08.324856+00:00",
            "offer": [
                {
                    "id": "71914ed8-fbcf-48aa-a931-f684cd33a0ee",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Kind (0-12 Jahre)",
                    "priceInformation": "0-12 Jahre",
                    "price": 25.0,
                    "priceCHF": 25.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "40d0d443-3264-4181-a3f8-2b5fc7b0bfbd_c767bd18-3f71-4306-b947-4e5b5dd38652",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518617826_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518617826_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Adult",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518617826/TDS00020010010367324/TDS00020013518685526.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigiffcg",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigiffcg"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Erwachsener",
                            "name": "Name",
                            "value": "Adult",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-19T22:00:00+00:00",
                "validUntil": "2022-09-21T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 50.0,
            "totalPriceCHF": 50.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T21:00:08.3248661+00:00",
            "offer": [
                {
                    "id": "f3e69e7d-35b4-410d-b0ce-a54ea60dc6b1",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Adult",
                    "priceInformation": "",
                    "price": 50.0,
                    "priceCHF": 50.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "40d0d443-3264-4181-a3f8-2b5fc7b0bfbd_d7fb7dd5-35b0-4fbc-82ae-cafbe2c1334b",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518621336_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518621336_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Kind (0-12 Jahre)",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518621336/TDS00020010010367324/TDS00020013518685558.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigifffi",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigifffi"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Kind",
                            "name": "Name",
                            "value": "Kind",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-20T22:00:00+00:00",
                "validUntil": "2022-09-21T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 25.0,
            "totalPriceCHF": 25.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T21:00:08.3248762+00:00",
            "offer": [
                {
                    "id": "668dfea0-1707-4ce1-8aa8-3962d13e8bad",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Kind (0-12 Jahre)",
                    "priceInformation": "0-12 Jahre",
                    "price": 25.0,
                    "priceCHF": 25.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "40d0d443-3264-4181-a3f8-2b5fc7b0bfbd_691cf9bc-637f-4251-8978-68e59d57e6de",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518617826_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518617826_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Adult",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518617826/TDS00020010010367324/TDS00020013518685526.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigiffcg",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigiffcg"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Erwachsener",
                            "name": "Name",
                            "value": "Adult",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-20T22:00:00+00:00",
                "validUntil": "2022-09-21T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 50.0,
            "totalPriceCHF": 50.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T21:00:08.3248867+00:00",
            "offer": [
                {
                    "id": "30d0a0a2-277d-4edd-a3f7-4773702e1178",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Adult",
                    "priceInformation": "",
                    "price": 50.0,
                    "priceCHF": 50.0,
                    "currency": "CHF"
                }
            ]
        }
    ]
}
Get offerBundle with productVariantIdentifier

When it is known what product variant is necessary to use for offering then it's worth to use productVariantIdentifier property.

POST https://api.discover.swiss/test/b2bmarket/v1/orders/{orderNumber}/offers
{
    "productVariantIdentifier": "tom_tds00020013518617826_tbx00020010001912441",
    "dateFrom": "2022-09-20T00:00:00",
    "dateUntil": "2022-09-21T00:00:00",
    "numberOfTravelers": 1
}
POST https://api.discover.swiss/test/b2bmarket/v1/orders/{orderId}/offers
{
    "validationMessages": [],
    "offerBundle": [
        {
            "id": "5041a22c-d9c6-4772-8e0d-bafb28336638_44e70517-8005-40d2-b21f-6460b5965a90",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518617826_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518617826_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Adult",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518617826/TDS00020010010367324/TDS00020013518685526.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigiffcg",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigiffcg"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Erwachsener",
                            "name": "Name",
                            "value": "Adult",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-19T22:00:00+00:00",
                "validUntil": "2022-09-20T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 50.0,
            "totalPriceCHF": 50.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T20:53:13.6409391+00:00",
            "offer": [
                {
                    "id": "8421d5cc-fcbb-46c6-aff9-d9f2d9335941",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Adult",
                    "priceInformation": "",
                    "price": 50.0,
                    "priceCHF": 50.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "5041a22c-d9c6-4772-8e0d-bafb28336638_3fd33586-6ae9-4260-8254-dd5617eb34a2",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518617826_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518617826_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Adult",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518617826/TDS00020010010367324/TDS00020013518685526.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigiffcg",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigiffcg"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Erwachsener",
                            "name": "Name",
                            "value": "Adult",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-19T22:00:00+00:00",
                "validUntil": "2022-09-21T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 50.0,
            "totalPriceCHF": 50.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T20:53:13.6409666+00:00",
            "offer": [
                {
                    "id": "32b2fbf3-e078-4c6c-87cd-a49ecf823c4c",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Adult",
                    "priceInformation": "",
                    "price": 50.0,
                    "priceCHF": 50.0,
                    "currency": "CHF"
                }
            ]
        },
        {
            "id": "5041a22c-d9c6-4772-8e0d-bafb28336638_b08e0cb1-7928-4bf5-b832-24508343d477",
            "productConfiguration": {
                "product": {
                    "identifier": "tom_tds00020013518617826_tbx00020010001912441",
                    "productIdentifier": "tom_tds00020013518617825",
                    "@product": "https://api.discover.swiss/dev/info/products/tom_tds00020013518617825",
                    "sku": "tom_tds00020013518617826_tbx00020010001912441",
                    "name": "Murmeltiere auf der Motta (TEST Discover Swiss),  Adult",
                    "image": {
                        "caption": "Marmots",
                        "dataGovernance": {
                            "provider": {
                                "acronym": "tom",
                                "name": "TOMAS",
                                "logo": {
                                    "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                    "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                                },
                                "link": [
                                    {
                                        "url": "https://www.tomas.ch",
                                        "type": "WebHomepage"
                                    }
                                ]
                            }
                        },
                        "contentUrl": "http://cdn.tomas-travel.com/tds/repository/TDS00020013518617826/TDS00020010010367324/TDS00020013518685526.jpg",
                        "thumbnailUrl": "https://media-dev.discover.swiss/image/img_942_9t8aaacaabdfbigiffcg",
                        "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_9t8aaacaabdfbigiffcg"
                    },
                    "option": [
                        {
                            "identifier": "Name",
                            "valueIdentifier": "Name_Erwachsener",
                            "name": "Name",
                            "value": "Adult",
                            "position": 0
                        },
                        {
                            "identifier": "Rate",
                            "valueIdentifier": "Rate_09:00 Uhr",
                            "name": "Time",
                            "value": "09:00 a.m.",
                            "position": 0
                        }
                    ],
                    "dataGovernance": {
                        "provider": {
                            "acronym": "tom",
                            "name": "TOMAS",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tom.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_942_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.tomas.ch",
                                    "type": "WebHomepage"
                                }
                            ]
                        },
                        "source": {
                            "acronym": "tessvm",
                            "name": "Tourism Engadin Scuol Samnaun Val Müstair AG",
                            "logo": {
                                "contentUrl": "https://cdn.discover.swiss/logos/tessvm.png",
                                "@id": "https://api.discover.swiss/dev/info/imageObjects/img_9u88l2_14w4"
                            },
                            "link": [
                                {
                                    "url": "https://www.engadin.com",
                                    "type": "WebHomepage"
                                }
                            ]
                        }
                    }
                },
                "validFrom": "2022-09-20T22:00:00+00:00",
                "validUntil": "2022-09-21T21:59:59+00:00",
                "numberOfTravelers": 1,
                "offerTerm": [
                    {
                        "termsOfCancellation": "If the reservation is cancelled, modified or in case of no-show, the total price of the reservation will be charged.",
                        "termsOfPayment": "The total payment of the reservation is required at the time of booking."
                    }
                ]
            },
            "totalPrice": 50.0,
            "totalPriceCHF": 50.0,
            "currency": "CHF",
            "expiresAt": "2022-08-18T20:53:13.6409771+00:00",
            "offer": [
                {
                    "id": "83c4897f-e152-49e2-be1b-5f9ef36c92ea",
                    "title": "Murmeltiere auf der Motta (TEST Discover Swiss) Adult",
                    "priceInformation": "",
                    "price": 50.0,
                    "priceCHF": 50.0,
                    "currency": "CHF"
                }
            ]
        }
    ]
}

Get offerBundle during the orderItem placement

It is possible to get offerBundle during the creation of the orderItem. For that it is necessary to declare full product configuration in the orderItem defintion withour providing of offerBundleId.

{
    "orderQuantity": 1,
    "orderedItem": {
        "product": {
            "identifier": "nova_zurichcard72"
        },
        "validFrom": "2021-10-15T00:00:00",
        "traveler": [
            {
                "identifier": "jhon",
                "birthDate": "1980-02-18",
                "givenName": "Jhon",
                "familyName": "Smith",
                "gender": "Male"
            },
            {
                "identifier": "jessika",
                "birthDate": "1979-02-18T15:00:00",
                "givenName": "Jessika",
                "familyName": "Smith",
                "gender": "Female"
            }
        ]
    }
}
POST https://api.discover.swiss/test/b2bmarket/v1/orders/{orderId}/items
{
    "orderItem": {
        "orderItemNumber": "21-102000-1",
        "orderItemStatus": "Placed",
        "orderQuantity": 1,
        "orderedItem": {
            "product": {
                "identifier": "nova_zurichcard72",
                "productIdentifier": "nova_zurichcard",
                "sku": "898",
                "name": "ZVV Zürich Card, ZVV Zürich Card 72 hours",
                "dataGovernance": {
                    "provider": {
                        "acronym": "sbb"
                    },
                    "term": {
                        "code": "ZHT-AGB|ZHT-DPP"
                    },
                    "source": {
                        "acronym": "zht"
                    }
                },
                "priceList": [
                    {
                        "priceCHF": 37.0,
                        "maxAllowedAge": 15,
                        "minAllowedAge": 5
                    },
                    {
                        "priceCHF": 53.0,
                        "maxAllowedAge": 2500,
                        "minAllowedAge": 15
                    }
                ],
                "taxRate": 0.077
            },
            "validFrom": "2021-10-15T00:00:00+00:00",
            "traveler": [
                {
                    "priceCHF": 53.0,
                    "identifier": "jhon",
                    "gender": "Male"
                    "givenName": "Jhon",
                    "familyName": "Smith",
                    "birthDate": "1980-02-18T00:00:00"
                },
                {
                    "priceCHF": 53.0,
                    "identifier": "jessika",
                    "gender": "Female",
                    "givenName": "Jessika",
                    "familyName": "Smith",
                    "birthDate": "1979-02-18T00:00:00"
                }
            ]
        },
        "orderDelivery": "e-ticket",
        "amount": 106.0,
        "amountCHF": 106.0,
        "taxRate": 8.161999999999999,
        "taxCHF": 8.161999999999999,
        "ticket": [],
        "offerBundleId": "2ecd1d56-e058-425d-8847-4190c10ebd11"
    },
    "validationMessages": [],
    "itemOffer": []
}

How to apply offerBundle

Once you have an offerBundle, you can use its offerBundleId to create/update a new orderItem.

Tip

OfferBundleId can be used in only one orderItem.

Information

It is necessary to provide only required properties for travelers fields and then there is still a possibility to update travelers during adding/updating of OI.
To do so, you must provide the same travelers identifiers that sent in the request to get the offer or offerBundle and attached with the offerBundleId in orderItem. Read more

{
    "orderQuantity": 1,
    "offerBundleId":"9293c9dc-2180-4e6d-bc73-bfb3db8e6da1",
    "orderedItem": {
        "traveler": [
            {
                "identifier": "jhon",
                "birthDate": "1980-02-18",
                "givenName": "Jhon",
                "familyName": "Smith",
                "gender": "Male"
            },
            {
                "identifier": "jessika",
                "birthDate": "1979-02-18T15:00:00",
                "givenName": "Jessika",
                "familyName": "Smith",
                "gender": "Female"
            }
        ]
    }
}
POST https://api.discover.swiss/test/b2bmarket/v1/orders/{orderId}/items
{
    "orderItem": {
        "orderItemNumber": "21-102000-2",
        "orderItemStatus": "Placed",
        "orderQuantity": 1,
        "orderedItem": {
            "product": {
                "identifier": "nova_zurichcard72",
                "productIdentifier": "nova_zurichcard",
                "sku": "898",
                "name": "ZVV Zürich Card, ZVV Zürich Card 72 hours",
                "dataGovernance": {
                    "provider": {
                        "acronym": "sbb"
                    },
                    "term": {
                        "code": "ZHT-AGB|ZHT-DPP"
                    },
                    "source": {
                        "acronym": "zht"
                    }
                },
                "priceList": [
                    {
                        "priceCHF": 37.0,
                        "maxAllowedAge": 15,
                        "minAllowedAge": 5
                    },
                    {
                        "priceCHF": 53.0,
                        "maxAllowedAge": 2500,
                        "minAllowedAge": 15
                    }
                ],
                "taxRate": 0.077
            },
            "validFrom": "2021-10-15T00:00:00+00:00",
            "traveler": [
                {
                    "priceCHF": 53.0,
                    "identifier": "jhon",
                    "givenName": "Jhon",
                    "familyName": "Smith",
                    "birthDate": "1980-02-18T00:00:00"
                },
                {
                    "priceCHF": 53.0,
                    "identifier": "jessika",
                    "birthDate": "1979-02-18T00:00:00"
                }
            ]
        },
        "orderDelivery": "e-ticket",
        "amount": 106.0,
        "amountCHF": 106.0,
        "taxRate": 8.161999999999999,
        "taxCHF": 8.161999999999999,
        "ticket": [],
        "offerBundleId": "9293c9dc-2180-4e6d-bc73-bfb3db8e6da1"
    },
    "validationMessages": [],
    "itemOffer": []
}

Single offerBundle

When adding orderItem there is only one offerBundle, then this offerBundle will be selected automatically.

Multiple offer bundles

When adding orderItem there are several offerBundle, then they will be returned in the response together with order/orderItem. The orderItem will be in Checkout status until the selection of offerBundleId.

Warning

Currently, there are no products which return multiple offers during adding of the orderItem.

Here is an example of how order's response looks when the multiple offerBundles returned

{
  "Order": {
    "OrderNumber": "1",
    "OrderDate": "2021-07-02T00:00:00+00:00",
    "Customer": {
      "ProfileId": "valid",
      "AdditionalName": "",
      "Address": {
        "AddressCountry": "CH",
        "AddressLocality": "Buchs",
        "AddressRegion": "St. Gallen",
        "PostalCode": "9470",
        "StreetAddress": "Heldaustrasse 43"
      },
      "Email": "testmail@test.ch",
      "FamilyName": "Hermes",
      "FaxNumber": "0123456789",
      "Gender": "Male",
      "GivenName": "Marianne",
      "Nationality": "Swiss",
      "BirthDate": "1978-01-01",
      "Telephone": "0123456789",
      "IsGuest": "True",
      "CreatedDateTime": "2019-09-18T02:00:00-06:00",
      "LastModified": "2019-09-18T04:00:00-06:00"
    },
    "OrderStatus": "Checkout",
    "PriceCurrency": "CHF",
    "TotalAmount": 0.0,
    "TotalAmountCHF": 0.0,
    "TotalTaxCHF": 0.0,
    "Language": "de",
    "OrderedItem": [
      {
        "OrderItemNumber": "1-1",
        "OrderItemStatus": "Checkout",
        "OrderQuantity": 1,
        "OrderedItem": {
          "Product": {
            "Identifier": "some_multiple_offer_product",
            "ProductIdentifier": "some_offer_product",
            "@product": "{{ infoUrl }}/products/some_offer_product",
            "Sku": "102",
            "Name": "Sbb product with multiple offers",
            "DataGovernance": {
              "Provider": {
                "Acronym": "SBB"
              },
              "Term": {
                "Code": "ZHT-AGB"
              },
              "Source": {
                "Acronym": "ZHT"
              }
            },
            "PriceList": [
              {
                "PriceCHF": 19,
                "MinAllowedAge": 5,
                "MaxAllowedAge": 15
              },
              {
                "PriceCHF": 27,
                "MinAllowedAge": 15,
                "MaxAllowedAge": 2500
              }
            ],
            "TaxRate": 0.0
          },
          "ValidFrom": "2021-05-06T00:00:00", 
          "Traveler": [
            {
              "Identifier": "paxa",
              "gender": "Male",
              "GivenName": "James",
              "FamilyName": "Bond",
              "BirthDate": "1990-02-18T00:00:00"
            }
          ]
        },
        "OrderDelivery": "e-ticket",
        "Amount": 0.0,
        "AmountCHF": 0.0,
        "TaxRate": 0.0,
        "TaxCHF": 0.0,
        "Ticket": []
      }
    ],
    "Term": [],
    "PartnerAcronym": "someAcronym",
    "ProfileId": "valid",
    "@id": "https://api.discover.swiss/test/b2bmarket/v1/orders/21-102000",
    "CreatedDateTime": "2021-07-01T18:00:00-06:00", 
    "LastModified": "2021-07-01T18:00:00-06:00" 
  },
  "ValidationMessages": [
    {
      "Level": "Warning",
      "Message": "Wählen Sie ein Angebot für die Bestellposition 1-1",
      "OrderItemNumber": "1-1"
    }
  ],
  "ItemOffer": [
    {
      "productConfiguration": {
        "product": {
          "identifier": "some_multiple_offer_product",
          "productIdentifier": "some_offer_product",
          "@product": "{{ infoUrl }}/products/some_offer_product",
          "sku": "777",
          "name": "Sbb product with multiple offers",
          "dataGovernance": {
            "provider": {
              "acronym": "SBB"
            },
            "term": {
              "code": "ZHT-AGB"
            },
            "source": {
              "acronym": "ZHT"
            }
          },
          "priceList": [
            {
              "priceCHF": 19,
              "minAllowedAge": 5,
              "maxAllowedAge": 15
            },
            {
              "priceCHF": 27,
              "minAllowedAge": 15,
              "maxAllowedAge": 2500
            }
          ],
          "taxRate": 0.0
        },
        "validFrom": "2021-09-06T00:00:00",
        "traveler": [
          {
            "PriceCHF": 27.0,
            "gender": "Male",
            "identifier": "paxa",
            "givenName": "James",
            "familyName": "Bond",
            "birthDate": "1990-02-18T00:00:00"
          }
        ]
      },
      "orderItemNUmber": "1-1",
      "offerBundle": [
        {
          "id": "96d78195-49d7-43ad-89c9-619e49e474dc",
          "totalPrice": 2700,
          "currency": "CHF",
          "expiresAt": "2021-08-11T18:18:49", 
          "offer": [
            {
              "id": "088ffebd-bbc7-43bd-a9b9-4731bfd57e75", 
              "expiresAt": "2021-08-11T18:18:49",
              "title": "Product which provide multiple offers",
              "description": ".\tProduct with alternatives",
              "travelerId": "paxa",
              "price": 2700,
              "currency": "CHF"
            }
          ]
        },
        {
          "id": "9f23ce05-552c-4e40-8222-cd1cc6421bcc",
          "totalPrice": 2800,
          "currency": "CHF",
          "expiresAt": "2021-08-11T18:18:49", 
          "offer": [
            {
              "id": "180c5048-bd18-48fd-8891-6afbea58f3cd", 
              "expiresAt": "2021-08-11T18:18:49",
              "title": "Product which provide multiple offers",
              "description": ".\tProduct with alternatives",
              "travelerId": "paxa",
              "price": 2800,
              "currency": "CHF"
            }
          ]
        }
      ]
    }
  ]
}

Offer's time limit "Expiration"

Each offerBundle and offer contains expiredAt property which indicates the expiration time of the offer. If any of the offers inside of the offerBundle expires, then offerBundle is also expired.

When the offer bundle/offer expired, it will try to refresh the orderItem automatically - that means that the system will try to get a new offerBundle with the same set of parameters and teh same price and replace the expired offer in the order item. If offerBundle cannot be refreshed then it is not possible to continue to work with that orderedItem. See: updating of an order or updating an orderItem

Warning

If an offerBundle expires after the order has been paid and the order item cannot be automatically refreshed, then the order-items's status will be changed to fulfillment error and the money for this orderItem will not be charged.


Last update: February 1, 2024 17:37:15