Openjet Booking API documentation version 1.1
https://openjet-sandbox.com
Authentication
Obtain access token
Request example :
curl https://openjet-sandbox.com/oauth/v2/token \
-d "client_id"=demo_client_id \
-d "client_secret"=demo_client_secret \
-d "grant_type"=client_credentials
Response example :
{
"access_token": "NzFiYTM4ZTEwMjcwZTcyZWIzZTA0NmY3NjE3MTIyMjM1Y2NlMmNlNWEyMTAzY2UzYmY0YWIxYmUzNTkyMDcyNQ",
"expires_in": 3600,
"scope": "booking_api",
"token_type": "bearer"
}
Request for a resource
Put access token in the request header:
Authorization: Bearer NzFiYTM4ZTEwMjcwZTcyZWIzZTA0NmY3NjE3MTIyMjM1Y2NlMmNlNWEyMTAzY2UzYmY0YWIxYmUzNTkyMDcyNQ
Example :
curl https://openjet-sandbox.com/api/booking/customers/account \
-H "Authorization: Bearer NzFiYTM4ZTEwMjcwZTcyZWIzZTA0NmY3NjE3MTIyMjM1Y2NlMmNlNWEyMTAzY2UzYmY0YWIxYmUzNTkyMDcyNQ"
Usage
Customer
- Create account : POST
/api/booking/customers/account
- Update account : PUT
/api/booking/customers/account/{id}
Utils
- Get airports : GET
/api/booking/airports
- Get company airplane types : GET
/api/booking/company-airplane-types
- Get customer categories : GET
/api/booking/customer-categories
- Get customer types : GET
/api/booking/customer-types
- Get genders : GET
/api/booking/genders
- Get countries : GET
/api/booking/countries
Reservation
- Create reservation : POST
/api/booking/reservations
- Get customer reservations : GET
/api/booking/reservations/customer/{id}
/api/booking
get /api/booking/airports
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "airport"
}
Example:
[
{
"lfi": "EZ00013",
"lft": "AIRPORT",
"icao": "LKLN",
"name": "Plzen Line"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
get /api/booking/company-airplane-types
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "companyAirplaneType"
}
Example:
[
{
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"name": "Sabreliner 65"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
get /api/booking/customer-categories
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "customerCategory"
}
Example:
[
{
"id": "180e25d7f3904fb554a91303b40e2c5683ef39bd",
"name": "Business"
},
{
"id": "ea8ce39cda1e9782ecc5ee25839291ef9c120353",
"name": "Individual"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
get /api/booking/customer-types
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "customerType"
}
Example:
[
{
"id": 1,
"name": "Broker - 7 Day Credit"
},
{
"id": 2,
"name": "Broker - Ad Hoc"
},
{
"id": 3,
"name": "Individual"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
get /api/booking/genders
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "gender"
}
Example:
[
{
"id": 1,
"short": "Mr",
"long": "Mister"
},
{
"id": 2,
"short": "Mrs",
"long": "Mrs"
},
{
"id": 3,
"short": "Miss",
"long": "Miss"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
get /api/booking/countries
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "country"
}
Example:
[
{
"code": "AC",
"name": "Ascension Island"
},
{
"code": "AD",
"name": "Andorra"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
post /api/booking/customers/account
Body
Type: application/json
Schema:
{
"title": "customerForm",
"type": "object",
"properties": {
"id": {
"type": {
"$ref": "id.json"
},
"required": false,
"description": "Required for PUT method"
},
"customerCategory": {
"id": {
"type": {
"$ref": "id.json"
},
"required": true
}
},
"customerTypes": {
"id": {
"type": "array",
"item": {
"type": "integer"
},
"required": true
}
},
"gender": {
"id": {
"type": {
"$ref": "gender.json"
},
"required": false
}
},
"firstName": {
"type": "string",
"required": false,
"description": "Required when customer category is Individual"
},
"lastName": {
"type": "string",
"required": false,
"description": "Required when customer category is Individual"
},
"businessName": {
"type": "string",
"required": false,
"description": "Required when customer category is Business"
},
"birthDate": {
"type": {
"$ref": "date.json"
},
"required": false
},
"birthPlace": {
"type": "string",
"required": false
},
"nationality": {
"code": {
"type": {
"$ref": "country.json"
},
"required": false
}
},
"phone": {
"type": "string",
"required": false,
"description": "Fix phone number"
},
"email": {
"type": "string",
"required": true,
"description": "Required for authentication"
},
"mobile": {
"type": "string",
"required": true,
"description": "Required for authentication"
},
"address": {
"type": "string",
"required": false
},
"addressLine2": {
"type": "string",
"required": false
},
"country": {
"code": {
"type": {
"$ref": "country.json"
},
"required": false
}
},
"city": {
"type": "string",
"required": false
},
"postalCode": {
"type": "string",
"required": false
},
"passports": {
"type": "array",
"items": {
"$ref": "passportForm.json"
},
"required": false
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
Example:
{
"id": "28fe2a7f50887213cae9514d9f44c86a48dcb095",
"customerCategory": "180e25d7f3904fb554a91303b40e2c5683ef39bd",
"customerTypes": [
1
],
"gender": 1,
"firstName": "John",
"lastName": "Doe",
"businessName": "JohnDoe SA",
"birthDate": "1965-11-09",
"birthPlace": "Paris",
"nationality": "FR",
"phone": "0199999999",
"email": "john.doe@amnesia.com",
"mobile": "0033699999999",
"passports": [
{
"number": "FR8897565",
"issuedAt": "2010-11-09",
"expiredAt": "2017-11-09",
"issuingCountry": "FR"
}
],
"address": "blablabla",
"addressLine2": "blablabla",
"country": "FR",
"city": "Paris",
"postalCode": "75000"
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"title": "customer",
"type": "object",
"properties": {
"id": {
"type": {
"$ref": "id.json"
},
"required": true
},
"customerCategory": {
"type": {
"$ref": "customerCategory.json"
},
"required": true
},
"customerTypes": {
"type": "array",
"item": {
"$ref": "customerType.json"
},
"required": true
},
"gender": {
"type": "string",
"enum": [
"MR",
"MRS",
"MISS"
],
"required": false
},
"firstName": {
"type": "string",
"required": false
},
"lastName": {
"type": "string",
"required": false
},
"businessName": {
"type": "string",
"required": false
},
"birthDate": {
"type": {
"$ref": "dateTime.json"
},
"required": false
},
"birthPlace": {
"type": "string",
"required": false
},
"nationality": {
"type": {
"$ref": "country.json"
},
"required": false
},
"phone": {
"type": "string",
"required": false
},
"email": {
"type": "string",
"required": true
},
"mobile": {
"type": "string",
"required": true
},
"address": {
"type": "string",
"required": false
},
"addressLine2": {
"type": "string",
"required": false
},
"country": {
"type": {
"$ref": "country.json"
},
"required": false
},
"city": {
"type": "string",
"required": false
},
"postalCode": {
"type": "string",
"required": false
},
"passports": {
"type": "array",
"item": {
"$ref": "passport.json"
},
"required": false
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
Example:
{
"id": "28fe2a7f50887213cae9514d9f44c86a48dcb095",
"customerCategory": {
"id": "180e25d7f3904fb554a91303b40e2c5683ef39bd",
"name": "Business"
},
"customerTypes": [
{
"id": 1,
"name": "Broker - 7 Day Credit"
}
],
"gender": "MRS",
"firstName": "John",
"lastName": "Doe",
"businessName": "JohnDoe SA",
"birthDate": "1965-11-09",
"birthPlace": "Paris",
"nationality": {
"code": "AC",
"name": "Ascension Island"
},
"phone": "0199999999",
"email": "john.doe@amnesia.com",
"mobile": "0033699999999",
"passports": [
{
"number": "FR8897565",
"issuedAt": "2010-11-09",
"expiredAt": "2017-11-09",
"issuingCountry": {
"code": "AC",
"name": "Ascension Island"
}
}
],
"address": "blablabla",
"addressLine2": "blablabla",
"country": {
"code": "AC",
"name": "Ascension Island"
},
"city": "Paris",
"postalCode": "75000"
}
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
put /api/booking/customers/account/{id}
URI Parameters
- id: required (string)
Example:
28fe2a7f50887213cae9514d9f44c86a48dcb095
Body
Type: application/json
Schema:
{
"title": "customerForm",
"type": "object",
"properties": {
"id": {
"type": {
"$ref": "id.json"
},
"required": false,
"description": "Required for PUT method"
},
"customerCategory": {
"id": {
"type": {
"$ref": "id.json"
},
"required": true
}
},
"customerTypes": {
"id": {
"type": "array",
"item": {
"type": "integer"
},
"required": true
}
},
"gender": {
"id": {
"type": {
"$ref": "gender.json"
},
"required": false
}
},
"firstName": {
"type": "string",
"required": false,
"description": "Required when customer category is Individual"
},
"lastName": {
"type": "string",
"required": false,
"description": "Required when customer category is Individual"
},
"businessName": {
"type": "string",
"required": false,
"description": "Required when customer category is Business"
},
"birthDate": {
"type": {
"$ref": "date.json"
},
"required": false
},
"birthPlace": {
"type": "string",
"required": false
},
"nationality": {
"code": {
"type": {
"$ref": "country.json"
},
"required": false
}
},
"phone": {
"type": "string",
"required": false,
"description": "Fix phone number"
},
"email": {
"type": "string",
"required": true,
"description": "Required for authentication"
},
"mobile": {
"type": "string",
"required": true,
"description": "Required for authentication"
},
"address": {
"type": "string",
"required": false
},
"addressLine2": {
"type": "string",
"required": false
},
"country": {
"code": {
"type": {
"$ref": "country.json"
},
"required": false
}
},
"city": {
"type": "string",
"required": false
},
"postalCode": {
"type": "string",
"required": false
},
"passports": {
"type": "array",
"items": {
"$ref": "passportForm.json"
},
"required": false
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
Example:
{
"id": "28fe2a7f50887213cae9514d9f44c86a48dcb095",
"customerCategory": "180e25d7f3904fb554a91303b40e2c5683ef39bd",
"customerTypes": [
1
],
"gender": 1,
"firstName": "John",
"lastName": "Doe",
"businessName": "JohnDoe SA",
"birthDate": "1965-11-09",
"birthPlace": "Paris",
"nationality": "FR",
"phone": "0199999999",
"email": "john.doe@amnesia.com",
"mobile": "0033699999999",
"passports": [
{
"number": "FR8897565",
"issuedAt": "2010-11-09",
"expiredAt": "2017-11-09",
"issuingCountry": "FR"
}
],
"address": "blablabla",
"addressLine2": "blablabla",
"country": "FR",
"city": "Paris",
"postalCode": "75000"
}
HTTP status code 204
Body
Type: text/plain
Schema:
""
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
post /api/booking/reservations
Body
Type: application/json
Schema:
{
"title": "reservationForm",
"type": "object",
"properties": {
"customer": {
"id": {
"type": {
"$ref": "id.json"
},
"required": true
},
"description": "Customer account id"
},
"legs": {
"type": "array",
"items": {
"$ref": "legForm.json"
},
"required": true
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
Example:
{
"customer": "28fe2a7f50887213cae9514d9f44c86a48dcb095",
"legs": [
{
"startedAtUtc": "2017-11-09T07:30:00+00:00",
"paxNumber": 1,
"airportFrom": "FR24863",
"airportTo": "LU70687",
"companyAirplaneType": "07813a6900f7144a624f8d4af16c1c1bb676434f"
}
]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"title": "reservation",
"type": "object",
"properties": {
"id": {
"type": {
"$ref": "id.json"
},
"required": true
},
"legs": {
"type": "array",
"items": {
"$ref": "leg.json"
},
"required": true
},
"priceWithoutVAT": {
"type": "float",
"required": true
},
"priceWithVAT": {
"type": "float",
"required": true
},
"currencyCode": {
"type": "string",
"required": true,
"description": "ISO-3 Currency code"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
Example:
{
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"legs": [
{
"id": "54acfab982f8a2375cc220add5e0a2b87830ed9e",
"paxNumber": 1,
"startedAtUtc": "2017-11-09T07:30:00+00:00",
"endedAtUtc": "2017-11-09T08:55:00+00:00",
"duration": "01:25",
"airportFrom": {
"lfi": "FR24863",
"lft": "AIRPORT",
"icao": "LFLY",
"iata": "LYN",
"name": "Lyon Bron"
},
"airportTo": {
"lfi": "LU70687",
"lft": "AIRPORT",
"icao": "ELLX",
"iata": "LUX",
"name": "Luxembourg Findel"
},
"companyAirplaneType": {
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"name": "Sabreliner 65"
}
}
],
"priceWithoutVAT": 5000,
"priceWithVAT": 5500,
"currencyCode": "EUR"
}
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
get /api/booking/reservations/customer/{id}
URI Parameters
- id: required (string)
Example:
28fe2a7f50887213cae9514d9f44c86a48dcb095
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items" : "reservation"
}
Example:
[
{
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"legs": [
{
"id": "54acfab982f8a2375cc220add5e0a2b87830ed9e",
"paxNumber": 1,
"startedAtUtc": "2017-11-09T07:30:00+00:00",
"endedAtUtc": "2017-11-09T08:55:00+00:00",
"duration": "01:25",
"airportFrom": {
"lfi": "FR24863",
"lft": "AIRPORT",
"icao": "LFLY",
"iata": "LYN",
"name": "Lyon Bron"
},
"airportTo": {
"lfi": "LU70687",
"lft": "AIRPORT",
"icao": "ELLX",
"iata": "LUX",
"name": "Luxembourg Findel"
},
"companyAirplaneType": {
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"name": "Sabreliner 65"
}
}
],
"priceWithoutVAT": 5000,
"priceWithVAT": 5500,
"currencyCode": "EUR"
},
{
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"legs": [
{
"id": "54acfab982f8a2375cc220add5e0a2b87830ed9e",
"paxNumber": 1,
"startedAtUtc": "2017-11-09T07:30:00+00:00",
"endedAtUtc": "2017-11-09T08:55:00+00:00",
"duration": "01:25",
"airportFrom": {
"lfi": "FR24863",
"lft": "AIRPORT",
"icao": "LFLY",
"iata": "LYN",
"name": "Lyon Bron"
},
"airportTo": {
"lfi": "LU70687",
"lft": "AIRPORT",
"icao": "ELLX",
"iata": "LUX",
"name": "Luxembourg Findel"
},
"companyAirplaneType": {
"id": "07813a6900f7144a624f8d4af16c1c1bb676434f",
"name": "Sabreliner 65"
}
}
],
"priceWithoutVAT": 5000,
"priceWithVAT": 5500,
"currencyCode": "EUR"
}
]
HTTP status code 400
Body
Type: application/json
Schema:
{
"title": "formError",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
},
"details": {
"type": "array",
"required": false
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 404
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
HTTP status code 500
Body
Type: application/json
Schema:
{
"title": "error",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties" : {
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE"
],
"required": true
},
"url": {
"type": "string",
"required": true
},
"queryParams": {
"type": "array",
"required": false
},
"requestParams" : {
"type": "array",
"required": false
}
}
},
"error": {
"type": "object",
"properties": {
"code": {
"type": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true
},
"statusCode": {
"type": "integer",
"required": true
},
"message": {
"type": "string",
"required": true
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}