GetOffers
The products the customer can still add to an order
path Parameters
| orderId required | string |
Responses
Response samples
- 200
- 404
[- {
- "type": "LAST_MINUTE",
- "priceCents": 0,
- "coversDelays": true,
- "tracksTrains": true,
- "items": [
- {
- "priceCents": 0,
- "deadlineUtc": "string",
- "refundCents": 0,
- "refundPercent": 0,
- "isNonRefundable": true,
- "orderTicketId": 0
}
]
}
]CreatePurchase
Starts the payment of the products the customer chose. The prices come from the server, never from the request.
Request Body schema: application/json
| orderId required | string |
| types required | Array of strings (EAncillaryType) non-empty Items Enum: "LAST_MINUTE" "CFAR" "ZEN_RELAX" |
Responses
Request samples
- Payload
{- "orderId": "string",
- "types": [
- "LAST_MINUTE"
]
}Response samples
- 201
- 404
- 409
{- "purchaseId": "string",
- "paylineToken": "string"
}GetPurchase
Returns the payment status of a purchase, as the worker last read it from Payline: the popin callback runs in the browser and cannot be trusted.
path Parameters
| purchaseId required | string |
Responses
Response samples
- 200
- 404
{- "id": "string",
- "orderId": "string",
- "paymentStatus": "ACCEPTED"
}UpdatePaymentStatus
Records the payment status the worker read from Payline, activates the products once paid and sends the receipt. Admin only: a status sent by anyone else could activate products nobody paid for.
Authorizations:
path Parameters
| purchaseId required | string |
Request Body schema: application/json
| paymentStatus required | string (EPaymentStatus) Enum: "ACCEPTED" "REFUSED" "CANCELLED" "ERROR" "INPROGRESS" "ONHOLD_PARTNER" "PENDING_RISK" |
| code | string |
Responses
Request samples
- Payload
{- "paymentStatus": "ACCEPTED",
- "code": "string"
}Response samples
- 200
- 404
{- "isNotified": true,
- "paymentStatus": "ACCEPTED"
}SendReminder
Sends the email that offers the products the customer can still add to an order. Admin only: a worker job calls it after the booking.
Authorizations:
path Parameters
| orderId required | string |
Responses
Response samples
- 200
- 404
{- "reason": "string",
- "isSent": true
}GetAllStopGroups
Returns the list of all StopGroups.
Authorizations:
query Parameters
| providerId | number <double> |
Responses
Response samples
- 200
- 500
[- {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167,
- "transportTypes": [
- "bus",
- "train"
], - "stopClusters": [
- {
- "id": "c|FRavignon_@spg6j",
- "name": "Avignon",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d'Azur",
- "country": "FR",
- "latitude": 43.952499,
- "longitude": 4.804022
}
]
}
]GetStopGroup
Returns a StopGroup details.
Authorizations:
path Parameters
| stopGroupGpuid required | string Example: g|FRavignon_@spg3vp |
Responses
Response samples
- 200
- 404
- 500
{- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167,
- "transportTypes": [
- "bus",
- "train"
], - "stopClusters": [
- {
- "id": "c|FRavignon_@spg6j",
- "name": "Avignon",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d'Azur",
- "country": "FR",
- "latitude": 43.952499,
- "longitude": 4.804022
}
]
}Response samples
- 200
- 500
[- {
- "id": "c|FRangers__@gbrw5",
- "name": "Angers",
- "city": "Angers",
- "region": "Pays-de-la-Loire",
- "country": "FR",
- "latitude": 47.478419,
- "longitude": 0.563166,
- "transportTypes": [
- "bus",
- "train"
], - "stopGroups": [
- {
- "id": "g|FRangmaiec@gbrw5c",
- "name": "Angers Maitre Ecole",
- "city": "Angers",
- "region": "Pays-de-la-Loire",
- "country": "FR",
- "address": "21 Rue Louis Legendre, 49100 Angers, France",
- "latitude": 47.467,
- "longitude": 0.5322,
- "transportTypes": [
- "train"
]
}, - {
- "id": "g|FRangsaila@gbrw52",
- "name": "Angers Saint-Laud",
- "city": "Angers",
- "region": "Pays-de-la-Loire",
- "country": "FR",
- "address": "1 Esplanade De La Gare, 49100 Angers, France",
- "latitude": 47.46477,
- "longitude": 0.55693,
- "transportTypes": [
- "bus",
- "train"
]
}
]
}
]GetStopCluster
Returns a StopCluster details.
Authorizations:
path Parameters
| stopClusterGpuid required | string Example: c|FRangers__@gbrw5 |
Responses
Response samples
- 200
- 404
- 500
{- "id": "c|FRangers__@gbrw5",
- "name": "Angers",
- "city": "Angers",
- "region": "Pays-de-la-Loire",
- "country": "FR",
- "latitude": 47.478419,
- "longitude": 0.563166,
- "transportTypes": [
- "bus",
- "train"
], - "stopGroups": [
- {
- "id": "g|FRangmaiec@gbrw5c",
- "name": "Angers Maitre Ecole",
- "city": "Angers",
- "region": "Pays-de-la-Loire",
- "country": "FR",
- "address": "21 Rue Louis Legendre, 49100 Angers, France",
- "latitude": 47.467,
- "longitude": 0.5322,
- "transportTypes": [
- "train"
]
}, - {
- "id": "g|FRangsaila@gbrw52",
- "name": "Angers Saint-Laud",
- "city": "Angers",
- "region": "Pays-de-la-Loire",
- "country": "FR",
- "address": "1 Esplanade De La Gare, 49100 Angers, France",
- "latitude": 47.46477,
- "longitude": 0.55693,
- "transportTypes": [
- "bus",
- "train"
]
}
]
}GetAutocomplete
Autocomplete search for stop clusters and stop groups by name. Returns cities and stations matching the query, filtered by the partner's allowed gpuids when applicable. Mirrors the behaviour of the legacy GET /autocomplete route.
Authorizations:
query Parameters
| q required | string Example: q=Paris The search query (e.g. a city name or prefix) |
Responses
Response samples
- 200
- 400
- 500
[- {
- "id": 0,
- "unique_name": "string",
- "local_name": "string",
- "latitude": 0,
- "longitude": 0,
- "new_id": "string",
- "city_id": 0,
- "gpuid": "string",
- "nb_search": "string",
- "popular": true,
- "iscity": true
}
]GetPopularCities
Returns the limit most searched cities within 2 months.
Authorizations:
path Parameters
| limit required | number <double> Example: 10 The maximum number of cities to return. |
Responses
Response samples
- 200
- 500
[- {
- "unique_name": "string",
- "city_id": 0,
- "local_name": "string",
- "latitude": 0,
- "longitude": 0,
- "gpuid": "string",
- "iscity": true,
- "popular": true,
- "nb_search": "string"
}
]GetPopularCitiesFromTo
Returns the limit most searched cities for a given direction from/to a city within 2 weeks.
Falls back to global top cities if no results are found.
Authorizations:
path Parameters
| direction required | string (ESearchDirection) Enum: "from" "to" Can be either |
| uniqueName required | string Example: paris The unique name of the city to be based on. |
| limit required | number <double> Example: 5 The maximum number of cities to return (capped at 10). |
Responses
Response samples
- 200
- 500
[- {
- "unique_name": "string",
- "city_id": 0,
- "local_name": "string",
- "latitude": 0,
- "longitude": 0,
- "gpuid": "string",
- "iscity": true,
- "popular": true,
- "nb_search": "string"
}
]GetResults
Fetch results. Ignore search request that are further than 1800KM.
Authorizations:
Request Body schema: application/json
| originGpuid required | string |
| destinationGpuid required | string |
required | Array of objects (IApiInputPassenger) |
| outboundDate required | string |
| returnDate | string |
object (IApiTripFilter) Possible filters for a trip (outbound or return). | |
object (IApiTripFilter) Possible filters for a trip (outbound or return). |
Responses
Request samples
- Payload
{- "originGpuid": "c|FRavignon_@spg6j",
- "destinationGpuid": "c|FRmarseill@spey6",
- "passengers": [
- {
- "age": 22
}
], - "outboundDate": "2021-04-28T00:00:00Z",
- "returnDate": "2021-04-28T00:00:00Z"
}Response samples
- 200
- 400
- 404
- 500
{- "trips": {
- "67f077b4-3836-4616-ace2-42d68b0f4c71": {
- "id": "67f077b4-3836-4616-ace2-42d68b0f4c71",
- "direction": "outboundTrip",
- "origin": {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167
}, - "destination": {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167
}, - "available": true,
- "priceCents": 6000,
- "durationMinutes": 210,
- "departureUTC": 1619759072,
- "arrivalUTC": 1619773472,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "isIdentityDocumentRequired": false,
- "transportType": "MULTIMODAL",
- "providers": [
- {
- "name": "Altibus",
- "company": "Altibus",
- "transportType": "bus"
}, - {
- "name": "TGV",
- "company": "SNCF",
- "transportType": "train"
}
], - "segments": [
- {
- "id": "0123456789",
- "provider": {
- "name": "Altibus",
- "company": "Altibus",
- "transportType": "bus"
}, - "origin": {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167
}, - "destination": {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167
}, - "priceCents": 2000,
- "durationMinutes": 120,
- "departureUTC": 1619759072,
- "arrivalUTC": 1619773472,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "transportType": "bus",
- "includedBaggage": true,
- "notAvailableReason": null,
- "isPresale": false
}, - {
- "id": "2345678901",
- "provider": {
- "name": "TGV",
- "company": "SNCF",
- "transportType": "train"
}, - "origin": {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167
}, - "destination": {
- "id": "g|FRavignon_@spg3vp",
- "name": "Avignon Centre",
- "city": "Avignon",
- "region": "Provence-Alpes-Côte d’Azur",
- "country": "FR",
- "address": "1 rue du centre, 84000, Avignon",
- "latitude": 43.9408,
- "longitude": 4.79167
}, - "priceCents": 4000,
- "durationMinutes": 80,
- "departureUTC": 1619774072,
- "arrivalUTC": 1619778872,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "transportType": "train",
- "includedBaggage": true,
- "notAvailableReason": null,
- "vehicleIdentifier": "6319",
- "co2g": 50,
- "bookingClass": "2_ND_CLASS",
- "fareName": "PREM'S",
- "isPresale": false
}
]
}
}, - "bundles": [
- {
- "trips": [
- "67f077b4-3836-4616-ace2-42d68b0f4c71"
], - "redirectionLink": "v2/redirect/?outboundTripId=67f077b4-3836-4616-ace2-42d68b0f4c71&partnerId=FR-WB-TEST"
}
]
}GetCart
Get a cart by its id and its matching order if it exists.
Authorizations:
path Parameters
| cartId required | string Example: 6771146ca0b7432b |
Responses
Response samples
- 200
- 404
- 500
{- "cart": {
- "id": "6771146ca0b7432b",
- "partnerId": null,
- "partnerExternalId": null,
- "paidPrice": 1420,
- "rawPrice": 1320,
- "totalPrice": 1420,
- "isIdentityDocumentRequired": false,
- "trips": {
- "outboundTrip": {
- "id": "1165021",
- "uuid": "1f945779-4d9d-47ae-a711-c32bbcbf7639",
- "origin": {
- "id": 12709,
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "id": 549,
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "originOffset": "+0200",
- "destinationOffset": "+0200",
- "priceCents": 1420,
- "feeCents": 0,
- "paidPrice": 1420,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "1764084",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3819,
- "long": 6.72121
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4852,
- "long": 6.5291
}, - "isBookable": true,
- "priceCents": 1420,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": null
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 1445751,
- "lastName": null,
- "firstName": null,
- "title": null,
- "isCustomer": false,
- "discountCardId": null,
- "category": "adults",
- "discountCards": [ ],
- "age": 30,
- "birthdate": null
}
]
}
}UpdateCart
Updates a cart with the provided informations. A price lookup is done everytime a cart is patched. Keep in mind that patching a cart with an empty payload WILL NOT reset the cart's data, and will trigger a price lookup with the saved cart's data.
Authorizations:
path Parameters
| cartId required | string |
Request Body schema: application/json
Array of objects (ICartPassenger) | |
object (ICartCustomer) | |
| segmentAlternatives | object |
| ancillaries | Array of strings (EAncillaryType) Items Enum: "LAST_MINUTE" "CFAR" "ZEN_RELAX" Additional products the customer ticked: replaces the previous selection |
Responses
Request samples
- Payload
{- "passengers": [
- {
- "lastName": "name",
- "discountCards": [ ],
- "isCustomer": true,
- "title": "MR",
- "firstName": "firstName",
- "category": "adults",
- "age": 25,
- "birthdate": "1992-09-09"
}
], - "customer": {
- "lastName": "lastName",
- "mail": "mail@mail.com",
- "isSubscribedToNewsletter": false,
- "title": "MR",
- "firstName": "firstName",
- "birthdate": "1992-09-09"
}
}Response samples
- 200
- 404
- 500
{- "cart": {
- "id": "6771146ca0b7432b",
- "partnerId": null,
- "partnerExternalId": null,
- "paidPrice": 1180,
- "totalPrice": 1180,
- "rawPrice": 1080,
- "isIdentityDocumentRequired": false,
- "trips": {
- "outboundTrip": {
- "id": "1165021",
- "uuid": "1f945779-4d9d-47ae-a711-c32bbcbf7639",
- "origin": {
- "id": 12709,
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "id": 549,
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "originOffset": "+0200",
- "destinationOffset": "+0200",
- "priceCents": 1080,
- "feeCents": 0,
- "paidPrice": 1180,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "1764084",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3819,
- "long": 6.72121
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4852,
- "long": 6.5291
}, - "isBookable": true,
- "priceCents": 1180,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": null
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 1445752,
- "lastName": "name",
- "firstName": "firstName",
- "title": "MR",
- "isCustomer": true,
- "discountCardId": null,
- "category": "adults",
- "discountCards": [ ],
- "age": 30,
- "birthdate": "1992-09-09T00:00:00.000Z"
}
], - "customer": {
- "mail": "mail@mail.com",
- "title": "MR",
- "lastName": "lastName",
- "firstName": "firstName",
- "birthdate": "1992-09-09T00:00:00.000Z"
}
}, - "isAvailable": false
}CreateCart
Creates a cart. Has to contain at least an outbound trip id and minimal passenger information for it to work.
Authorizations:
Request Body schema: application/json
| outboundTripId required | string |
| returnTripId | string |
Array of objects (ICartPassenger) | |
object (ICartCustomer) | |
| partnerId | string or null |
| partnerExternalId | string or null Matches an id provided from a partner. It is used to keep track of the partner's orders and enables an order match between their system and our own |
| deviceId | number <double> |
| gclid | string or null Google Ads click id, kept by the front for 7 days after an ads visit |
| msclkid | string or null Microsoft Ads click id, kept by the front for 7 days after an ads visit |
| gbraid | string or null Google Ads click id for iOS app-to-web visits, kept by the front for 7 days after an ads visit |
| wbraid | string or null Google Ads click id for iOS web-to-app visits, kept by the front for 7 days after an ads visit |
| adsFirstClickAt | string or null <date-time> Date of the first ads visit, kept by the front while the ads cookie lives |
| adsAccountId | string or null Ads account id of the last ads visit (accountid url parameter), kept by the front with the click id |
Responses
Request samples
- Payload
{- "outboundTripId": "1f945779-4d9d-47ae-a711-c32bbcbf7639",
- "passengers": [
- {
- "age": 30,
- "discountCards": [ ]
}
]
}Response samples
- 201
- 400
- 404
- 500
{- "cart": {
- "id": "6771146ca0b7432b",
- "partnerId": null,
- "partnerExternalId": null,
- "paidPrice": 1420,
- "rawPrice": 1320,
- "totalPrice": 1420,
- "isIdentityDocumentRequired": false,
- "trips": {
- "outboundTrip": {
- "id": "1165021",
- "uuid": "1f945779-4d9d-47ae-a711-c32bbcbf7639",
- "origin": {
- "id": 12709,
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "id": 549,
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "originOffset": "+0200",
- "destinationOffset": "+0200",
- "priceCents": 1420,
- "feeCents": 0,
- "paidPrice": 1420,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "1764084",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3819,
- "long": 6.72121
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4852,
- "long": 6.5291
}, - "isBookable": true,
- "priceCents": 1420,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": null
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 1445751,
- "lastName": null,
- "firstName": null,
- "title": null,
- "isCustomer": false,
- "discountCardId": null,
- "category": "adults",
- "discountCards": [ ],
- "age": 30,
- "birthdate": null
}
]
}
}GetOrders
Retrieves a paginated list of all orders for the authenticated partner, ordered by most recent first. Each page contains up to 30 orders.
Authorizations:
query Parameters
| page | number <double> Default: 1 Page number (1-indexed). Defaults to 1. |
| itemsPerPage | number <double> Default: 30 Number of orders per page. Defaults to 30 and is capped at 30. |
Responses
Response samples
- 200
- 500
{- "orders": [
- {
- "id": "8bc8557793fe4447",
- "orderDate": "2022-09-09T15:30:02.896Z",
- "cartId": "6771146ca0b7432b",
- "orderStatus": "CREATED",
- "paidPrice": 1180,
- "rawPrice": 1180,
- "totalPrice": 1880,
- "trips": {
- "outboundTrip": {
- "id": "309496",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "priceCents": 1180,
- "feeCents": 0,
- "paidPrice": 1180,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "406308",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3886,
- "long": 6.7163
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4867,
- "long": 6.5311
}, - "priceCents": 1180,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "isBookable": true,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": "1234567890"
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 349410,
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "category": "adults",
- "discountCards": [ ],
- "isCustomer": true,
- "identityDocument": null,
- "age": 30,
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992,
- "discountCardId": null
}
], - "customer": {
- "mail": "mail@mail.com",
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992
}, - "paymentStatus": "ACCEPTED"
}
], - "pagination": {
- "currentPage": 1,
- "itemsPerPage": 30,
- "totalItems": 1,
- "totalPages": 1,
- "hasNextPage": false,
- "hasPreviousPage": false
}
}CreateOrder
Creates an order. It uses the cart's information to build the order from it. The cart must have been patched with customer information and at least one passenger.
Authorizations:
Request Body schema: application/json
| cartId required | string |
Responses
Request samples
- Payload
{- "cartId": "6771146ca0b7432b"
}Response samples
- 201
- 404
- 500
{- "order": {
- "id": "8bc8557793fe4447",
- "orderDate": "2022-09-09T13:24:15.533Z",
- "cartId": "6771146ca0b7432b",
- "orderStatus": "CREATED",
- "totalPrice": 1180,
- "rawPrice": 1180,
- "paidPrice": 1180,
- "trips": {
- "outboundTrip": {
- "id": "309495",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "priceCents": 1180,
- "feeCents": 0,
- "paidPrice": 1180,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "406307",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3886,
- "long": 6.7163
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4867,
- "long": 6.5311
}, - "priceCents": 1180,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "isBookable": true,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": null
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 349409,
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "category": "adults",
- "discountCards": [ ],
- "isCustomer": true,
- "identityDocument": null,
- "age": 30,
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992,
- "discountCardId": null
}
], - "customer": {
- "mail": "mail@mail.com",
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992
}, - "paymentStatus": "ACCEPTED"
}, - "priceCentsDiff": 0,
- "isAvailable": true,
- "expiresAt": "2022-09-09T13:39:15.533Z"
}GetOrder
Retrieves the order from the given cart ID.
Authorizations:
path Parameters
| orderId required | string Example: 8bc8557793fe4447 |
Responses
Response samples
- 200
- 404
- 500
{- "order": {
- "id": "8bc8557793fe4447",
- "orderDate": "2022-09-09T15:30:02.896Z",
- "cartId": "6771146ca0b7432b",
- "orderStatus": "CREATED",
- "paidPrice": 1180,
- "rawPrice": 1180,
- "totalPrice": 1880,
- "trips": {
- "outboundTrip": {
- "id": "309496",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "priceCents": 1180,
- "feeCents": 0,
- "paidPrice": 1180,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "406308",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3886,
- "long": 6.7163
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4867,
- "long": 6.5311
}, - "priceCents": 1180,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "isBookable": true,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": "1234567890"
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 349410,
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "category": "adults",
- "discountCards": [ ],
- "isCustomer": true,
- "identityDocument": null,
- "age": 30,
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992,
- "discountCardId": null
}
], - "customer": {
- "mail": "mail@mail.com",
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992
}, - "paymentStatus": "ACCEPTED"
}
}Response samples
- 200
- 500
[- {
- "id": "TTT_ADULT_PASS",
- "label": "Avantage Adulte",
- "visibility": 7,
- "cardCode": "WEEKEND_PASS",
- "isIdRequired": true
}, - {
- "id": "TTT_VSC_YOUNG_PASS",
- "label": "Avantage Jeune",
- "visibility": 6,
- "cardCode": "YOUNG_PASS",
- "isIdRequired": true
}, - {
- "id": "TTT_VSC_SENIOR_PASS",
- "label": "Avantage Senior",
- "visibility": 5,
- "cardCode": "SENIOR_PASS",
- "isIdRequired": true
}, - {
- "id": "TTT_VSC_FAM30",
- "label": "Famille nombreuse 30%",
- "visibility": 4,
- "cardCode": "FAM30",
- "isIdRequired": false
}, - {
- "id": "TTT_VSC_FAM40",
- "label": "Famille nombreuse 40%",
- "visibility": 3,
- "cardCode": "FAM40",
- "isIdRequired": false
}, - {
- "id": "TTT_VSC_FAM50",
- "label": "Famille nombreuse 50%",
- "visibility": 2,
- "cardCode": "FAM50",
- "isIdRequired": false
}, - {
- "id": "TTT_VSC_FAM75",
- "label": "Famille nombreuse 75%",
- "visibility": 1,
- "cardCode": "FAM75",
- "isIdRequired": false
}
]CreateBook
Triggers an asynchronous booking process.
Authorizations:
path Parameters
| orderId required | string Example: 8bc8557793fe4447 |
Responses
Response samples
- 202
- 404
- 500
{- "order": {
- "id": "8bc8557793fe4447",
- "orderDate": "2022-09-09T15:30:02.896Z",
- "cartId": "6771146ca0b7432b",
- "orderStatus": "PENDING_BOOKING",
- "paidPrice": 1180,
- "rawPrice": 1180,
- "totalPrice": 1880,
- "trips": {
- "outboundTrip": {
- "id": "309496",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles"
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains"
}, - "priceCents": 1180,
- "feeCents": 0,
- "paidPrice": 1180,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "companies": [
- "Altibus"
], - "segments": [
- {
- "id": "406308",
- "company": "Altibus",
- "mean": "bus",
- "origin": {
- "city": "Pralognan La Vanoise",
- "country": "France",
- "station": "PRALOGNAN LA VANOISE Airelles",
- "lat": 45.3886,
- "long": 6.7163
}, - "destination": {
- "city": "Moûtiers",
- "country": "France",
- "station": "Moûtiers - Salins-les-Thermes - Brides-les-Bains",
- "lat": 45.4867,
- "long": 6.5311
}, - "priceCents": 1180,
- "feeCents": 100,
- "includedProviderFeeCents": 120,
- "departureUTC": 1663561920,
- "arrivalUTC": 1663566300,
- "originOffset": "+0200",
- "destinationOffset": "+0200",
- "durationMinutes": 73,
- "isBookable": true,
- "redirectionLink": "/redirect?company=21&trip=MOG577&date=19/09/2022&env=production",
- "isPresale": false,
- "bookingReference": null
}
], - "mean": "BUS",
- "co2g": 669
}
}, - "passengers": [
- {
- "id": 349410,
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "category": "adults",
- "discountCards": [ ],
- "isCustomer": true,
- "identityDocument": null,
- "age": 30,
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992,
- "discountCardId": null
}
], - "customer": {
- "mail": "mail@mail.com",
- "title": "MR",
- "lastName": "name",
- "firstName": "firstName",
- "birthDay": 9,
- "birthMonth": 9,
- "birthYear": 1992
}, - "paymentStatus": "ACCEPTED"
}
}DownloadTicket
Download an order Eticket and gives the name provided to the file.
Authorizations:
path Parameters
| orderId required | string Example: 8bc8557793fe4447 |
query Parameters
| filename | string Default: "ticket" Example: filename=myTicketName |
Responses
Response samples
- 200
- 404
- 500
"string"PartnerCancellationConditions
Get cancellation conditions.
Authorizations:
path Parameters
| orderTicketId required | number <double> |
Responses
Response samples
- 200
- 403
- 404
- 409
- 500
{- "isCancellable": true,
- "feeCents": 0,
- "cutoff": "string",
- "bookingId": "string",
- "isRefundedByVoucher": true,
- "voucherAmountCents": 0
}Response samples
- 200
{- "webhooks": [
- {
- "id": "0b8f6b0e-6a2e-4b8e-9f4b-6c7a0f1b2c3d",
- "createdAt": "2019-08-24T14:15:22Z"
}
]
}CreateWebhook
Registers an url to call at each change of a cart or an order of the partner: a public https url, 5 at most.
Authorizations:
Request Body schema: application/json
| url required | string Https url we POST the events on, at each change of a cart or an order of the partner |
Responses
Request samples
- Payload
{
}Response samples
- 201
- 400
{- "webhook": {
- "id": "0b8f6b0e-6a2e-4b8e-9f4b-6c7a0f1b2c3d",
- "createdAt": "2019-08-24T14:15:22Z"
}
}TestWebhooks
Sends test events to the webhooks of the partner, flagged "test": true: every action type, or the given one.
With a cart of the partner, the events are on it and its order, to try reading them; else on the example id
0000000000000000.
Authorizations:
Request Body schema: application/json
| actionType | string The event to send; every one when not given |
| cartId | string A cart of the partner, to read it (and its order) when the event comes; example ids when not given |
Responses
Request samples
- Payload
{- "actionType": "order.booked",
- "cartId": "6771146ca0b7432b"
}Response samples
- 202
- 400
- 404
{- "events": [
- {
- "actionType": "order.booked",
- "eventId": "3f1c2a4e-8b7d-4e21-9c55-0a6b2d9e7f10"
}
]
}UpdateWebhook
Changes the url of a webhook of the partner.
Authorizations:
path Parameters
| webhookId required | string |
Request Body schema: application/json
| url required | string Https url we POST the events on, at each change of a cart or an order of the partner |
Responses
Request samples
- Payload
{
}Response samples
- 200
- 400
- 404
{- "webhook": {
- "id": "0b8f6b0e-6a2e-4b8e-9f4b-6c7a0f1b2c3d",
- "createdAt": "2019-08-24T14:15:22Z"
}
}