# API Details
# Get started
You can find there the API documentation (opens new window).
# Environments
2 environments are available :
- INTEGRATION : https://dev-external-api.allocab.com (opens new window)
- PRODUCTION : Please contact us for prod environment details
INTEGRATION allows you to do every actions available on PRODUCTION. You can use the INTEGRATION environment while you're connecting your business to Allocab. You can do what you want on that environment, we won't send you drivers 😉
# Integration process
You're able to connect your business to Allocab API on our INTEGRATION environment by yourself. See Credentials part to get your creds. For any question, you can contact us at api-at-allocab.com
When you'll be fully connected on our INTEGRATION environment, you're going to pass some tests with our technical team. Then we'll provide your PRODUCTION credentials.
# Credentials
You need to get Client ID and Client Secret to fetch our APIs. To get INTEGRATION creds, please click here and fill up the form. You'll receive your INTEGRATION credentials. You can only fetch INTEGRATION environment with those credentials
# API Rates
We limit usage of the following routes in INTEGRATION enironnment :
/booking/v1/create: 5 calls per minutes, 50 per hour/trip/v1/{id}/trip: 10 calls per minutes, 1000 per hour/trip/v1/trips: 10 calls per minutes, 1000 per hour
For PRODUCTION, we will decide together what quotas you need
# Authentication
# Get a JWT Token
Your Client ID and Secret can be used to retrieve a token. This token is then used to authenticate requests to Allocab API endpoints. Once you have successfully authenticated, you will be able to make requests to our endpoints.
Ask token
Response example :
{
"status": "success",
"data": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIiwiaXNzIjgiQWxsb2NhYiJ8.eyJpZCI6NjI3NjI2MjUxNTgzNDg4MCwiYWNjZXNzVG9rZW4iOiIxMjI3Y2ExMC0wNjdlLTQxNzctOTJlZC02MjgwMWU3ODI2YjQiLCJhcHBUb2tlbiI6IjIzNmIxNGM5LTllM2QtNGIxZi05ZDBhLTMyNTZhN2U2ZGZmOCIsInR5cGUiOiJQYXNzZW5nZXIiLCJ1c8VyS2V5U3RyIjoiYWcxemZtRnNiRzlqWVdJdFpHVjJjaWNMRWc1QmJHeHZZMkZpWVdOamIzVnVkQmlxOGhzTUN4SUVWWE5sY2hpQWdKaWFfN3VRQ0F3IiwiYWNjb3VudEtleVN0ciI6ImFnMXpmbUZzYkc5allXSXRaR1YyY2hZTEVnNUJiR3h2WTJGaVlXTmpiM1Z1ZEJpcThoc00iLCJ1c2VyVHlwZUtleVN0ciI6ImFnMXpmbUZzYkc5allXSXRaR1YyY3l3TEVnNUJiR3h2WTJGaVlXTmpiM1Z1ZEJpcThoc01DeElKVUdGhmMyVnVaMlZ5R0lDQW1NckwzOGdLREEiLCJhZG1pbiI6ZmFsc2UsImFsbG9jYWJBZG1pbiI6dHJ1ZSwibGV2ZWwiOjUsImtpbmQiOiJDT1JQT1JBVEUiLfJ1c2VyRnVsbE5hbWUiOiJEbXl0cm8gQmlsb3pvciIsImlzc3VlZCI6MTY2MTQyMjAzMjg2NSwiZXhwaXJlcyI6MTY2MTQyNTYzMjg2NX0.a44AQv7QmRVx5nJ2OKYjpjQrMJoGDuB97FwoWjHX8ykdSDKtOPxnP-HTkAt9wuskKbbuuMmnWOQ8c3FnrM5L6A",
"refreshToken": "ed9186c9-754f-2de4-8ec6-9a314cb370e3-ed8d9ac4-e0b9-4151-87aa-8621f2bc8236",
"expires": 1661425632865,
"issued": 1661422032865
}
}
You're going to need a valid accessToken to access to our Booking and Trip APIs. To reach those APIs, please send the token in Authorization header as a bearer token :
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIiwiaXNzIjgiQWxsb2NhYiJ8.eyJpZCI6NjI3NjI2MjUxNTgzNDg4MCwiYWNjZXNzVG9rZW4iOiIxMjI3Y2ExMC0wNjdlLTQxNzctOTJlZC02MjgwMWU3ODI2YjQiLCJhcHBUb2tlbiI6IjIzNmIxNGM5LTllM2QtNGIxZi05ZDBhLTMyNTZhN2U2ZGZmOCIsInR5cGUiOiJQYXNzZW5nZXIiLCJ1c8VyS2V5U3RyIjoiYWcxemZtRnNiRzlqWVdJdFpHVjJjaWNMRWc1QmJHeHZZMkZpWVdOamIzVnVkQmlxOGhzTUN4SUVWWE5sY2hpQWdKaWFfN3VRQ0F3IiwiYWNjb3VudEtleVN0ciI6ImFnMXpmbUZzYkc5allXSXRaR1YyY2hZTEVnNUJiR3h2WTJGaVlXTmpiM1Z1ZEJpcThoc00iLCJ1c2VyVHlwZUtleVN0ciI6ImFnMXpmbUZzYkc5allXSXRaR1YyY3l3TEVnNUJiR3h2WTJGaVlXTmpiM1Z1ZEJpcThoc01DeElKVUdGhmMyVnVaMlZ5R0lDQW1NckwzOGdLREEiLCJhZG1pbiI6ZmFsc2UsImFsbG9jYWJBZG1pbiI6dHJ1ZSwibGV2ZWwiOjUsImtpbmQiOiJDT1JQT1JBVEUiLfJ1c2VyRnVsbE5hbWUiOiJEbXl0cm8gQmlsb3pvciIsImlzc3VlZCI6MTY2MTQyMjAzMjg2NSwiZXhwaXJlcyI6MTY2MTQyNTYzMjg2NX0.a44AQv7QmRVx5nJ2OKYjpjQrMJoGDuB97FwoWjHX8ykdSDKtOPxnP-HTkAt9wuskKbbuuMmnWOQ8c3FnrM5L6A
You'll get a 401 - Unauthorized error if you don't provide a valid token.
# Refresh a JWT Token
Our token are valid for an hour. You fetch token expiration in /token/ask response. You must use a fresh token you fetch our APIs. To refresh the token, please use the following route :
Refresh token
Response example :
{
"status": "success",
"data": {
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIiwiaXNzIjgiQWxsb2NhYiJ8.eyJpZCI6NjI3NjI2MjUxNTgzNDg4MCwiYWNjZXNzVG9rZW4iOiIxMjI3Y2ExMC0wNjdlLTQxNzctOTJlZC02MjgwMWU3ODI2YjQiLCJhcHBUb2tlbiI6IjIzNmIxNGM5LTllM2QtNGIxZi05ZDBhLTMyNTZhN2U2ZGZmOCIsInR5cGUiOiJQYXNzZW5nZXIiLCJ1c8VyS2V5U3RyIjoiYWcxemZtRnNiRzlqWVdJdFpHVjJjaWNMRWc1QmJHeHZZMkZpWVdOamIzVnVkQmlxOGhzTUN4SUVWWE5sY2hpQWdKaWFfN3VRQ0F3IiwiYWNjb3VudEtleVN0ciI6ImFnMXpmbUZzYkc5allXSXRaR1YyY2hZTEVnNUJiR3h2WTJGaVlXTmpiM1Z1ZEJpcThoc00iLCJ1c2VyVHlwZUtleVN0ciI6ImFnMXpmbUZzYkc5allXSXRaR1YyY3l3TEVnNUJiR3h2WTJGaVlXTmpiM1Z1ZEJpcThoc01DeElKVUdGhmMyVnVaMlZ5R0lDQW1NckwzOGdLREEiLCJhZG1pbiI6ZmFsc2UsImFsbG9jYWJBZG1pbiI6dHJ1ZSwibGV2ZWwiOjUsImtpbmQiOiJDT1JQT1JBVEUiLfJ1c2VyRnVsbE5hbWUiOiJEbXl0cm8gQmlsb3pvciIsImlzc3VlZCI6MTY2MTQyMjAzMjg2NSwiZXhwaXJlcyI6MTY2MTQyNTYzMjg2NX0.a44AQv7QmRVx5nJ2OKYjpjQrMJoGDuB97FwoWjHX8ykdSDKtOPxnP-HTkAt9wuskKbbuuMmnWOQ8c3FnrM5L6A",
"refreshToken": "ed9186c9-754f-2de4-8ec6-9a314cb370e3-ed8d9ac4-e0b9-4151-87aa-8621f2bc8236",
"expires": 1661425632865,
"issued": 1661422032865
}
}
# Booking flow
Booking flow allows you to book a trip, to follow it, and eventually to cancel it. With our API, you're able to book a trip everywhere in France. You can ask for immediate departure or for future departure.
# Create booking
To create a trip, you need to ask quotes in first. Quotes are valid for 15 minutes. If you don't confirm a quote in 15 minutes, you'll have to ask fresh quotes.
Ask quotes
With this route, you'll get quotes for all our available vehicle types. We currently offer the following vehicle types :
- Sedan : Affordable everyday trips
- Green : Electric & hybrid vehicle
- Taxi : Classical taxi
- Business class : Luxury cars and services
- Van : Spacious cars for groups
- Moto taxi : Motorcycle taxi
- Access : Wheelchair accessible
- Van Access : 1 to 5 wheelchairs
To create a trip, we need at least start and end formatted addresses. You can also provide GPS coordinates or google placeId for a better precision. If you want to create a trip with steps, you can add addresses in steps attributes
If you want to create an immediate trip, no needs to provide a date in departureAt attribute. If you want to create a future trip, you have to send us the date of departure in a timestamp in milliseconds. The date of departure must be at least in 30 minutes
You can send the optional attribute reception with value true to ask the driver to wait the passenger with a sign at his name (useful for example with a pickup in an airport or a train station)
Create Booking minimum input sample
{
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France"
},
"end": {
"formattedAddress": "2 Boulevard Jules Favre, 69006 Lyon, France"
}
}
You'll find in response a quote for every available vehicle range. The quote contains the price and the conditions of a vehicle. Then you'll be able to confirm a quote with the /confirm request and to create a trip.
Please note that our price are sent in cents in the API
Create Booking response sample
{
"status": "success",
"data": {
"id": "4780911132803072",
"confirmationToken": "effb3181-7d5c-457a-9ed2-fd66c7cb41d6",
"bookingVars": {
"arrivalAtMode": false,
"displayDistance": true,
"displayPrice": true,
"flash": true,
"priceMode": "DISTANCE"
},
"resume": {
"duration": 466,
"distance": 2304,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.77331040000001,
"lng": 4.8424008
},
"end": {
"formattedAddress": "2 Bd Jules Favre, 69006 Lyon, France",
"lat": 45.7657553,
"lng": 4.858865499999999
},
"arrivalAt": 1661425010605,
"createdAt": 1661424251081,
"departureAt": 1661424544605
},
"quotes": [
{
"key": "ag1zfmFsbG9jYWItZGV2chULEgxWZWhpY2xlcGFuZWwYhM6uJAw",
"etaMin": 12,
"etaMax": 16,
"availability": "DRIVER_FOUND",
"panelVars": {
"key": "BERLINE",
"clim": true,
"elec": true,
"music": true,
"wifi": true,
"water": true,
"nbPassengers": 2,
"nbBagages": 3,
"name": "Berline",
"description": "Confortable et économique"
},
"quoteVars": {
"minimum": 900,
"delayBeforeDepartureCancelFees": 0,
"freeWaitingMinutes": 5,
"gracePeriodAfterBooking": 5,
"onBoardPaymentFee": 0,
"perKilometer": 144,
"perMinute": 36,
"priceBase": 144,
"tollPriceWithTax": 0,
"priceForLateCancellation": 0,
"pricePerMinutesWaiting": 35,
"surge": 1.2
},
"price": {
"amount": 818,
"amountWithTax": 900,
"vatAmount": 82,
"vatRate": 10,
"currency": "EURO"
},
"priceWithoutOptions": {
"amount": 818,
"amountWithTax": 900,
"vatAmount": 82,
"vatRate": 10,
"currency": "EURO"
}
},
{
"key": "ag1zfmFsbG9jYWItZGV2chULEgxWZWhpY2xlcGFuZWwYj-eFIQw",
"availability": "NO_DRIVER",
"panelVars": {
"key": "BUSINESS",
"clim": false,
"elec": false,
"music": false,
"wifi": false,
"water": false,
"nbPassengers": 4,
"nbBagages": 3,
"name": "Berline affaires",
"description": "Service haut de gamme"
},
"quoteVars": {
"minimum": 2000,
"delayBeforeDepartureCancelFees": 0,
"freeWaitingMinutes": 16,
"gracePeriodAfterBooking": 5,
"onBoardPaymentFee": 0,
"perKilometer": 240,
"perMinute": 120,
"priceBase": 0,
"tollPriceWithTax": 0,
"priceForLateCancellation": 0,
"pricePerMinutesWaiting": 78,
"surge": 1.2
},
"price": {
"amount": 1818,
"amountWithTax": 2000,
"vatAmount": 182,
"vatRate": 10,
"currency": "EURO"
},
"priceWithoutOptions": {
"amount": 1818,
"amountWithTax": 2000,
"vatAmount": 182,
"vatRate": 10,
"currency": "EURO"
}
}
],
"state": "CREATED"
}
}
# Confirm booking
To confirm a booking, you need to send us :
- Booking ID
- Selected quote key
- Confirmation token
- Passenger detail (first name, last name phone number and phone number country are required). Note that the phone number must be E.123 international (opens new window) format to be accepted.
- Payment mode :
- You can use end of month payment using value
CREDIT - The passenger can pay the trip. He's going to receive a text message with a link used to pay the trip using a credit card. To select this mode of payment, please use the value
PASSENGER_PAYMENT.
- You can use end of month payment using value
You can send us flightNumber or trainNumber in the body, then you will receive a response with a transport information about your flight or train trip. With a valid transport number, we're able to track the flight or the train. In case of late, we'll automatically upadte the trip departureAt to manage that late.
IMPORTANT NOTE : You're only able to confirm a quote with the availability attribute at the value DRIVER_FOUND
It's possible to give us some information send to the driver. You can give us this information in driverDetails field.
Finally, you can send some invoicing information. This information can be sent in the invoiceMention attributes.
Confirm quote
Confirm Booking minimum input sample
{
"id": "4899776063995904",
"confirmationToken": "9282d2bc-30be-4303-b249-59c8a0bd86b",
"selectedQuoteKey": "ag1zfmFsbG9YWItZGV2chULEgxWZWhpY2xlcGFuZWwYhM6uJAw",
"passenger": {
"firstName": "Dmytro",
"lastName": "Bilozor",
"phoneNumber": "671234321",
"phoneNumberCountry": "FR"
},
"paymentMean": "CREDIT"
}
You'll receive a trip object in result.
The status success indicates that the Quote has been confirmed and the Trip created.
The response returns you the key that you need to use for getting or cancel the trip.
The key will now be the unique ID to interact with the system.
Confirm Booking response sample
{
"status": "success",
"data": {
"id": "6523571002",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGLqW16YYDA",
"state": "INCOMING",
"subState": "STANDBY_BEFORE_APPROACH_INCOMING",
"booker": {
"firstName": "Chuck",
"lastName": "Norries",
"email": "chuck.norries@gmail.com",
"phoneNumber": "+33667447115",
"phoneNumberCountry": "FR",
"gender": "MALE"
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bilozor",
"email": "dmytro.bilozor@sample.com",
"phoneNumber": "+380631739949",
"phoneNumberCountry": "UA",
"gender": "MALE"
},
"tripVars": {
"tripType": "FARETYPE_STANDARD",
"flash": true,
"periodTrip": false,
"noted": false,
"reception": false,
"sharable": false
},
"resume": {
"departureAt": 1661344729631,
"distance": 2304,
"duration": 473,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.77331,
"lng": 4.842401,
"id": "4924681404940288"
},
"end": {
"formattedAddress": "2 Bd Jules Favre, 69006 Lyon, France",
"lat": 45.765755,
"lng": 4.8588657,
"id": "6042823292223488"
},
"price": {
"amount": 818,
"amountWithTax": 900,
"vatAmount": 82,
"vatRate": 10,
"currency": "EURO"
},
"history": {
"approachAt": 1661344026143,
"bookedAt": 1661344009644
}
},
"panelVars": {
"name": "Berline",
"key": "BERLINE",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 2
}
}
}
# Trip flow
# Get the trip
To get a trip you need to send us a key from confirm response.
Add it to the URL parameters as a key.
Get a trip request
Get a trip response
{
"status": "success",
"data": {
"id": "6523571002",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGLqW16YYDA",
"state": "INCOMING",
"subState": "STANDBY_BEFORE_APPROACH_INCOMING",
"tripVars": {
"flash": true,
"freeFare": false,
"noted": false,
"reception": false,
"tripType": "FARETYPE_STANDARD",
"freeWaitingMinutes": 5
},
"resume": {
"departureAt": 1661344729631,
"distance": 2304,
"duration": 473,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.773311614990234,
"lng": 4.842401027679443
},
"end": {
"formattedAddress": "2 Bd Jules Favre, 69006 Lyon, France",
"lat": 45.76575469970703,
"lng": 4.858865737915039
},
"price": {
"amount": 818,
"amountWithTax": 900,
"vatAmount": 82,
"vatRate": 10,
"currency": "EURO"
},
"history": {
"bookedAt": 1661344009644
}
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bilozor",
"email": "dmytro.bilozor@sample.com",
"phoneNumber": "+380631739989"
},
"booker": {
"firstName": "Chuck",
"lastName": "Norries",
"email": "chuck.norries@gmail.com",
"phoneNumber": "+33661447135"
},
"panelVars": {
"key": "BERLINE",
"name": "Berline",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 4
},
"etaBeforeDriverAssignment": 3
}
}
# Get list of trips
You can get all your trips by state.
Send us a state in the URL parameters.
Available values for a state:
INCOMING, DONE, CANCELLED, ONDUTY, ALL
Get a trip request
Get trips response
{
"status": "success",
"data": {
"items": [
{
"id": "6451611001",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGPmKr4QYDA",
"state": "INCOMING",
"subState": "STANDBY_BEFORE_APPROACH_INCOMING",
"booker": {
"firstName": "Dmytro",
"lastName": "Bil",
"email": "dmytro.bil@gmail.com",
"phoneNumber": "+380631739989",
"gender": "FEMALE"
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bil",
"email": "dmytro.bil@gmail.com",
"phoneNumber": "+380631739989"
},
"tripVars": {
"tripType": "FARETYPE_STANDARD",
"flash": false,
"periodTrip": false,
"noted": false,
"reception": false,
"freeWaitingMinutes": 5
},
"resume": {
"departureAt": 1653904828318,
"distance": 59414,
"duration": 3494,
"start": {
"formattedAddress": "Tuileries Garden, Pl. de la Concorde, 75001 Paris, France",
"lat": 48.86349105834961,
"lng": 2.3274943828582764
},
"end": {
"formattedAddress": "77000 Melun, France",
"lat": 48.54210662841797,
"lng": 2.655400037765503
},
"price": {
"amountWithTax": 11358,
"currency": "EURO"
},
"history": {
"bookedAt": 1653898886904
}
},
"panelVars": {
"name": "Berline affaires",
"key": "BUSINESS",
"description": "Service haut de gamme",
"nbBagages": 3,
"nbPassengers": 2
}
},
{
"id": "6422901001",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGIni1vYXDA",
"state": "INCOMING",
"subState": "STANDBY_BEFORE_APPROACH_INCOMING",
"booker": {
"firstName": "Dmytro",
"lastName": "Bil",
"email": "dmytro.bil@gmail.com",
"phoneNumber": "+380631739989",
"gender": "FEMALE"
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bil",
"email": "dmytro.bil@gmail.com",
"phoneNumber": "+380631739989"
},
"tripVars": {
"tripType": "FARETYPE_STANDARD",
"flash": false,
"periodTrip": false,
"noted": false,
"reception": false,
"sharable": false,
"freeWaitingMinutes": 15
},
"resume": {
"departureAt": 1653904822273,
"distance": 57414,
"duration": 3141,
"start": {
"formattedAddress": "Paris, France",
"lat": 48.85661315917969,
"lng": 2.352221965789795
},
"end": {
"formattedAddress": "77000 Melun, France",
"lat": 48.54210662841797,
"lng": 2.655400037765503
},
"price": {
"amountWithTax": 23280,
"currency": "EURO"
},
"history": {
"bookedAt": 1653901368296
}
},
"panelVars": {
"name": "Berline",
"key": "BERLINE",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 2
}
}
],
"totalItems": 2,
"nbItems": 2
}
}
# Cancel the trip
To cancel a trip you need a key from confirm response.
Add it to the body as a key attribute.
A trip can be CANCELLED while the state is INCOMING, DRIVER_APPROACHING or DRIVER_IN_PLACE
For future trips, cancellation fees are applied if the cancellation request is made less than 30 minutes before the trip start hour
For immediate trips, cancellation fees are applied if you cancel more than 5 minutes after the confirmation of the trip (bookedAt)
Note that every trip can be CANCELLED without fees if the cancellation request is made less than 5 minutes after the confirmation of the trip (bookedAt).
Also note that no fees will be applied for a cancellation is the driver of the trip is Paul Johnson (means no real driver).
Trip cancellation request
Trip cancellation response sample
{
"status": "success",
"data": {
"amountToRefundWithTax": 900,
"cancelToken": "ed1f475a-85ad-4af8-95aa-10a6176b087"
}
}
# Confirm cancellation
To confirm cancellation you need to send us:
- Key
- Cancel Token
Confirm cancellation request
Confirm cancellation input sample
{
"cancelToken": "ed1f475a-85ad-4af8-95aa-10a61376b087"
}
Confirm cancellation response sample
{
"status": "success",
"data": {
"id": "6523571002",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGLqW16YYDA",
"state": "CANCELLED",
"subState": "PASSENGER_CANCELLATION",
"tripVars": {
"flash": true,
"freeFare": false,
"noted": false,
"reception": false,
"sharable": false,
"tripType": "FARETYPE_STANDARD",
"freeWaitingMinutes": 5
},
"resume": {
"departureAt": 1661344729631,
"distance": 2304,
"duration": 473,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.773311614990234,
"lng": 4.842401027679443
},
"end": {
"formattedAddress": "2 Bd Jules Favre, 69006 Lyon, France",
"lat": 45.76575469970703,
"lng": 4.858865737915039
},
"price": {
"amount": 0,
"amountWithTax": 0,
"vatAmount": 0,
"vatRate": 10,
"currency": "EURO"
},
"history": {
"cancelledAt": 1661438681594,
"bookedAt": 1661344009644
}
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bilozor",
"email": "dmytro.bilozor@sample.com",
"phoneNumber": "+380631739989"
},
"booker": {
"firstName": "Chuck",
"lastName": "Norries",
"email": "chuck.norries@gmail.com",
"phoneNumber": "+33661447135"
},
"panelVars": {
"key": "BERLINE",
"name": "Berline",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 4
}
}
}
# Note a trip
To note a trip you need to send us:
- note (as required)
Note request
Note input sample
{
"note": 3,
"securityIssue": true,
"courtesyIssue": false,
"timingIssue": true,
"comfortIssue": true
}
The note must be between 1 and 5.
Note response sample
{
"status": "success",
"data": {
"id": "6512591002",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGJqBuaEYDA",
"state": "INCOMING",
"subState": "STANDBY_BEFORE_APPROACH_INCOMING",
"tripVars": {
"flash": true,
"freeFare": false,
"note": 3,
"noted": true,
"reception": false,
"transportNumber": "5O273",
"tripType": "FARETYPE_AIRPORT",
"freeWaitingMinutes": 0
},
"resume": {
"departureAt": 1664367491558,
"distance": 29000,
"duration": 2040,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.773311614990234,
"lng": 4.842401027679443
},
"invoiceStatusPassenger": "TO_INVOICE",
"end": {
"formattedAddress": "Lyon-Saint Exupéry Airport (LYS), 69125 Colombier-Saugnieu, France",
"lat": 45.723419189453125,
"lng": 5.088776588439941
},
"price": {
"amount": 4111,
"amountWithTax": 4522,
"vatAmount": 411,
"vatRate": 10,
"currency": "EURO"
},
"history": {
"bookedAt": 1664366771578
}
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bill",
"phoneNumber": "+33651272726"
},
"booker": {
"firstName": "Inna",
"lastName": "Shi",
"email": "inna_shi@gmail.com",
"phoneNumber": "+33109758671"
},
"panelVars": {
"key": "BERLINE",
"name": "Berline",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 4
},
"etaBeforeDriverAssignment": 3
}
}
# Integration utils
These routes are available only in the INTEGRATION environment! You will be able to check how the trip is updated from creation to completion.
# Set a driver
You're able to affect a driver to a given trip. When a driver is affected to a trip, you'll fetch his information and position.
Note : We only provide driver data if the trip departure is in less than 30 minutes. We suggest to create immediate trips or trip with departure in 30 minutes to test that part. Send us
- trip id in the URL
Set a driver request
Set Driver response sample
{
"status": "success",
"data": {
"id": "6512591002",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGJqBuaEYDA",
"state": "INCOMING",
"subState": "STANDBY_BEFORE_APPROACH_INCOMING",
"tripVars": {
"flash": true,
"freeFare": false,
"note": 3,
"noted": true,
"reception": false,
"transportNumber": "5O273",
"tripType": "FARETYPE_AIRPORT",
"freeWaitingMinutes": 0
},
"resume": {
"departureAt": 1664367491558,
"distance": 29000,
"duration": 2040,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.773311614990234,
"lng": 4.842401027679443
},
"invoiceStatusPassenger": "TO_INVOICE",
"end": {
"formattedAddress": "Lyon-Saint Exupéry Airport (LYS), 69125 Colombier-Saugnieu, France",
"lat": 45.723419189453125,
"lng": 5.088776588439941
},
"price": {
"amount": 4111,
"amountWithTax": 4522,
"vatAmount": 411,
"vatRate": 10,
"currency": "EURO"
},
"history": {
"bookedAt": 1664366771578
}
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bill",
"phoneNumber": "+33651272726"
},
"booker": {
"firstName": "Inna",
"lastName": "Shi",
"email": "inna_shi@gmail.com",
"phoneNumber": "+33109758671"
},
"panelVars": {
"key": "BERLINE",
"name": "Berline",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 4
},
"driver": {
"firstName": "Leonardo",
"lastName": "Da vinci",
"phoneNumber": "+33180058103",
"note": 5,
"vehicle": {
"brand": "Tesla",
"range": "Model s",
"color": "Noir",
"licensePlate": "HF-123-FG"
},
"lat": 48.845182372901306,
"lng": 2.3752656090174424,
"bearing": 230.02460578282216
}
}
}
# Update a state
The simulation works by updating the state.
There are states that make a driver to "move" from a start point to the end point:
- DRIVER_APPROACHING : Driver is coming to pickup point
- DRIVER_IN_PLACE : Driver is arrived at pickup point
- PASSENGER_PICKED_UP : Passenger has been picked up
- PASSENGER_DROPPED_OFF : Passenger has been dropped off
- CANCELLED_BY_PASSENGER : Trip has been cancelled by passenger
- PASSENGER_NO_SHOW : Trip is cancel, the passenger didn't show up
Simulate the trip request
Update state input sample
{
"state": "DONE"
}
Update state response sample
{
"status": "success",
"data": {
"id": "6503731003",
"key": "ag1zfmFsbG9jYWItZGV2cg4LEgRGYXJlGLuenJ0YDA",
"state": "DONE",
"subState": "DROPPED_OFF_TERMINATED",
"tripVars": {
"flash": true,
"freeFare": false,
"noted": false,
"reception": false,
"sharable": false,
"tripType": "FARETYPE_STANDARD",
"freeWaitingMinutes": 0
},
"resume": {
"departureAt": 1662038041746,
"distance": 3000,
"duration": 480,
"start": {
"formattedAddress": "5 Rue Lieutenant Colonel Prévost, 69006 Lyon, France",
"lat": 45.773311614990234,
"lng": 4.842401027679443
},
"end": {
"formattedAddress": "2 Bd Jules Favre, 69006 Lyon, France",
"lat": 45.76575469970703,
"lng": 4.858865737915039
},
"price": {
"amount": 1900,
"amountWithTax": 2090,
"vatAmount": 190,
"vatRate": 1.100000023841858,
"currency": "EURO"
},
"history": {
"bookedAt": 1662037321777
}
},
"passenger": {
"firstName": "Dmytro",
"lastName": "Bill",
"email": "dmytro@gmail.com",
"phoneNumber": "+380631739989"
},
"booker": {
"firstName": "Robin",
"lastName": "Younce",
"email": "robin@gmail.com",
"phoneNumber": "+33667447455"
},
"panelVars": {
"key": "BERLINE",
"name": "Berline",
"description": "Confortable et économique",
"nbBagages": 3,
"nbPassengers": 4
}
}
}
# Trip lifecycle
A trip will have different states and subStates during its lifecycle. Substates are used to give more details than states.
# States
The possible states are :
INCOMING: the trip has been confirmed. The trip will stay at this state until isONDUTYorCANCELLEDONDUTY: the passenger has been picked up and the trip is startedONPAYMENT: trip is in way to be DONE. This state can be used few seconds while trip is terminating.DONE: the passenger has been dropped off at its destinationCANCELLED: the trip has been cancelled
# Substates
The possible INCOMINGsubStates are :
STANDBY_BEFORE_APPROACH_INCOMING: we are waiting for the start of the approach by the driverIN_APPROACH_INCOMING: the driver is moving to the pick up pointIN_PLACE_INCOMING: the driver is arrived at the pick up point
The possible ONDUTYsubStates are :
PICKED_UP_STARTED: trip is started
The possible CANCELLEDsubStates are :
PASSENGER_CANCELLATION: trip has been cancelled by the passengerADMIN_CANCELLATION: trip has been cancelled by allocab. It means that we didn't find a driver for the trip.PASSENGER_NO_SHOW_CANCELLATION: driver was arrived at the pick up point, but passenger didn't show up
The possible DONEsubStates are :
DROPPED_OFF_TERMINATED: trip is over
# Other information
# Languages
We handle french and english. Please use the header accept-language with value fr or en to select trip locale.
# Passenger communication
If you provide us passenger email, we'll send him a trip confirmation email and eventually an email with trip invoice.
We need to get passenger phone number to ensure a good communication between the passenger and driver. Passenger will also reveived automatic text messages to follow his trip.
# Payment modes
You can choose the following payment mode when you confirm a trip :
- CREDIT : The passenger have nothing to pay. We'll send to your company a mensual invoice with all the trips.
# API documentation
From this point, you'll be able to book a trip 😃
here you can find the API documentation (opens new window)