Skip to content

Tickets

Get the tickets.

Parent/Child tickets

There are two ticket types. Some of the order items can create several tickets. In this case some of them called 'child ticket' and have ParentTicketIdentifier property which define their parent. Parent ticket collects and contains all important information about child tickets inside AdditionalProperty list. Child ticket contain info only about itself and can lack some info about orderitem.

E-Mail to the customer/guest

Successfully finishing the fulfillment stage, triggers the issuing of the tickets and the server sends an e-mail to the customer which contains related the information.

Polling the order

The client can poll the order and can check its status.

 GET https://api.discover.swiss/test/b2bmarket/v1/orders/{orderNumber}

Note

The order is ready to get tickets if it has reached orderStatus = Delivered or Fulfilled (which is passed Delivered)

Delivered: the order holds information about all ticket including the URL to directly accessing it (ticketToken) and the qr-code (qrCodeToken).
Fulfilled: in addition to delivered, in this state the mail to the guest and the update to connected CRMs is done as well. FulfillmentError: in this case something was not successful and you can find information in orderItem.StatuesText

Get all tickets of an order as json download

After the fulfillment of the order all data needed to display the tickets in the App (the same information like on the pdf ticket) can be downloaded as json without authentication.
The url is passed to the mail (orderToken property) so a link can be placed in the mail to call the app and pass the download url.

Dataformat see Orderinfo download

download order tickets sample

{
    "orderNumber": "20-107699",
    "orderDate": "2020-12-10T20:13:51.9800292+00:00",
    "@id": "https://api.discover.swiss/test/profile/orders/20-107699",
    "customer": {
        "email": "ordertest@gmail.com",
        "familyName": "Eggenberger",
        "givenName": "Christian",
        "gender": "Male",
        "birthDate": "1967-12-07T00:00:00"
    },
    "orderStatus": "Fulfilled",
    "priceCurrency": "CHF",
    "totalAmount": 27.0,
    "totalAmountCHF": 27.0,
    "mailBodyToken": "https://discoverswistestbusiness.blob.core.windows.net/mailbodies/07dcc9fc-403b-42ca-8b59-6d15e5aa8844_20-107699.html",
    "language": "de",
    "ticket": [
        {
            "name": "SBB - ZVV Zürich Card 24 Stunden",
            "orderNumber": "20-107699",
            "orderItemNumber": "20-107699-1",
            "product": {
                "@id": "https://api.discover.swiss/test/info/products/SBB_zurichcard24",
                "identifier": "SBB_zurichcard24"
            },  
            "additionalType": "e-ticket",
            "ticketNumber": "640374080",
            "ticketTokenId": "256754788543",
            "bookingNumber": "640374080",
            "ticketToken": "https://discoverswistestbusiness.blob.core.windows.net/tickets/7c36341a-855a-4119-95b7-4b3ecff8eaa6_nr_256754788543.pdf",
            "qrCodeToken": "https://discoverswistestbusiness.blob.core.windows.net/qrcodes/f26dd17b-ca36-454e-b65a-62adbaa9a743_nr_256754788543.png",
            "htmlToken": "https://discoverswistestbusiness.blob.core.windows.net/htmls/f41ed5b1-034e-4db2-97c7-18fef39356e3_nr_256754788543.html",
            "dateIssued": "2020-12-10T20:14:32.4031913+00:00",
            "priceCurrency": "CHF",
            "totalPrice": 27.0,
            "underName": {
                "givenName": "SBB",
                "familyName": "Tester",
                "birthDate": "1967-12-07T00:00:00"
            },  
            "validFrom": "2020-12-29T09:00:00+00:00",
            "validUntil": "2020-12-29T09:00:00+00:00"
        }
    ],
    "errorTicket": [
        {
            "name": "ZVV Zürich Card 24h",
            "underName": {
                "givenName": "## failure ##",
                "familyName": "Problem",
                "birthDate": "2001-02-18T00:00:00"
            },
            "validFrom": "2020-02-22T05:15:00+00:00",
            "orderItemNumber": "20-100145-2"
        }
    ]
}


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