Passa al contenuto principale

@tictactrip/api (2.1586.0)

Download OpenAPI specification:Download

Tictactrip's API service

Ancillaries

ReleaseCfarRefunds

Authorizations:
authentication

Responses

Response samples

Content type
application/json
{
  • "refunded": [
    ],
  • "used": [
    ],
  • "failed": [
    ]
}

RefundPrice

Authorizations:
Noneauthentication
path Parameters
ancillaryId
required
number <double>

Responses

Response samples

Content type
application/json
{
  • "result": "REFUNDED"
}

CheckDelay

Authorizations:
authentication
path Parameters
orderId
required
string
orderTicketId
required
number <double>

Responses

Response samples

Content type
application/json
{
  • "delayMinutes": 0,
  • "status": "NOT_COVERED"
}

MarkDelayClaimFiled

Authorizations:
Noneauthentication
path Parameters
delayClaimId
required
number <double>

Responses

Response samples

Content type
application/json
{
  • "errorKey": "string",
  • "errorMessage": "string"
}

GetOffers

The products the customer can still add to an order

path Parameters
orderId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "orderId": "string",
  • "types": [
    ]
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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:
authentication
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

Content type
application/json
{
  • "paymentStatus": "ACCEPTED",
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "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:
authentication
path Parameters
orderId
required
string

Responses

Response samples

Content type
application/json
{
  • "reason": "string",
  • "isSent": true
}

GetSegmentProviders

Returns all SegmentProviders

Authorizations:
authentication

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GetAllStopGroups

Returns the list of all StopGroups.

Authorizations:
authentication
query Parameters
providerId
number <double>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GetStopGroup

Returns a StopGroup details.

Authorizations:
authentication
path Parameters
stopGroupGpuid
required
string
Example: g|FRavignon_@spg3vp

Responses

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "stopClusters": [
    ]
}

GetAllStopClusters

Returns the list of all StopClusters.

Authorizations:
authentication

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GetStopCluster

Returns a StopCluster details.

Authorizations:
authentication
path Parameters
stopClusterGpuid
required
string
Example: c|FRangers__@gbrw5

Responses

Response samples

Content type
application/json
{
  • "id": "c|FRangers__@gbrw5",
  • "name": "Angers",
  • "city": "Angers",
  • "region": "Pays-de-la-Loire",
  • "country": "FR",
  • "latitude": 47.478419,
  • "longitude": 0.563166,
  • "transportTypes": [
    ],
  • "stopGroups": [
    ]
}

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:
authentication
query Parameters
q
required
string
Example: q=Paris

The search query (e.g. a city name or prefix)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GetPopularCities

Returns the limit most searched cities within 2 months.

Authorizations:
authentication
path Parameters
limit
required
number <double>
Example: 10

The maximum number of cities to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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:
authentication
path Parameters
direction
required
string (ESearchDirection)
Enum: "from" "to"

Can be either from or to.

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

Content type
application/json
[
  • {
    }
]

GetResults

Fetch results. Ignore search request that are further than 1800KM.

Authorizations:
authentication
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

Content type
application/json
{
  • "originGpuid": "c|FRavignon_@spg6j",
  • "destinationGpuid": "c|FRmarseill@spey6",
  • "passengers": [
    ],
  • "outboundDate": "2021-04-28T00:00:00Z",
  • "returnDate": "2021-04-28T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "trips": {
    },
  • "bundles": [
    ]
}

GetCart

Get a cart by its id and its matching order if it exists.

Authorizations:
authentication
path Parameters
cartId
required
string
Example: 6771146ca0b7432b

Responses

Response samples

Content type
application/json
{
  • "cart": {
    }
}

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:
authentication
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

Content type
application/json
{
  • "passengers": [
    ],
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "cart": {
    },
  • "isAvailable": false
}

CreateCart

Creates a cart. Has to contain at least an outbound trip id and minimal passenger information for it to work.

Authorizations:
authentication
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

Content type
application/json
{
  • "outboundTripId": "1f945779-4d9d-47ae-a711-c32bbcbf7639",
  • "passengers": [
    ]
}

Response samples

Content type
application/json
{
  • "cart": {
    }
}

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:
authentication
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

Content type
application/json
{
  • "orders": [
    ],
  • "pagination": {
    }
}

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:
authentication
Request Body schema: application/json
cartId
required
string

Responses

Request samples

Content type
application/json
{
  • "cartId": "6771146ca0b7432b"
}

Response samples

Content type
application/json
{
  • "order": {
    },
  • "priceCentsDiff": 0,
  • "isAvailable": true,
  • "expiresAt": "2022-09-09T13:39:15.533Z"
}

GetOrder

Retrieves the order from the given cart ID.

Authorizations:
authentication
path Parameters
orderId
required
string
Example: 8bc8557793fe4447

Responses

Response samples

Content type
application/json
{
  • "order": {
    }
}

GetDiscountCards

Returns all available discount cards.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

CreateBook

Triggers an asynchronous booking process.

Authorizations:
authentication
path Parameters
orderId
required
string
Example: 8bc8557793fe4447

Responses

Response samples

Content type
application/json
{
  • "order": {
    }
}

DownloadTicket

Download an order Eticket and gives the name provided to the file.

Authorizations:
authentication
path Parameters
orderId
required
string
Example: 8bc8557793fe4447
query Parameters
filename
string
Default: "ticket"
Example: filename=myTicketName

Responses

Response samples

Content type
application/json
"string"

PartnerCancellationConditions

Get cancellation conditions.

Authorizations:
authentication
path Parameters
orderTicketId
required
number <double>

Responses

Response samples

Content type
application/json
{
  • "isCancellable": true,
  • "feeCents": 0,
  • "cutoff": "string",
  • "bookingId": "string",
  • "isRefundedByVoucher": true,
  • "voucherAmountCents": 0
}

PartnerCancelBooking

Authorizations:
authentication
path Parameters
orderTicketId
required
number <double>

The order ticket id

Responses

Response samples

Content type
application/json
{ }

Webhooks

GetWebhooks

Lists the webhooks of the partner.

Authorizations:
authentication

Responses

Response samples

Content type
application/json
{}

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:
authentication
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

Content type
application/json

Response samples

Content type
application/json
{}

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:
authentication
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

Content type
application/json
{
  • "actionType": "order.booked",
  • "cartId": "6771146ca0b7432b"
}

Response samples

Content type
application/json
{
  • "events": [
    ]
}

GetWebhook

Retrieves a webhook of the partner.

Authorizations:
authentication
path Parameters
webhookId
required
string

Responses

Response samples

Content type
application/json
{}

UpdateWebhook

Changes the url of a webhook of the partner.

Authorizations:
authentication
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

Content type
application/json

Response samples

Content type
application/json
{}

DeleteWebhook

Deletes a webhook of the partner: it is not called anymore.

Authorizations:
authentication
path Parameters
webhookId
required
string

Responses

Response samples

Content type
application/json
{
  • "errorKey": "general:client:routeNotFound",
  • "errorMessage": "Not found"
}