fairjungle (2.0.0)
Download OpenAPI specification:Download
This is the documentation for:
- the fairjungle custom REST API for managing all resources
- the SCIM API for users provisioning
You need an API Key or an OAuth Access Token associated to a user with admin
role in order to authenticate API requests.
An API Key or an OAuth Access Token carry many privileges, so be sure to keep them secure! Do not share them in publicly accessible areas such as GitHub, client-side code, and so forth.
Authentication is performed via HTTP Authorization
header. Example:
Authorization: Bearer BdA5ijnMx8m7dqX0Fnl7NmB18etmVhFI
All API requests must be made over HTTPS.
A JSON object is at the root of every request and response containing data. This object defines a document’s “top level”.
A request document may contain the following top-level member:
data
: the document’s “primary data”
A successfull response document may contain the following top-level members:
data
: the document’s “primary data”meta
: additional informations
Primary data
is either:
- a single resource object for requests that target single resources
- an array of resource objects, or an empty array (
[]
), for requests that target resource collections
The resource attributes that have no value are not returned, except for booleans attributes that always have a false
default value. It means that server nevers sends null
values in resource data.
Data can be fetched by sending a GET
request to an endpoint.
For example, the following request fetches a collection of users:
GET /api/users
The following request fetches a user:
GET /api/users/35c93884-5cca-4e72-98ff-eb52f611cb21
200 OK
The server responds to a successful request to fetch an individual resource or resource collection with a 200 OK
response.
The server responds to a successful request to fetch a resource collection with an array of resource objects or an empty array ([]
) as the response document’s primary data.
The server responds to a successful request to fetch an individual resource with a resource object provided as the response document’s primary data.
401 Unauthorized
The server responds with 401 Unauthorized
when processing a request without authentication.
403 Forbidden
The server returns 403 Forbidden
in response to an unsupported request to retrieve a resource.
404 Not Found
The server responds with 404 Not Found
when processing a request to fetch a single resource that does not exist.
All endpoints that return resource collections are paginated. A default pagination is applied if no pagination parameter is provided by client.
There are two kinds of paginations:
- Offset based pagination
- Cursor based pagination
The offset based pagination is supported by all endpoints, and it is the default pagination. Additionally, some endpoints may support cursor based pagination. Please refer to each individual endpoint documentation for more info.
To use cursor based pagination with endpoints that support it, then you have to set the pageKind
query parameter with cursor
as value.
Offset based pagination
Offset based pagination query parameters are:
pageKind
:offset
limit
: maximum number of items to return (default:10
)offset
: number of items to skip (default:0
)
The meta
top-level member in the response document contains those fields:
pageKind
:offset
limit
: the query parameter valueoffset
: the query parameter valuetotal
: the total number of items on the server
Cursor based pagination
Cursor based pagination query parameters are:
pageKind
:cursor
limit
: maximum number of items to return (default:10
)after
: a cursor value that identifies the first item to retrievebefore
: a cursor value that identifies the last item to retrieve
The after
and before
parameters are mutually exclusive: only one of after
or before
may be used.
The meta
top-level member in the response document contains those fields:
pageKind
:cursor
limit
: the query parameter valueafter
: the query parameter valuebefore
: the query parameter valuenextAfter
: a cursor value that can be used to retrieve next items withafter
query parameterprevBefore
: a cursor value that can be used to retrieve previous items withbefore
query parameter
Endpoints that return resource collections accepts additional query parameters to control sorting of returned resources:
order
: sorting order (default:asc
)sortBy
: sorting field (default:createdAt
)
The meta
top-level member in the response document contains those fields:
order
: the query parameter valuesortBy
: the query parameter value
The allowed order
values are asc
and desc
.
The allowed sortBy
values are endpoint specific. Please refer to each individual endpoint documentation for more info.
A resource can be created by sending a POST
request to a URL that represents a collection of resources. The request includes a single resource object as primary data.
Responses
201 Created
If the requested resource has been created successfully, the server returns a 201 Created
status code.
The response also includes a document that contains the primary resource created.
401 Unauthorized
The server responds with 401 Unauthorized
when processing a request without authentication.
403 Forbidden
The server returns 403 Forbidden
in response to an unsupported request to create a resource.
422 Unprocessable Entity
The server returns 422 Unprocessable Entity
when processing a POST
request to create a resource if the resource validation failed.
A resource can be:
- partially updated by sending a
PATCH
request to the URL that represents the resource - entirely replaced by sending a
PUT
request to the URL that represents the resource
The request includes a single resource object as primary data.
The patching mecanism follows the JSON merge patch specification:
- If a request does not include all of the attributes for a resource, the server interprets the missing attributes as if they were included with their current values.
- An attribute can be deleted by explicitly sending the
null
value. - The server does not interpret missing attributes as
null
values.
If you use the PUT
method, then:
- If a request does not include all of the attributes for a resource, the server interprets the missing attributes as if they were deleted.
- An attribute can still be deleted by explicitly sending the
null
value.
Responses
200 OK
The server returns a 200 OK
status code if an update is successful. The response document includes a representation of the updated resource as if a GET
request was made to the request URL.
401 Unauthorized
The server responds with 401 Unauthorized
when processing a request without authentication.
403 Forbidden
The server returns 403 Forbidden
in response to an unsupported request to update a resource.
404 Not Found
The server returns 404 Not Found
when processing a request to modify a resource that does not exist.
422 Unprocessable Entity
The server returns 422 Unprocessable Entity
when processing a PATCH
request to update a resource if the resource validation failed.
An individual resource can be deleted by making a DELETE
request to the resource’s URL.
Responses
200 OK
The server returns a 200 OK
status code if a deletion request is successful. The response document includes a representation of the resource before deletion.
401 Unauthorized
The server responds with 401 Unauthorized
when processing a request without authentication.
403 Forbidden
The server returns 403 Forbidden
in response to an unsupported request to delete a resource.
404 Not Found
The server returns a 404 Not Found
status code if a deletion request fails due to the resource not existing.
Fairjungle uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided. Codes in the 5xx
range indicate a server error.
The error response provides additional information about problems encountered while performing an operation.
This is the error response schema:
code required | string Enum: "badRequest" "conflict" "forbidden" "internalError" "invalidParam" "notFound" "notImpl" "validationFailed" Error code. |
message required | string Short, human-readable summary of the problem type. |
Array of objects |
{- "code": "validationFailed",
- "message": "Your request parameters didn't validate.",
- "invalid": [
- {
- "field": "field1",
- "message": "field1 is invalid"
}, - {
- "field": "subObject.field2",
- "message": "field2 is invalid"
}
]
}
The error response always have the following fields:
code
: an application-specific error code, expressed as a string value.message
: a short, human-readable summary of the problem.
The error response may have the following field:
invalid
: if errorcode
isvalidationFailed
orinvalidParam
then that field contains an array of error details with associated invalid fields or parameters
Items in the invalid
array have the following fields:
field
: field or parameter namevalue
: invalid value receivedcode
: validation codemessage
: validation message
Example for a 400 Bad Request
error:
{
"code": "badRequest",
"message": "Top-level document 'data' member is missing"
}
Example for a 400 Bad Request
error with invalid parameter:
{
"code": "invalidParam",
"invalid": [
{
"code": "paramValue",
"field": "limit",
"message": "limit parameter must be between 1 and 100",
"value": 500
}
],
"message": "Invalid pagination parameter provided"
}
Example for a 422 Unprocessable Entity
error:
{
"code": "validationFailed",
"invalid": [
{
"code": "country",
"field": "address.country",
"message": "The 'country' field is invalid",
"value": "PLOP"
},
{
"code": "email",
"field": "email",
"message": "The 'email' field is invalid",
"value": "john @mycompany.com"
},
{
"code": "required",
"field": "name",
"message": "The 'name' field is mandatory",
"value": ""
}
],
"message": "Resource validation failed"
}
A billing operation represents the lowest billing granularity.
The transactionKind
field:
A purchase
billing operation is created:
- when fairjungle booked a trip on your behalf (a billing operation is created for each part of the trip)
- when your subscription invoice is emitted
A refund
billing operation is created when a booking is canceled, or when a manual refund is issued. There are then two cases:
- if this is done before the corresponding
invoice
is emitted, then theinvoice
balance is adjusted and no refund resource is created (ie. therefundId
attribute isnull
) - if this is done after the corresponding
invoice
was emitted, then a money transfer is performed, a refund resource is created, and therefundId
attributed is filled
A dispute
billing operarion is created when our billing provider detects an issue with an already paid invoice, and automatically refunds back the invoice charge to your bank account.
A dispute resource is created, and the refundId
attributed is filled. This is a special case that must be regularized with our support team.
Note that the dispute does not appear on the invoice, and no refund resource is created.
The operationType
field:
An operation can be:
- a booking related operation, with either the generic
booking
value, or with one of the more specific values:car
,flight
,hotel
,rail
orseminar
- a
subscription
operation - an
other
operation (performed by the support team)
In case of booking operation, the bookingSnapshot
field contains the informations at the time of the booking, and if booking was performed via online
channel then the tripProjectId
field links to the corresponding trip project.
The status
field:
This field value depends on transactionKind
field:
purchase
: this is either the status of the corresponding invoice resource, ordelayed
if no invoice was emitted yet. Possible values:delayed
,open
,paid
,uncollectible
andvoid
.refund
: this is either the status of the corresponding refund resource if corresponding invoice status ispaid
, ordelayed
if refund is performed while the corresponding invoice status is stillopen
, otherwisesucceeded
if no invoice was emitted yet. Possible values:delayed
,waiting
,pending
,succeeded
,failed
andcanceled
.dispute
: this is the status of the corresponding dispute resource.
This is the billingOperation
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the billing operation. |
type required | string Value: "billingOperation" The resource type. |
createdAt required | string <date-time> Time at which the billing operation resource was created. |
required | object The billing operation amount. |
object Snapshot of informations at the time of booking. Present only if this is a booking related operation. | |
costCenterId | string = 24 characters ^[a-f\d]{24}$ The ID of the associated cost center. |
Array of objects Array of custom fields. | |
date required | string <date-time> Time at which the related action was performed. For example, the booking date in case of booking operation. |
description | string Description. |
disputeId | string = 24 characters ^[a-f\d]{24}$ The ID of the associated dispute. |
invoiceId | string = 24 characters ^[a-f\d]{24}$ The ID of the associated invoice. |
operationType required | string Enum: "booking" "car" "flight" "hotel" "other" "rail" "seminar" "subscription" Billing operation type. |
projectCodeId | string = 24 characters ^[a-f\d]{24}$ The ID of the associated project code. |
refundId | string = 24 characters ^[a-f\d]{24}$ The ID of the associated refund. |
status required | string Billing operation status. |
transactionKind required | string Enum: "dispute" "purchase" "refund" Transaction kind. |
tripProjectId | string <uuid> <= 50 characters ^[@~\-\.\w]+$ The ID of the associated trip project. Present only if this is a booking operation and if |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "billingOperation",
- "createdAt": "2019-09-25T07:35:42Z",
- "amount": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "bookingSnapshot": {
- "booker": {
- "id": "string",
- "email": "user@example.com",
- "fullName": "string"
}, - "channel": "offline",
- "date": "2019-09-25T07:35:42Z",
- "fairbudget": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "hotel": {
- "checkinLocaleDate": "2020-09-25",
- "checkoutLocaleDate": "2020-09-25",
- "place": {
- "airport": "string",
- "city": "string",
- "countryCode": "string"
}
}, - "kind": "car",
- "reference": "string",
- "supplierName": "string",
- "transport": {
- "cabinClass": "business",
- "category": "string",
- "departure": {
- "airport": "string",
- "city": "string",
- "countryCode": "string"
}, - "departureLocaleDate": "2020-09-25",
- "destination": {
- "airport": "string",
- "city": "string",
- "countryCode": "string"
}, - "fareType": "flex",
- "itineraryType": "multiCity",
- "lowCost": true,
- "returnLocaleDate": "2020-09-25"
}, - "traveler": {
- "id": "string",
- "email": "user@example.com",
- "fullName": "string"
}
}, - "costCenterId": "5de7bc72bf882f3bb31619bf",
- "customFields": [
- {
- "customFieldId": "5de7bc72bf882f3bb31619bf",
- "name": "string",
- "values": [
- {
- "customFieldOptionId": "5de7bc72bf882f3bb31619bf",
- "data": "string",
- "displayName": "string"
}
]
}
], - "date": "2019-09-25T07:35:42Z",
- "description": "Roundtrip flight - Diego de la Vega - Paris > Tokyo - 25SEP2020",
- "disputeId": "5de7bc72bf882f3bb31619bf",
- "invoiceId": "5de7bc72bf882f3bb31619bf",
- "operationType": "booking",
- "projectCodeId": "5de7bc72bf882f3bb31619bf",
- "refundId": "5de7bc72bf882f3bb31619bf",
- "status": "string",
- "transactionKind": "dispute",
- "tripProjectId": "35c93884-5cca-4e72-98ff-eb52f611cb21"
}
List billing operations
Returns a list of billing operations.
By default, billing operations are returned sorted by creation date with oldest operations returned first.
The sortBy
parameter allows you to sort billing operations by date
field too.
You can enable cursor based pagination by setting pageKind
parameter with cursor
value.
query Parameters
pageKind | string Default: "offset" Enum: "offset" "cursor" Pagination kind. |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
before | string Example: before=ZG9jX2lkOjVkOTc2OTYxYTI0YjBjMTcyNmY2NWJkMg== Cursor value that identifies the last item to retrieve. Can be used only for cursor based pagination. |
after | string Example: after=ZG9jX2lkOjVkYWVmYThhMTg1YjNlNmNiM2Q3OTY3OA== Cursor value that identifies the first item to retrieve. Can be used only for cursor based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "date" Sorting field. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e725560cdb9f6125a4acb51",
- "type": "billingOperation",
- "createdAt": "2020-03-18T17:07:44Z",
- "amount": {
- "currency": "EUR",
- "total": 5
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "offline",
- "date": "2020-03-18T16:52:23Z",
- "kind": "car",
- "reference": "OSEF984LOL",
- "supplierName": "Sixt",
- "transport": {
- "departure": {
- "city": "Rennes"
}, - "departureLocaleDate": "2020-03-20",
- "destination": {
- "city": "Paris"
}, - "returnLocaleDate": "2020-03-23"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "hubert@mycorp.fr",
- "fullName": "Hubert Bonisseur de La Bath"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-18T17:07:44Z",
- "invoiceId": "5e5feb94509e9b5aac9db538",
- "operationType": "car",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "refundId": "5e725560cdb9f6125a4acb50",
- "status": "succeeded",
- "transactionKind": "refund"
}, - {
- "id": "5e721c08b2d0c235c4d99f88",
- "type": "billingOperation",
- "createdAt": "2020-03-18T13:03:04Z",
- "amount": {
- "currency": "EUR",
- "total": 154.63
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "online",
- "date": "2020-03-18T13:02:58Z",
- "fairbudget": {
- "currency": "EUR",
- "total": 302
}, - "kind": "flight",
- "reference": "UXT6AZ",
- "supplierName": "Air France",
- "transport": {
- "cabinClass": "economy",
- "departure": {
- "airport": "ORY",
- "city": "Paris"
}, - "departureLocaleDate": "2020-03-22",
- "destination": {
- "airport": "BCN",
- "city": "Barcelona"
}, - "itineraryType": "roundTrip",
- "returnLocaleDate": "2020-03-26"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "hubert@mycorp.fr",
- "fullName": "Hubert Bonisseur de La Bath"
}
}, - "date": "2020-03-18T13:03:04Z",
- "description": "Roundtrip flight - Hubert Bonisseur de La Bath - Paris > Barcelona - 22MAR2020",
- "invoiceId": "5e721c08b2d0c235c4d99f87",
- "operationType": "flight",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "status": "paid",
- "transactionKind": "purchase",
- "tripProjectId": "982b935d-7ffc-4b15-8535-a9cc43ae40c7"
}, - {
- "id": "5e7103a0c2ac7d90eeb45560",
- "type": "billingOperation",
- "createdAt": "2020-03-17T17:06:40Z",
- "amount": {
- "currency": "EUR",
- "total": 139
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "online",
- "date": "2020-03-17T16:52:23Z",
- "fairbudget": {
- "currency": "EUR",
- "total": 182
}, - "kind": "rail",
- "reference": "OSEF984LOL",
- "supplierName": "TGV",
- "transport": {
- "cabinClass": "second",
- "departure": {
- "city": "Paris"
}, - "departureLocaleDate": "2020-03-23",
- "destination": {
- "city": "Toulouse"
}, - "fareType": "semiFlex",
- "returnLocaleDate": "2020-03-25"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "maurice@mycorp.fr",
- "fullName": "Maurice Mercaillon"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-17T17:06:40Z",
- "description": "Roundtrip train - Maurice Mercaillon - Paris > Toulouse - 23MAR2020",
- "invoiceId": "5e7103a0c2ac7d90eeb4555f",
- "operationType": "rail",
- "status": "paid",
- "transactionKind": "purchase",
- "tripProjectId": "b4206e50-5e08-4285-82c4-7f39413a6c36"
}, - {
- "id": "5e70ffd5b5db0f5bb839a4ab",
- "type": "billingOperation",
- "createdAt": "2020-03-17T16:50:29Z",
- "amount": {
- "currency": "EUR",
- "total": 110
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "offline",
- "date": "2020-03-17T16:52:23Z",
- "kind": "car",
- "reference": "OSEF984LOL",
- "supplierName": "Sixt",
- "transport": {
- "cabinClass": "second",
- "departure": {
- "city": "Milan"
}, - "departureLocaleDate": "2020-01-28",
- "destination": {
- "city": "Milan"
}, - "fareType": "flex",
- "returnLocaleDate": "2020-01-30"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "marie-jo@mycorp.fr",
- "fullName": "Marie-Jo Cotin"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-17T16:50:29Z",
- "description": "Car rental - Marie-Jo Cotin - Milan - 28MAR2020",
- "invoiceId": "5e5feb94509e9b5aac9db538",
- "operationType": "car",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "status": "paid",
- "transactionKind": "purchase"
}
], - "meta": {
- "pageKind": "cursor",
- "limit": 10,
- "prevBefore": "b3BlcmF0aW9uX2RhdGU6MTU4NDY5NTg2NTkwOQ==",
- "nextAfter": "b3BlcmF0aW9uX2RhdGU6MTU4NDY5NTkwNDYzMw==",
- "order": "asc",
- "sortBy": "createdAt"
}
}
Retrieve a billing operation
Retrieves a billing operation.
path Parameters
id required | string <uuid> The identifier of the billing operation to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7103a0c2ac7d90eeb45560",
- "type": "billingOperation",
- "createdAt": "2020-03-17T17:06:40Z",
- "amount": {
- "currency": "EUR",
- "total": 13
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "online",
- "date": "2020-03-17T16:52:23Z",
- "fairbudget": {
- "currency": "EUR",
- "total": 182
}, - "kind": "rail",
- "reference": "OSEF984LOL",
- "supplierName": "TGV",
- "transport": {
- "cabinClass": "second",
- "departure": {
- "city": "Paris"
}, - "departureLocaleDate": "2020-03-23",
- "destination": {
- "city": "Toulouse"
}, - "fareType": "semiFlex",
- "returnLocaleDate": "2020-03-25"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "maurice@mycorp.fr",
- "fullName": "Maurice Mercaillon"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-17T17:06:40Z",
- "description": "Roundtrip train - Maurice Mercaillon - Paris > Toulouse - 23MAR2020",
- "invoiceId": "5e7103a0c2ac7d90eeb4555f",
- "operationType": "rail",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "status": "paid",
- "transactionKind": "purchase",
- "tripProjectId": "b4206e50-5e08-4285-82c4-7f39413a6c36"
}
}
Each billing profile has its own payment method and billing informations.
NOTE: you can't associate a payment method to a billing profile through the API.
This is the billingProfile
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the billing profile. |
type required | string Value: "billingProfile" The resource type. |
createdAt required | string <date-time> Time at which the billing profile was created. |
object (BillingProfileAddress) The billing profile postal address. | |
archived required | boolean If true, then that billing profile is archived. |
companyName | string Full business name. |
email required | string <email> Email used to receive billing infos. |
lang required | string Enum: "en" "fr" Language used for billing emails and generated invoices. |
name required | string Billing profile name. |
paymentMethodSummary | string The payment method associated to that billing profile. |
taxId | string European VAT number. |
travelPolicyId | string = 24 characters ^[a-f\d]{24}$ The ID of the travel policy associated to this billing profile. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "billingProfile",
- "createdAt": "2019-09-25T07:35:42Z",
- "address": {
- "city": "Saint-Mandé",
- "country": "FR",
- "line1": "string",
- "line2": "5 Avenue du Général de Gaulle",
- "postalCode": "94160",
- "state": "string"
}, - "archived": true,
- "companyName": "Fairjungle",
- "email": "john.smith@example.com",
- "lang": "en",
- "name": "France Department",
- "paymentMethodSummary": "Credit card (****-4242)",
- "taxId": "DE123456789",
- "travelPolicyId": "5de7bc72bf882f3bb31619bf"
}
List billing profiles
Returns a list of billing profiles.
The archived
parameter permits to returns only archived or non archived billing profiles.
By default, billing profiles are returned sorted by creation date with oldest billing profiles returned first.
The sortBy
parameter allows you to sort billing operations by name
field too.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "name" Sorting field. |
archived | string Example: archived=false If |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e7e09f76cb4333b7ec64774",
- "type": "billingProfile",
- "createdAt": "2020-03-27T14:13:11Z",
- "archived": false,
- "address": {
- "city": "Paris",
- "country": "FR",
- "line1": "13 Avenue du Président Wilson",
- "postalCode": "75116"
}, - "companyName": "MyCorp France",
- "email": "jean@mycorp.fr",
- "lang": "fr",
- "name": "French division",
- "paymentMethodSummary": "Credit card (****-4242)",
- "taxId": "FR12345678912"
}, - {
- "id": "5e7defacfe02eda5c84b43c3",
- "type": "billingProfile",
- "createdAt": "2020-03-27T12:21:00Z",
- "archived": false,
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-472"
}, - "companyName": "MyCorp Portugal LDA",
- "email": "juan@mycorp.pt",
- "lang": "fr",
- "name": "Portugal division",
- "paymentMethodSummary": "SEPA direct debit (****2606)",
- "taxId": "PT123456789"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a billing profile
Creates a new billing profile.
Request Body schema: application/jsonrequired
Billing profile resource
required | object (BillingProfileReplace) The billing profile resource. | ||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "address": {
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-472",
- "city": "Lisboa",
- "country": "PT"
}, - "companyName": "MyCorp Portugal LDA",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division",
- "taxId": "PT123456789"
}
}
Response samples
- 201
{- "data": {
- "id": "5e7defacfe02eda5c84b43c3",
- "type": "billingProfile",
- "createdAt": "2020-03-27T12:21:00Z",
- "archived": false,
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-470"
}, - "companyName": "MyCorp Portugal",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division",
- "taxId": "PT123456789"
}
}
Retrieve a billing profile
Retrieves a billing profile.
path Parameters
id required | string <uuid> The identifier of the billing profile to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7defacfe02eda5c84b43c3",
- "type": "billingProfile",
- "createdAt": "2020-03-27T12:21:00Z",
- "archived": false,
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-470"
}, - "companyName": "MyCorp Portugal",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division",
- "taxId": "PT123456789"
}
}
Patch a billing profile
Updates a billing profile with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the billing profile to update. |
Request Body schema: application/jsonrequired
Billing profile resource
required | object (BillingProfilePatch) The billing profile fields to update. | ||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "address": {
- "postalCode": "1100-472"
}, - "companyName": "MyCorp Portugal LDA"
}
}
Response samples
- 200
{- "data": {
- "id": "5e7defacfe02eda5c84b43c3",
- "type": "billingProfile",
- "createdAt": "2020-03-27T12:21:00Z",
- "archived": false,
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-472"
}, - "companyName": "MyCorp Portugal LDA",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division",
- "taxId": "PT123456789"
}
}
Replace a billing profile
Updates a billing profile by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the billing profile to update. |
Request Body schema: application/jsonrequired
Billing profile resource
required | object (BillingProfileReplace) The billing profile resource. | ||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-472"
}, - "companyName": "MyCorp Portugal LDA",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division"
}
}
Response samples
- 200
{- "data": {
- "id": "5e7defacfe02eda5c84b43c3",
- "type": "billingProfile",
- "createdAt": "2020-03-27T12:21:00Z",
- "archived": false,
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-472"
}, - "companyName": "MyCorp Portugal LDA",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division"
}
}
Delete a billing profile
Deletes a billing profile.
path Parameters
id required | string <uuid> The identifier of the billing profile to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7defacfe02eda5c84b43c3",
- "type": "billingProfile",
- "createdAt": "2020-03-27T12:21:00Z",
- "archived": false,
- "address": {
- "city": "Lisboa",
- "country": "PT",
- "line1": "Campo de Santa Clara",
- "postalCode": "1100-472"
}, - "companyName": "MyCorp Portugal LDA",
- "email": "juan@mycorp.pt",
- "lang": "en",
- "name": "Portugal division",
- "taxId": "PT123456789"
}
}
This is the costCenter
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the cost center. |
type required | string Value: "costCenter" The resource type. |
createdAt required | string <date-time> Time at which the cost center was created. |
archived required | boolean If true, then that cost center is archived. |
name required | string Cost center name. |
travelPolicyId | string = 24 characters ^[a-f\d]{24}$ The ID of the travel policy associated to this cost center. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "costCenter",
- "createdAt": "2019-09-25T07:35:42Z",
- "archived": true,
- "name": "VIP",
- "travelPolicyId": "5de7bc72bf882f3bb31619bf"
}
List cost centers
Returns a list of cost centers.
The archived
parameter permits to returns only archived or non archived cost centers.
By default, cost centers are returned sorted by creation date with oldest cost centers returned first.
The sortBy
parameter allows you to sort cost centers by name
field too.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "name" Sorting field. |
archived | string Example: archived=false If |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e7e0c826cb4333b7ec64778",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:24:02Z",
- "archived": false,
- "name": "Management"
}, - {
- "id": "5e7e0c9a6cb4333b7ec64779",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:24:26Z",
- "archived": false,
- "name": "Marketing"
}, - {
- "id": "5e7e0c796cb4333b7ec64777",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:23:53Z",
- "archived": false,
- "name": "R&D"
}, - {
- "id": "5d89c6180bd67df9182f3356",
- "type": "costCenter",
- "createdAt": "2019-09-24T07:30:32Z",
- "archived": false,
- "name": "default"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 4,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a cost center
Creates a new cost center.
Request Body schema: application/jsonrequired
Cost center resource
required | object (CostCenterReplace) The cost center resource. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "name": "HR"
}
}
Response samples
- 201
{- "data": {
- "id": "5e7e0bfe6cb4333b7ec64776",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:21:50Z",
- "archived": false,
- "name": "HR"
}
}
Retrieve a cost center
Retrieves a cost center.
path Parameters
id required | string <uuid> The identifier of the cost center to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7e0bfe6cb4333b7ec64776",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:21:50Z",
- "archived": false,
- "name": "HR"
}
}
Patch a cost center
Updates a cost center with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the cost center to update. |
Request Body schema: application/jsonrequired
Cost center resource
required | object (CostCenterPatch) The cost center fields to update. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "name": "HR & Finance"
}
}
Response samples
- 200
{- "data": {
- "id": "5e7e0bfe6cb4333b7ec64776",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:21:50Z",
- "archived": false,
- "name": "HR & Finance"
}
}
Replace a cost center
Updates a cost center by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the cost center to update. |
Request Body schema: application/jsonrequired
Cost center resource
required | object (CostCenterReplace) The cost center resource. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "name": "HR & Finance"
}
}
Response samples
- 200
{- "data": {
- "id": "5e7e0bfe6cb4333b7ec64776",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:21:50Z",
- "archived": false,
- "name": "HR & Finance"
}
}
Delete a cost center
Deletes a cost center.
path Parameters
id required | string <uuid> The identifier of the cost center to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7e0bfe6cb4333b7ec64776",
- "type": "costCenter",
- "createdAt": "2020-03-27T14:21:50Z",
- "archived": false,
- "name": "HR & Finance"
}
}
This is the customField
resource schema:
dataType required | string Enum: "text" "option" "optionsList" Custom field value data type. |
resourceType required | string Enum: "tripProject" "user" Custom field is attached to that resource type. |
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the custom field. |
type required | string Value: "customField" The resource type. |
createdAt required | string <date-time> Time at which the custom field was created. |
description | string Custom field description. |
disabled required | boolean If true, then that custom field can't be assigned to resource anymore. |
editableByApprover | boolean If true, then custom field can be edited by approver. |
mandatory required | boolean If true, then custom field id not optional. |
name required | string Custom field name. |
validationRegexp | string A regular expression used to ensure that custom field value has a particular format. |
{- "dataType": "text",
- "resourceType": "tripProject",
- "id": "5de7bc72bf882f3bb31619bf",
- "type": "customField",
- "createdAt": "2019-09-25T07:35:42Z",
- "description": "string",
- "disabled": true,
- "editableByApprover": true,
- "mandatory": true,
- "name": "Budget Code",
- "validationRegexp": "^\\\\d\\\\d\\\\d\\\\d$"
}
This is the customFieldOption
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the custom field option. |
type required | string Value: "customFieldOption" The resource type. |
createdAt required | string <date-time> Time at which the custom field option was created. |
customFieldId required | string = 24 characters ^[a-f\d]{24}$ The ID of the custom field associated to this option. |
data required | string custom field option value data. |
disabled required | boolean If true, then that custom field option can't be assigned to resource anymore. |
displayName | string custom field option display name. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "customFieldOption",
- "createdAt": "2019-09-25T07:35:42Z",
- "customFieldId": "5de7bc72bf882f3bb31619bf",
- "data": "string",
- "disabled": true,
- "displayName": "string"
}
List custom fields
Returns a list of custom fields.
Custom fields are returned sorted by creation date, and by default oldest custom fields are returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5fc5127ec00e48351c12b6de",
- "type": "customField",
- "createdAt": "2020-12-16T09:55:35Z",
- "dataType": "text",
- "description": "A free text for your business unit",
- "disabled": false,
- "mandatory": false,
- "name": "Business unit tag",
- "resourceType": "tripProject"
}, - {
- "id": "5fce2fc333d1f42f6ee71dba",
- "type": "customField",
- "createdAt": "2020-12-16T09:47:41Z",
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "mandatory": false,
- "name": "Budget center",
- "resourceType": "tripProject"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a custom field
Creates a new custom field.
Request Body schema: application/jsonrequired
Custom field resource
required | object (CustomFieldCreate) The custom field resource. | ||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "name": "Budget code",
- "resourceType": "tripProject"
}
}
Response samples
- 201
{- "data": {
- "id": "5fce2fc333d1f42f6ee71dba",
- "type": "customField",
- "createdAt": "2020-12-16T09:47:41Z",
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "mandatory": false,
- "name": "Budget code",
- "resourceType": "tripProject"
}
}
Retrieve a custom field
Retrieves a custom field.
path Parameters
id required | string <uuid> The identifier of the custom field to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5fce2fc333d1f42f6ee71dba",
- "type": "customField",
- "createdAt": "2020-12-16T09:47:41Z",
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "mandatory": false,
- "name": "Budget code",
- "resourceType": "tripProject"
}
}
Patch a custom field
Updates a custom field with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the custom field to update. |
Request Body schema: application/jsonrequired
Custom field resource
required | object (CustomFieldPatch) The custom field fields to update. | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "name": "Budget center"
}
}
Response samples
- 200
{- "data": {
- "id": "5fce2fc333d1f42f6ee71dba",
- "type": "customField",
- "createdAt": "2020-12-16T09:47:41Z",
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "mandatory": false,
- "name": "Budget center",
- "resourceType": "tripProject"
}
}
Replace a custom field
Updates a custom field by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the custom field to update. |
Request Body schema: application/jsonrequired
Custom field resource
required | object (CustomFieldReplace) The custom field resource. | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "name": "Budget center"
}
}
Response samples
- 200
{- "data": {
- "id": "5fce2fc333d1f42f6ee71dba",
- "type": "customField",
- "createdAt": "2020-12-16T09:47:41Z",
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "mandatory": false,
- "name": "Budget center",
- "resourceType": "tripProject"
}
}
Delete a custom field
Deletes a custom field.
path Parameters
id required | string <uuid> The identifier of the custom field to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "5fce2fc333d1f42f6ee71dba",
- "type": "customField",
- "createdAt": "2020-12-16T09:47:41Z",
- "dataType": "option",
- "description": "Every trip project should be associated to a budget",
- "disabled": false,
- "mandatory": false,
- "name": "Budget center",
- "resourceType": "tripProject"
}
}
List custom field options
Returns a list of custom field options.
Custom field options are returned sorted by creation date, and by default oldest custom field options are returned first.
Cursor based pagination is not available.
path Parameters
id required | string <uuid> The identifier of the custom field. |
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5fc4bb0eb8de9273ca904b12",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T10:03:28Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "MRA672",
- "disabled": false
}, - {
- "id": "5fc5127ec00e48351c12b6e2",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T09:52:08Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "BRU499",
- "disabled": false
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a custom field option
Creates a new custom field option.
path Parameters
id required | string <uuid> The identifier of the custom field. |
Request Body schema: application/jsonrequired
Custom field option resource
required | object (CustomFieldOptionReplace) The custom field option resource. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "data": "BRU425"
}
}
Response samples
- 201
{- "data": {
- "id": "5fc5127ec00e48351c12b6e2",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T09:52:08Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "BRU425",
- "disabled": false
}
}
Retrieve a custom field option
Retrieves a custom field option.
path Parameters
id required | string <uuid> The identifier of the custom field. |
optionId required | string <uuid> The identifier of the custom field option to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5fc5127ec00e48351c12b6e2",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T09:52:08Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "BRU425",
- "disabled": false
}
}
Patch a custom field option
Updates a custom field option with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the custom field. |
optionId required | string <uuid> The identifier of the custom field option to update. |
Request Body schema: application/jsonrequired
Custom field option resource
required | object (CustomFieldOptionPatch) The custom field option fields to update. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "data": "BRU499"
}
}
Response samples
- 200
{- "data": {
- "id": "5fc5127ec00e48351c12b6e2",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T09:52:08Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "BRU499",
- "disabled": false
}
}
Replace a custom field option
Updates a custom field option by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the custom field. |
optionId required | string <uuid> The identifier of the custom field option to update. |
Request Body schema: application/jsonrequired
Custom field option resource
required | object (CustomFieldOptionReplace) The custom field option resource. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "data": "BRU499"
}
}
Response samples
- 200
{- "data": {
- "id": "5fc5127ec00e48351c12b6e2",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T09:52:08Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "BRU499",
- "disabled": false
}
}
Delete a custom field option
Deletes a custom field option.
path Parameters
id required | string <uuid> The identifier of the custom field. |
optionId required | string <uuid> The identifier of the custom field option to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "5fc5127ec00e48351c12b6e2",
- "type": "customFieldOption",
- "createdAt": "2020-12-16T09:52:08Z",
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "data": "BRU499",
- "disabled": false
}
}
This is the dispute
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the dispute. |
type required | string Value: "dispute" The resource type. |
createdAt required | string <date-time> Time at which the dispute was created. |
required | object The dispute amount. |
invoiceId required | string = 24 characters ^[a-f\d]{24}$ The ID of the invoice associated to this dispute. |
reason required | string Enum: "warningNeedsResponse" "bankCannotProcess" "creditNotProcessed" "customerInitiated" "debitNotAuthorized" "duplicate" "fraudulent" "general" "incorrectAccountDetails" "insufficientFunds" "productNotReceived" "productUnacceptable" "subscriptionCanceled" "unrecognized" Dispute reason |
status required | string Enum: "warningNeedsResponse" "warningUnderReview" "warningClosed" "needsResponse" "underReview" "chargeRefunded" "won" "lost" "solved" Dispute status |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "dispute",
- "createdAt": "2019-09-25T07:35:42Z",
- "amount": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "invoiceId": "5de7bc72bf882f3bb31619bf",
- "reason": "warningNeedsResponse",
- "status": "warningNeedsResponse"
}
List disputes
Returns a list of disputes.
Disputes are returned sorted by creation date, and by default oldest disputes are returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e67b70ec22d3e295d4fa56f",
- "type": "dispute",
- "createdAt": "2020-03-10T15:49:34Z",
- "amount": {
- "currency": "EUR",
- "total": 157.63
}, - "invoiceId": "5e67b709c22d3e295d4fa56c",
- "reason": "general",
- "status": "underReview"
}, - {
- "id": "5e67b597f1fd724c3b30cc85",
- "type": "dispute",
- "createdAt": "2020-03-10T15:43:19Z",
- "amount": {
- "currency": "EUR",
- "total": 161.63
}, - "invoiceId": "5e67b58ff1fd724c3b30cc82",
- "reason": "customerInitiated",
- "status": "lost"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Retrieve a dispute
Retrieves a dispute.
path Parameters
id required | string <uuid> The identifier of the dispute to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e67b597f1fd724c3b30cc85",
- "type": "dispute",
- "createdAt": "2020-03-10T15:43:19Z",
- "amount": {
- "currency": "EUR",
- "total": 161.63
}, - "invoiceId": "5e67b58ff1fd724c3b30cc82",
- "reason": "customerInitiated",
- "status": "lost"
}
}
Events occur when the state of another API resource changes. The state of that resource at the time of the change
is embedded in the event's data
field. For example, a costCenter.created
event will contain a cost center
, and an invoice.updated
event will contain an invoice
.
Events can be sent to your applications with webhooks.
NOTE: access to events through the API is guaranteed only for 30 days.
This is the event
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the event. |
type required | string Value: "event" The resource type. |
createdAt required | string <date-time> Time at which the event was created. |
required | BillingOperation (object) or BillingProfile (object) or Booking (object) or BookingCancellation (object) or BookingModification (object) or CostCenter (object) or Invoice (object) or ProjectCode (object) or TravelPolicy (object) or TripProject (object) or User (object) or Webhook (object) Object containing the resource relevant to the event. |
kind required | string Enum: "billingOperation.created" "billingOperation.updated" "billingProfile.created" "billingProfile.deleted" "billingProfile.updated" "bookingCancellation.created" "bookingModification.created" "costCenter.created" "costCenter.deleted" "costCenter.updated" "dispute.created" "dispute.updated" "invoice.created" "invoice.updated" "projectCode.created" "projectCode.deleted" "projectCode.updated" "refund.created" "refund.updated" "travelPolicy.created" "travelPolicy.deleted" "travelPolicy.updated" "tripProject.booking.failed" "tripProject.booking.succeeded" "tripProject.created" "user.created" "user.deleted" "user.updated" "webhook.created" "webhook.deleted" "webhook.updated" Event kind |
previousAttributes | object Object containing the names of the attributes that have changed, and their previous values (sent along only with |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "event",
- "createdAt": "2019-09-25T07:35:42Z",
- "data": {
- "id": "5de7bc72bf882f3bb31619bf",
- "type": "billingOperation",
- "createdAt": "2019-09-25T07:35:42Z",
- "amount": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "bookingSnapshot": {
- "booker": {
- "id": "string",
- "email": "user@example.com",
- "fullName": "string"
}, - "channel": "offline",
- "date": "2019-09-25T07:35:42Z",
- "fairbudget": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "hotel": {
- "checkinLocaleDate": "2020-09-25",
- "checkoutLocaleDate": "2020-09-25",
- "place": {
- "airport": "string",
- "city": "string",
- "countryCode": "string"
}
}, - "kind": "car",
- "reference": "string",
- "supplierName": "string",
- "transport": {
- "cabinClass": "business",
- "category": "string",
- "departure": {
- "airport": "string",
- "city": "string",
- "countryCode": "string"
}, - "departureLocaleDate": "2020-09-25",
- "destination": {
- "airport": "string",
- "city": "string",
- "countryCode": "string"
}, - "fareType": "flex",
- "itineraryType": "multiCity",
- "lowCost": true,
- "returnLocaleDate": "2020-09-25"
}, - "traveler": {
- "id": "string",
- "email": "user@example.com",
- "fullName": "string"
}
}, - "costCenterId": "5de7bc72bf882f3bb31619bf",
- "customFields": [
- {
- "customFieldId": "5de7bc72bf882f3bb31619bf",
- "name": "string",
- "values": [
- {
- "customFieldOptionId": "5de7bc72bf882f3bb31619bf",
- "data": "string",
- "displayName": "string"
}
]
}
], - "date": "2019-09-25T07:35:42Z",
- "description": "Roundtrip flight - Diego de la Vega - Paris > Tokyo - 25SEP2020",
- "disputeId": "5de7bc72bf882f3bb31619bf",
- "invoiceId": "5de7bc72bf882f3bb31619bf",
- "operationType": "booking",
- "projectCodeId": "5de7bc72bf882f3bb31619bf",
- "refundId": "5de7bc72bf882f3bb31619bf",
- "status": "string",
- "transactionKind": "dispute",
- "tripProjectId": "35c93884-5cca-4e72-98ff-eb52f611cb21"
}, - "kind": "billingOperation.created",
- "previousAttributes": { }
}
List events
Returns a list of events.
Events are returned sorted by creation date, and by default oldest operations are returned first.
You can enable cursor based pagination by setting pageKind
parameter with cursor
value.
query Parameters
pageKind | string Default: "offset" Enum: "offset" "cursor" Pagination kind. |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
before | string Example: before=ZG9jX2lkOjVkOTc2OTYxYTI0YjBjMTcyNmY2NWJkMg== Cursor value that identifies the last item to retrieve. Can be used only for cursor based pagination. |
after | string Example: after=ZG9jX2lkOjVkYWVmYThhMTg1YjNlNmNiM2Q3OTY3OA== Cursor value that identifies the first item to retrieve. Can be used only for cursor based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5def57af52ce567ff727db33",
- "type": "event",
- "createdAt": "2020-09-15T13:58:53Z",
- "data": {
- "createdAt": "2020-09-15T13:58:53Z",
- "id": "5f60c89d1bfd3165e7460ab7",
- "name": "Finance",
- "archived": false,
- "type": "costCenter"
}, - "kind": "costCenter.created"
}, - {
- "id": "5e7a34deb3f38ff4d7dbd888",
- "type": "event",
- "createdAt": "2020-09-15T13:59:26Z",
- "data": {
- "createdAt": "2020-09-15T13:58:53Z",
- "id": "5f60c89d1bfd3165e7460ab7",
- "name": "HR",
- "archived": false,
- "type": "costCenter"
}, - "kind": "costCenter.updated",
- "previousAttributes": {
- "name": "Finance"
}
}
], - "meta": {
- "pageKind": "cursor",
- "limit": 10,
- "prevBefore": "ZG9jX2lkOjVkZWY1N2FmNTJjZTU2N2ZmNzI3ZGIzMw==",
- "nextAfter": "ZG9jX2lkOjVlN2EzNGRlYjNmMzhmZjRkN2RiZDg4OA==",
- "order": "asc"
}
}
Retrieve an event
Retrieves an event.
path Parameters
id required | string <uuid> The identifier of the event to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7a34deb3f38ff4d7dbd888",
- "type": "event",
- "createdAt": "2020-09-15T13:59:26Z",
- "data": {
- "createdAt": "2020-09-15T13:58:53Z",
- "id": "5f60c89d1bfd3165e7460ab7",
- "name": "HR",
- "archived": false,
- "type": "costCenter"
}, - "kind": "costCenter.updated",
- "previousAttributes": {
- "name": "Finance"
}
}
}
An emitted invoice is the aggregate of one or several purchase
and refund
billing operations.
This is the invoice
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the invoice. |
type required | string Value: "invoice" The resource type. |
createdAt required | string <date-time> Time at which the invoice was created. |
required | object The invoice amount. |
billingOperationsCount required | integer <int32> Number of billing operations associated to that invoice. |
billingProfileId required | string = 24 characters ^[a-f\d]{24}$ The ID of a billing profile associated with invoice. |
description required | string Description. |
kind required | string Enum: "booking" "other" "subscription" Invoice kind. |
paymentMethodSummary | string The payment method used for that invoice. |
paymentReference | string Payment reference. |
string The URL for the invoice PDF. | |
reference | string Invoice reference. |
status required | string Enum: "open" "paid" "uncollectible" "void" Invoice status. |
url | string The URL for the hosted invoice page. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "invoice",
- "createdAt": "2019-09-25T07:35:42Z",
- "amount": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "billingOperationsCount": 0,
- "billingProfileId": "5de7bc72bf882f3bb31619bf",
- "description": "Monthly invoice - February 2020.",
- "kind": "booking",
- "paymentMethodSummary": "Credit card (****-4242)",
- "paymentReference": "Fairjungle p1gh025yx",
- "pdf": "string",
- "reference": "5D4B4AC8-0009",
- "status": "open",
- "url": "string"
}
List invoices
Returns a list of invoices.
Invoices are returned sorted by creation date, and by default oldest invoices are returned first.
You can enable cursor based pagination by setting pageKind
parameter with cursor
value.
query Parameters
pageKind | string Default: "offset" Enum: "offset" "cursor" Pagination kind. |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
before | string Example: before=ZG9jX2lkOjVkOTc2OTYxYTI0YjBjMTcyNmY2NWJkMg== Cursor value that identifies the last item to retrieve. Can be used only for cursor based pagination. |
after | string Example: after=ZG9jX2lkOjVkYWVmYThhMTg1YjNlNmNiM2Q3OTY3OA== Cursor value that identifies the first item to retrieve. Can be used only for cursor based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5d976961a24b0c1726f65bd2",
- "type": "invoice",
- "createdAt": "2020-01-04T15:46:41Z",
- "amount": {
- "currency": "EUR",
- "total": 4614.83
}, - "billingOperationsCount": 2,
- "billingProfileId": "5de7bc72bf882f3bb31619bf",
- "description": "Roundtrip flight - Hubert Bonisseur de La Bath - Paris > Tokyo Narita - 15FEB2020",
- "kind": "booking",
- "paymentMethodSummary": "Credit card (****-4242)",
- "paymentReference": "Fairjungle iwlb7idmr",
- "reference": "ED445B10-0006",
- "status": "open",
}, - {
- "id": "5e25b20e95a489ba33ae0e56",
- "type": "invoice",
- "createdAt": "2020-01-31T23:58:38Z",
- "amount": {
- "currency": "EUR",
- "total": 653.87
}, - "billingOperationsCount": 1,
- "billingProfileId": "5de7bc72bf882f3bb31619c0",
- "description": "Monthly invoice - February 2020",
- "kind": "booking",
- "paymentMethodSummary": "SEPA direct debit (****2606)",
- "paymentReference": "Fairjungle o8oi5mswg",
- "reference": "6070C440-0013",
- "status": "paid",
}
], - "meta": {
- "pageKind": "cursor",
- "limit": 10,
- "prevBefore": "ZG9jX2lkOjVkYWYwOWVmZDI3YTE5ODc0YTVkMTQ3Ng==",
- "nextAfter": "ZG9jX2lkOjVkOTc2YWEyYTI0YjBjMTcyNmY2NWJkNQ==",
- "order": "asc"
}
}
Retrieve an invoice
Retrieves an invoice.
path Parameters
id required | string <uuid> The identifier of the invoice to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5d976961a24b0c1726f65bd2",
- "type": "invoice",
- "createdAt": "2020-01-04T15:46:41Z",
- "amount": {
- "currency": "EUR",
- "total": 4614.83
}, - "billingOperationsCount": 2,
- "billingProfileId": "5de7bc72bf882f3bb31619bf",
- "description": "Roundtrip flight - Hubert Bonisseur de La Bath - Paris > Tokyo Narita - 15FEB2020",
- "kind": "booking",
- "paymentMethodSummary": "Credit card (****-4242)",
- "paymentReference": "Fairjungle iwlb7idmr",
- "reference": "ED445B10-0006",
- "status": "open",
}
}
List invoice billing operations
Returns a list of billing operations corresponding to invoice.
By default, billing operations are returned sorted by creation date with oldest operations returned first.
The sortBy
parameter allows you to sort billing operations by date
field too.
You can enable cursor based pagination by setting pageKind
parameter with cursor
value.
path Parameters
id required | string <uuid> The identifier of the invoice. |
query Parameters
pageKind | string Default: "offset" Enum: "offset" "cursor" Pagination kind. |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
before | string Example: before=ZG9jX2lkOjVkOTc2OTYxYTI0YjBjMTcyNmY2NWJkMg== Cursor value that identifies the last item to retrieve. Can be used only for cursor based pagination. |
after | string Example: after=ZG9jX2lkOjVkYWVmYThhMTg1YjNlNmNiM2Q3OTY3OA== Cursor value that identifies the first item to retrieve. Can be used only for cursor based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "date" Sorting field. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e725560cdb9f6125a4acb51",
- "type": "billingOperation",
- "createdAt": "2020-03-18T17:07:44Z",
- "amount": {
- "currency": "EUR",
- "total": 5
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "offline",
- "date": "2020-03-18T16:52:23Z",
- "kind": "car",
- "reference": "OSEF984LOL",
- "supplierName": "Sixt",
- "transport": {
- "cabinClass": "second",
- "departure": {
- "city": "Rennes"
}, - "departureLocaleDate": "2020-03-20",
- "destination": {
- "city": "Paris"
}, - "fareType": "flex",
- "returnLocaleDate": "2020-03-23"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "hubert@mycorp.fr",
- "fullName": "Hubert Bonisseur de La Bath"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-18T17:07:44Z",
- "invoiceId": "5e5feb94509e9b5aac9db538",
- "operationType": "car",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "refundId": "5e725560cdb9f6125a4acb50",
- "status": "succeeded",
- "transactionKind": "refund"
}, - {
- "id": "5e70ffd5b5db0f5bb839a4ab",
- "type": "billingOperation",
- "createdAt": "2020-03-17T16:50:29Z",
- "amount": {
- "currency": "EUR",
- "total": 110
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "offline",
- "date": "2020-03-18T16:52:23Z",
- "kind": "car",
- "reference": "OSEF984LOL",
- "supplierName": "Sixt",
- "transport": {
- "cabinClass": "second",
- "departure": {
- "city": "Milan"
}, - "departureLocaleDate": "2020-03-28",
- "destination": {
- "city": "Milan"
}, - "fareType": "flex",
- "returnLocaleDate": "2020-03-30"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "marie-jo@mycorp.fr",
- "fullName": "Marie-Jo Cotin"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-17T16:50:29Z",
- "description": "Car rental - Marie-Jo Cotin - Milan - 28MAR2020",
- "invoiceId": "5e5feb94509e9b5aac9db538",
- "operationType": "car",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "status": "paid",
- "transactionKind": "purchase"
}
], - "meta": {
- "pageKind": "cursor",
- "limit": 10,
- "prevBefore": "b3BlcmF0aW9uX2RhdGU6MTU4NDY5NTg2NTkwOQ==",
- "nextAfter": "b3BlcmF0aW9uX2RhdGU6MTU4NDY5NTkwNDYzMw==",
- "order": "asc",
- "sortBy": "createdAt"
}
}
This is the projectCode
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the project code. |
type required | string Value: "projectCode" The resource type. |
createdAt required | string <date-time> Time at which the project code was created. |
approverId | string <uuid> <= 50 characters ^[@~\-\.\w]+$ User ID of approver associated with that project code. |
archived required | boolean If true, then that project code is archived. |
billingProfileId | string = 24 characters ^[a-f\d]{24}$ The ID of a billing profile associated with project code. |
code required | string Project code. |
confidential required | boolean A confidential project does not appear in search input auto-completion. |
name | string Project code name. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "projectCode",
- "createdAt": "2019-09-25T07:35:42Z",
- "approverId": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "archived": true,
- "billingProfileId": "5de7bc72bf882f3bb31619bf",
- "code": "NextGen",
- "confidential": true,
- "name": "The next generation"
}
List project codes
Returns a list of project codes.
The archived
parameter permits to returns only archived or non archived project codes.
By default, project codes are returned sorted by creation date with oldest project codes returned first.
The sortBy
parameter allows you to sort project codes by code
field too.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "code" Sorting field. |
archived | string Example: archived=false If |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e7e25b06cb4333b7ec6477e",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:11:28Z",
- "archived": false,
- "code": "GLOBAL-TRAIN",
- "confidential": false,
- "name": "Gloabl Training"
}, - {
- "id": "5e7e253b6cb4333b7ec6477c",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:09:31Z",
- "archived": false,
- "code": "GB-TRAV1",
- "confidential": false,
- "name": "Great Britain - Travel"
}, - {
- "id": "5e7e25326cb4333b7ec6477b",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:09:22Z",
- "archived": false,
- "code": "GB-TRAV2",
- "confidential": false,
- "name": "Great Britain - Travel 2"
}, - {
- "id": "5d9eddbda93ab745e1f00cc7",
- "type": "projectCode",
- "createdAt": "2019-10-10T07:29:01Z",
- "archived": false,
- "code": "CODEZZ2",
- "confidential": false,
- "name": "Security - Cloud Infrastructure (private)"
}, - {
- "id": "5e7e258e6cb4333b7ec6477d",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:10:54Z",
- "archived": false,
- "code": "ES-EX",
- "confidential": false,
- "name": "Spain - Expansion"
}, - {
- "id": "5e7e25e66cb4333b7ec6477f",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:12:22Z",
- "archived": false,
- "code": "WORLD-OWN",
- "confidential": false,
- "name": "World domination"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 6,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a project code
Creates a new project code.
Request Body schema: application/jsonrequired
Project code resource
required | object (ProjectCodeReplace) The project code resource. | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infra"
}
}
Response samples
- 201
{- "data": {
- "id": "5e7e24606cb4333b7ec6477a",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:05:52Z",
- "archived": false,
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infra"
}
}
Retrieve a project code
Retrieves a project code.
path Parameters
id required | string <uuid> The identifier of the project code to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7e24606cb4333b7ec6477a",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:05:52Z",
- "archived": false,
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infra"
}
}
Patch a project code
Updates a project code with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the project code to update. |
Request Body schema: application/jsonrequired
Project code resource
required | object (ProjectCodePatch) The project code fields to update. | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "name": "Security - Cloud Infrastructure (private)"
}
}
Response samples
- 200
{- "data": {
- "id": "5e7e24606cb4333b7ec6477a",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:05:52Z",
- "archived": false,
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infrastructure (private)"
}
}
Replace a project code
Updates a project code by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the project code to update. |
Request Body schema: application/jsonrequired
Project code resource
required | object (ProjectCodeReplace) The project code resource. | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infrastructure (private)"
}
}
Response samples
- 200
{- "data": {
- "id": "5e7e24606cb4333b7ec6477a",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:05:52Z",
- "archived": false,
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infrastructure (private)"
}
}
Delete a project code
Deletes a project code.
path Parameters
id required | string <uuid> The identifier of the project code to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e7e24606cb4333b7ec6477a",
- "type": "projectCode",
- "createdAt": "2020-03-27T16:05:52Z",
- "archived": false,
- "code": "SECU-CLOUD",
- "confidential": false,
- "name": "Security - Cloud Infrastructure (private)"
}
}
This is the refund
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the refund. |
type required | string Value: "refund" The resource type. |
createdAt required | string <date-time> Time at which the refund was created. |
required | object The refund amount. |
invoiceId required | string = 24 characters ^[a-f\d]{24}$ The ID of the invoice associated to this refund. |
string The URL for the refund PDF. | |
status required | string Enum: "waiting" "pending" "succeeded" "failed" "canceled" Refund status |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "refund",
- "createdAt": "2019-09-25T07:35:42Z",
- "amount": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}, - "invoiceId": "5de7bc72bf882f3bb31619bf",
- "pdf": "string",
- "status": "waiting"
}
List refunds
Returns a list of refunds.
Refunds are returned sorted by creation date, and by default oldest refunds are returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e725560cdb9f6125a4acb50",
- "type": "refund",
- "createdAt": "2020-03-18T17:07:44Z",
- "amount": {
- "currency": "EUR",
- "total": 5
}, - "invoiceId": "5e5feb94509e9b5aac9db538",
- "status": "succeeded"
}, - {
- "id": "5e6792e841bcabcc468bb21b",
- "type": "refund",
- "createdAt": "2020-03-10T13:15:20Z",
- "amount": {
- "currency": "EUR",
- "total": 5
}, - "invoiceId": "5e5feb94509e9b5aac9db538",
- "status": "succeeded"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Retrieve a refund
Retrieves a refund.
path Parameters
id required | string <uuid> The identifier of the refund to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e6792e841bcabcc468bb21b",
- "type": "refund",
- "createdAt": "2020-03-10T13:15:20Z",
- "amount": {
- "currency": "EUR",
- "total": 5
}, - "invoiceId": "5e5feb94509e9b5aac9db538",
- "status": "succeeded"
}
}
SCIM user mapping permits you to control how user attributes are provisioned with SCIM protocol.
You can map a SCIM attribute to either:
- a custom field
- a user attribute
This is the scimUserMapping
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the user mapping. |
type required | string Value: "scimUserMapping" The resource type. |
createdAt required | string <date-time> Time at which the user mapping was created. |
scimAttribute required | string Enum: "displayName" "name.honorificPrefix" "name.honorificSuffix" "name.middleName" "nickName" "title" "userType" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:costCenter" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:organization" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager.displayName" "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager.value" SCIM attribute. |
customFieldId | string = 24 characters ^[a-f\d]{24}$ The ID of the custom field mapped to SCIM attribute. If present, then |
userAttribute | string Enum: "dateOfBirth" "email" "firstName" "lastName" "phoneNumber" The name of the user attribute mapped to SCIM attribute. If present, then |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "scimUserMapping",
- "createdAt": "2019-09-25T07:35:42Z",
- "scimAttribute": "displayName",
- "customFieldId": "5de7bc72bf882f3bb31619bf",
- "userAttribute": "dateOfBirth"
}
List SCIM user mappings
Returns a list of SCIM user mappings.
By default, SCIM user mappings are returned sorted by creation date with oldest SCIM user mappings returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "65f8100c14ea53b0ca001412",
- "type": "scimUserMapping",
- "createdAt": "2024-03-18T09:57:32Z",
- "customFieldId": "65f80f2cd652936d120005e8",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division"
}, - {
- "id": "65f95c84c0112ddb8347080f",
- "type": "scimUserMapping",
- "createdAt": "2024-03-19T09:36:04Z",
- "customFieldId": "65f95bd3c0112ddb83470807",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a SCIM user mapping
Creates a new SCIM user mapping.
Request Body schema: application/jsonrequired
SCIM user mapping resource
required | object (SCIMUserMappingReplace) The user mapping resource. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"
}
}
Response samples
- 201
{- "data": {
- "id": "65fabea66f919585c9e11415",
- "type": "scimUserMapping",
- "createdAt": "2024-03-20T10:47:02Z",
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"
}
}
Retrieve a SCIM user mapping
Retrieves a SCIM user mapping.
path Parameters
id required | string <uuid> The identifier of the SCIM user mapping to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "65fabea66f919585c9e11415",
- "type": "scimUserMapping",
- "createdAt": "2024-03-20T10:47:02Z",
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"
}
}
Patch a SCIM user mapping
Updates a SCIM user mapping with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the SCIM user mapping to update. |
Request Body schema: application/jsonrequired
SCIM user mapping resource
required | object (SCIMUserMappingPatch) The user mapping fields to update. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:organization"
}
}
Response samples
- 200
{- "data": {
- "id": "65fabea66f919585c9e11415",
- "type": "scimUserMapping",
- "createdAt": "2024-03-20T10:47:02Z",
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:organization"
}
}
Replace a SCIM user mapping
Updates a SCIM user mapping by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the SCIM user mapping to update. |
Request Body schema: application/jsonrequired
SCIM user mapping resource
required | object (SCIMUserMappingReplace) The user mapping resource. | ||||||
|
Responses
Request samples
- Payload
{- "data": {
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"
}
}
Response samples
- 200
{- "data": {
- "id": "65fabea66f919585c9e11415",
- "type": "scimUserMapping",
- "createdAt": "2024-03-20T10:47:02Z",
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"
}
}
Delete a SCIM user mapping
Deletes a SCIM user mapping.
path Parameters
id required | string <uuid> The identifier of the SCIM user mapping to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "65fabea66f919585c9e11415",
- "type": "scimUserMapping",
- "createdAt": "2024-03-20T10:47:02Z",
- "customFieldId": "65f95bf3c0112ddb8347080b",
- "scimAttribute": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"
}
}
This is the travelPolicy
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the travel policy. |
type required | string Value: "travelPolicy" The resource type. |
createdAt required | string <date-time> Time at which the travel policy was created. |
control required | string Enum: "full" "none" "notif" "smart" Travel control type.
|
default required | boolean Default: false This is default travel policy. |
defaultApproverId | string <uuid> <= 50 characters ^[@~\-\.\w]+$ User ID of default approver to use. |
required | object Settings to compute hotel budget. |
name required | string Travel policy name. |
object Settings for smart control. Present only if | |
required | object Settings to compute transport budget. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "travelPolicy",
- "createdAt": "2019-09-25T07:35:42Z",
- "control": "full",
- "default": false,
- "defaultApproverId": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "hotelBudget": {
- "custom": {
- "flexibilityPercentage": 20
}, - "kind": "comfort"
}, - "name": "The next generation",
- "smartSettings": {
- "hotelIsNotCancellable": {
- "action": "deny"
}, - "maxCarRentalAcrissCategory": {
- "action": "deny",
- "category": "M"
}, - "maxTripFlightPrice": {
- "action": "deny",
- "amount": 0,
- "currency": "EUR"
}, - "maxTripHotelPrice": {
- "action": "deny",
- "amount": 0,
- "currency": "EUR"
}, - "maxTripPrice": {
- "action": "deny",
- "amount": 0,
- "currency": "EUR"
}, - "maxTripRailPrice": {
- "action": "deny",
- "amount": 0,
- "currency": "EUR"
}, - "minBookingLeadTime": {
- "action": "deny",
- "days": 0
}, - "tripDestination": {
- "denyCountries": [
- "string"
], - "forceApprovalCountries": [
- "string"
]
}, - "tripIsOutOfBudget": {
- "action": "deny"
}, - "tripIsWithinBudget": {
- "action": "deny"
}
}, - "transportBudget": {
- "common": {
- "flexibilityPercentage": 20
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "business",
- "maxDuration": 0
}, - "shortHaul": {
- "cabinClass": "business",
- "maxDuration": 0
}
}, - "kind": "comfort",
- "skipWhenGreenerAlternative": true
}, - "rail": {
- "custom": {
- "fareType": "flex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "first",
- "maxDuration": 0
}
}, - "kind": "comfort"
}
}
}
List travel policies
Returns a list of travel policies.
Travel policies are returned sorted by creation date, and by default oldest travel policies are returned first.
The sortBy
parameter allows you to sort travel policies by name
field too.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "name" Sorting field. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "6062daf9769c833115147875",
- "type": "travelPolicy",
- "createdAt": "2021-03-30T08:02:01Z",
- "control": "none",
- "default": true,
- "hotelBudget": {
- "kind": "strict"
}, - "name": "Default",
- "transportBudget": {
- "flight": {
- "kind": "strict"
}, - "rail": {
- "kind": "strict"
}
}
}, - {
- "id": "60642c74b06ede6881c7ceb3",
- "type": "travelPolicy",
- "createdAt": "2021-03-31T08:01:56Z",
- "control": "none",
- "default": false,
- "hotelBudget": {
- "custom": {
- "flexibilityPercentage": 20
}, - "kind": "custom"
}, - "name": "Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a travel policy
Creates a new travel policy.
Request Body schema: application/jsonrequired
Travel policy resource
required | object (TravelPolicyReplace) The travel policy resource. | ||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "control": "none",
- "hotelBudget": {
- "custom": {
- "flexibilityPercentage": 20
}, - "kind": "custom"
}, - "name": "Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
Response samples
- 201
{- "data": {
- "id": "60642c74b06ede6881c7ceb3",
- "type": "travelPolicy",
- "createdAt": "2021-03-31T08:01:56Z",
- "control": "none",
- "default": false,
- "hotelBudget": {
- "custom": {
- "flexibilityPercentage": 20
}, - "kind": "custom"
}, - "name": "Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
Retrieve a travel policy
Retrieves a travel policy.
path Parameters
id required | string <uuid> The identifier of the travel policy to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "60642c74b06ede6881c7ceb3",
- "type": "travelPolicy",
- "createdAt": "2021-03-31T08:01:56Z",
- "control": "none",
- "default": false,
- "hotelBudget": {
- "custom": {
- "flexibilityPercentage": 20
}, - "kind": "custom"
}, - "name": "Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
Patch a travel policy
Updates a travel policy with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the travel policy to update. |
Request Body schema: application/jsonrequired
Travel policy resource
required | object (TravelPolicyPatch) The travel policy fields to update. | ||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "name": "The Executives",
- "hotelBudget": {
- "custom": null,
- "kind": "strict"
}
}
}
Response samples
- 200
{- "data": {
- "id": "60642c74b06ede6881c7ceb3",
- "type": "travelPolicy",
- "createdAt": "2021-03-31T08:01:56Z",
- "control": "none",
- "default": false,
- "hotelBudget": {
- "kind": "strict"
}, - "name": "The Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
Replace a travel policy
Updates a travel policy by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the travel policy to update. |
Request Body schema: application/jsonrequired
Travel policy resource
required | object (TravelPolicyReplace) The travel policy resource. | ||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "control": "none",
- "default": false,
- "hotelBudget": {
- "kind": "strict"
}, - "name": "The Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
Response samples
- 200
{- "data": {
- "id": "60642c74b06ede6881c7ceb3",
- "type": "travelPolicy",
- "createdAt": "2021-03-31T08:01:56Z",
- "control": "none",
- "default": false,
- "hotelBudget": {
- "kind": "strict"
}, - "name": "The Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
Delete a travel policy
Deletes a travel policy.
path Parameters
id required | string <uuid> The identifier of the travel policy to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "60642c74b06ede6881c7ceb3",
- "type": "travelPolicy",
- "createdAt": "2021-03-31T08:01:56Z",
- "control": "none",
- "default": false,
- "hotelBudget": {
- "kind": "strict"
}, - "name": "The Executives",
- "transportBudget": {
- "common": {
- "flexibilityPercentage": 15
}, - "flight": {
- "custom": {
- "longHaul": {
- "cabinClass": "business"
}, - "lowCostWhenPossible": true,
- "mediumHaul": {
- "cabinClass": "premiumEco",
- "maxDuration": 180
}, - "shortHaul": {
- "cabinClass": "economy",
- "maxDuration": 60
}
}, - "kind": "custom"
}, - "rail": {
- "custom": {
- "fareType": "semiFlex",
- "longHaul": {
- "cabinClass": "first"
}, - "shortHaul": {
- "cabinClass": "second",
- "maxDuration": 120
}
}, - "kind": "custom"
}
}
}
}
This is the tripProject
resource schema:
id required | string <uuid> <= 50 characters ^[@~\-\.\w]+$ Unique identifier for the trip project. |
type required | string Value: "tripProject" The resource type. |
createdAt required | string <date-time> Time at which the trip project was created. |
approvalStatus | string Enum: "approved" "awaitApproval" "bookingAllowed" "declined" The project approval status. Note that |
Array of objects Array of booking resources. | |
Array of objects Array of car rentals. | |
Array of objects Array of custom fields. | |
Array of objects Array of hotel stays. | |
projectCodeId | string = 24 characters ^[a-f\d]{24}$ The ID of the associated project code. |
required | Array of objects Array of rates. |
required | object The search that created that trip project. |
Array of objects Array of transports legs. | |
travelerIds required | Array of strings <uuid> [^[@~\-\.\w]+$] Array of user ids that participate to trip project. |
{- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "tripProject",
- "createdAt": "2019-09-25T07:35:42Z",
- "approvalStatus": "approved",
- "bookings": [
- {
- "id": "string",
- "type": "booking",
- "createdAt": "2019-09-25T07:35:42Z",
- "canceled": false,
- "cancellations": [
- {
- "id": "string",
- "type": "bookingCancellation",
- "createdAt": "2019-09-25T07:35:42Z",
- "bookingId": "string",
- "transportSegmentIds": [
- "string"
], - "travelerIds": [
- "35c93884-5cca-4e72-98ff-eb52f611cb21"
], - "tripProjectId": "35c93884-5cca-4e72-98ff-eb52f611cb21"
}
], - "exchanged": false,
- "kind": "car",
- "modifications": [
- {
- "id": "string",
- "type": "bookingModification",
- "createdAt": "2019-09-25T07:35:42Z",
- "bookingId": "string",
- "selectedBookingId": "string",
- "transportSegmentExchanges": [
- {
- "originalTransportSegmentIds": [
- "string"
], - "targetTransportSegmentIds": [
- "string"
], - "travelerIds": [
- "35c93884-5cca-4e72-98ff-eb52f611cb21"
]
}
], - "tripProjectId": "35c93884-5cca-4e72-98ff-eb52f611cb21"
}
], - "rateId": "string",
- "reference": "string",
- "status": "failed",
- "tripProjectId": "35c93884-5cca-4e72-98ff-eb52f611cb21"
}
], - "carRentals": [
- {
- "bookingId": "string",
- "car": {
- "acriss": "MBMR",
- "group": "MINI",
- "name": "Renault Twingo"
}, - "pickupLocaleDateTime": "2020-09-25T08:42:27",
- "pickupPlace": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}, - "rateId": "string",
- "renterName": "Hertz",
- "returnLocaleDateTime": "2020-09-25T08:42:27",
- "returnpPlace": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}
}
], - "customFields": [
- {
- "customFieldId": "5de7bc72bf882f3bb31619bf",
- "name": "string",
- "values": [
- {
- "customFieldOptionId": "5de7bc72bf882f3bb31619bf",
- "data": "string",
- "displayName": "string"
}
]
}
], - "hotelStays": [
- {
- "bookingId": "string",
- "checkinLocaleDate": "2020-09-25",
- "checkoutLocaleDate": "2020-09-25",
- "hotelId": "5de7bc72bf882f3bb31619bf",
- "place": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}, - "rateId": "string"
}
], - "projectCodeId": "5de7bc72bf882f3bb31619bf",
- "rates": [
- {
- "id": "string",
- "type": "rate",
- "createdAt": "2019-09-25T07:35:42Z",
- "kind": "car",
- "price": {
- "base": 199.9,
- "currency": "EUR",
- "tax": 39.98,
- "taxRate": 20,
- "total": 239.88
}
}
], - "search": {
- "arrivalLocaleDateTime": "2020-09-25T08:42:27",
- "arrivalPlace": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}, - "departureLocaleDateTime": "2020-09-25T08:42:27",
- "departurePlace": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}, - "kind": "hotelOnly",
- "returnLocaleDateTime": "2020-09-25T08:42:27"
}, - "transportLegs": [
- {
- "kind": "flight",
- "segments": [
- {
- "id": "string",
- "arrival": {
- "localeDateTime": "2020-09-25T08:42:27",
- "place": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}
}, - "bookingId": "string",
- "canceled": false,
- "departure": {
- "localeDateTime": "2020-09-25T08:42:27",
- "place": {
- "airport": {
- "iataCode": "string"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 26.357896,
- "lng": 127.783809
}, - "name": "string",
- "type": "airport"
}
}, - "duration": 0,
- "exchanged": false,
- "operatingCarrier": {
- "id": "string",
- "name": "string"
}, - "rateId": "string",
- "transportNumber": "string"
}
], - "summary": "string"
}
], - "travelerIds": [
- "35c93884-5cca-4e72-98ff-eb52f611cb21"
]
}
List trip projects
Returns a list of trip projects.
Trip projects are returned sorted by creation date, and by default oldest trip projects are returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "542e6004-cb56-48e8-8036-5bbc3f3f3626",
- "type": "tripProject",
- "createdAt": "2020-06-26T08:49:06Z",
- "bookings": [
- {
- "id": "ee14b64f-ce37-428e-a121-52e58004b077",
- "type": "booking",
- "createdAt": "2020-06-26T08:53:53Z",
- "canceled": false,
- "exchanged": false,
- "kind": "flight",
- "rateId": "efe4215b-fc69-4621-9bdc-f53543587dd4___amadeus-itinerary-economy-cab6b2d2-b2f2-4502-a2fd-d32b9a3a1e71",
- "reference": "N2GMFL",
- "status": "succeeded",
- "tripProjectId": "542e6004-cb56-48e8-8036-5bbc3f3f3626"
}, - {
- "id": "5ef5b7ada1890759e7f229d0",
- "type": "booking",
- "createdAt": "2020-06-26T08:54:05Z",
- "canceled": false,
- "exchanged": false,
- "kind": "hotel",
- "rateId": "5ef5b6a7a1890759e7f229cf",
- "reference": "5ef5b7ada1890759e7f229d1",
- "status": "succeeded",
- "tripProjectId": "542e6004-cb56-48e8-8036-5bbc3f3f3626"
}
], - "customFields": [
- {
- "customFieldId": "5fc5127ec00e48351c12b6de",
- "name": "Business unit tag",
- "values": [
- {
- "data": "Kervignac"
}
]
}, - {
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "name": "Budget center",
- "values": [
- {
- "customFieldOptionId": "5fc5127ec00e48351c12b6e2",
- "data": "BRU499"
}
]
}
], - "hotelStays": [
- {
- "bookingId": "5ef5b7ada1890759e7f229d0",
- "checkinLocaleDate": "2020-10-29",
- "checkoutLocaleDate": "2020-10-30",
- "hotelId": "5cee58325621bddc666e0604",
- "place": {
- "geoloc": {
- "lat": 40.418667,
- "lng": -3.704013
}, - "name": "Liabeny",
- "type": "hotel"
}, - "rateId": "5ef5b6a7a1890759e7f229cf"
}
], - "rates": [
- {
- "id": "efe4215b-fc69-4621-9bdc-f53543587dd4___amadeus-itinerary-economy-cab6b2d2-b2f2-4502-a2fd-d32b9a3a1e71",
- "type": "rate",
- "createdAt": "2020-06-26T08:49:06Z",
- "kind": "flight",
- "price": {
- "currency": "EUR",
- "total": 266.04
}
}, - {
- "id": "5ef5b6a7a1890759e7f229cf",
- "type": "rate",
- "createdAt": "2020-06-26T08:49:06Z",
- "kind": "hotel",
- "price": {
- "currency": "EUR",
- "total": 79.8
}
}
], - "search": {
- "arrivalPlace": {
- "country": {
- "code": "ES",
- "name": "Spain"
}, - "geoloc": {
- "lat": 40.4167754,
- "lng": -3.7037902
}, - "name": "Madrid",
- "type": "address"
}, - "departureLocaleDateTime": "2020-10-29T10:00:00",
- "departurePlace": {
- "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "Paris",
- "type": "address"
}, - "kind": "roundTripWithHotel",
- "returnLocaleDateTime": "2020-10-30T10:00:00"
}, - "transportLegs": [
- {
- "kind": "flight",
- "segments": [
- {
- "id": "15",
- "arrival": {
- "localeDateTime": "2020-10-29T11:40:00",
- "place": {
- "airport": {
- "iataCode": "MAD"
}, - "country": {
- "code": "ES",
- "name": "Spain"
}, - "geoloc": {
- "lat": 40.472222,
- "lng": -3.563333
}, - "name": "MAD",
- "type": "airport"
}
}, - "bookingId": "ee14b64f-ce37-428e-a121-52e58004b077",
- "canceled": false,
- "departure": {
- "localeDateTime": "2020-10-29T09:35:00",
- "place": {
- "airport": {
- "iataCode": "CDG"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "CDG",
- "type": "airport"
}
}, - "duration": 125,
- "exchanged": false,
- "operatingCarrier": {
- "id": "AF",
- "name": "Air France"
}, - "rateId": "efe4215b-fc69-4621-9bdc-f53543587dd4___amadeus-itinerary-economy-cab6b2d2-b2f2-4502-a2fd-d32b9a3a1e71",
- "transportNumber": "1300"
}
], - "summary": "From CDG to MAD"
}, - {
- "kind": "flight",
- "segments": [
- {
- "id": "92",
- "arrival": {
- "localeDateTime": "2020-10-30T12:05:00",
- "place": {
- "airport": {
- "iataCode": "CDG"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "CDG",
- "type": "airport"
}
}, - "bookingId": "ee14b64f-ce37-428e-a121-52e58004b077",
- "canceled": false,
- "departure": {
- "localeDateTime": "2020-10-30T09:55:00",
- "place": {
- "airport": {
- "iataCode": "MAD"
}, - "country": {
- "code": "ES",
- "name": "Spain"
}, - "geoloc": {
- "lat": 40.472222,
- "lng": -3.563333
}, - "name": "MAD",
- "type": "airport"
}
}, - "duration": 130,
- "exchanged": false,
- "operatingCarrier": {
- "id": "AF",
- "name": "Air France"
}, - "rateId": "efe4215b-fc69-4621-9bdc-f53543587dd4___amadeus-itinerary-economy-cab6b2d2-b2f2-4502-a2fd-d32b9a3a1e71",
- "transportNumber": "1001"
}
], - "summary": "From MAD to CDG"
}
], - "travelerIds": [
- "35c93884-5cca-4e72-98ff-eb52f611cb21"
]
}, - {
- "id": "38c860a5-e8b3-4eb4-ad0d-3c3f123bffe3",
- "type": "tripProject",
- "createdAt": "2020-06-26T08:18:03Z",
- "customFields": [
- {
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "name": "Budget center",
- "values": [
- {
- "customFieldOptionId": "5fc4bb0eb8de9273ca904b12",
- "data": "MRA672"
}
]
}
], - "hotelStays": [
- {
- "checkinLocaleDate": "2020-10-26",
- "checkoutLocaleDate": "2020-10-27",
- "hotelId": "5cee58325621bddc666e0604",
- "place": {
- "geoloc": {
- "lat": 40.418667,
- "lng": -3.704013
}, - "name": "Liabeny",
- "type": "hotel"
}, - "rateId": "5ef5af60a1890759e7f1d9a9"
}
], - "rates": [
- {
- "id": "dd447fad-c27c-4eba-ab55-d6d6f4a3844a___amadeus-itinerary-economy-09f99581-81e2-4ed0-9389-1ee6b26e2668",
- "type": "rate",
- "createdAt": "2020-06-26T08:18:03Z",
- "kind": "flight",
- "price": {
- "currency": "EUR",
- "total": 195.85
}
}, - {
- "id": "5ef5af60a1890759e7f1d9a9",
- "type": "rate",
- "createdAt": "2020-06-26T08:18:03Z",
- "kind": "hotel",
- "price": {
- "currency": "EUR",
- "total": 79.8
}
}
], - "search": {
- "arrivalPlace": {
- "country": {
- "code": "ES",
- "name": "Spain"
}, - "geoloc": {
- "lat": 40.4167754,
- "lng": -3.7037902
}, - "name": "Madrid",
- "type": "address"
}, - "departureLocaleDateTime": "2020-10-26T10:00:00",
- "departurePlace": {
- "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "Paris",
- "type": "address"
}, - "kind": "roundTripWithHotel",
- "returnLocaleDateTime": "2020-10-27T10:00:00"
}, - "transportLegs": [
- {
- "kind": "flight",
- "segments": [
- {
- "id": "12",
- "arrival": {
- "localeDateTime": "2020-10-26T12:40:00",
- "place": {
- "airport": {
- "iataCode": "MAD"
}, - "name": "MAD",
- "type": "airport"
}
}, - "canceled": false,
- "departure": {
- "localeDateTime": "2020-10-26T10:35:00",
- "place": {
- "airport": {
- "iataCode": "ORY"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "ORY",
- "type": "airport"
}
}, - "duration": 125,
- "exchanged": false,
- "operatingCarrier": {
- "id": "IB",
- "name": "Iberia Airlines"
}, - "rateId": "dd447fad-c27c-4eba-ab55-d6d6f4a3844a___amadeus-itinerary-economy-09f99581-81e2-4ed0-9389-1ee6b26e2668",
- "transportNumber": "3403"
}
], - "summary": "From ORY to MAD"
}, - {
- "kind": "flight",
- "segments": [
- {
- "id": "88",
- "arrival": {
- "localeDateTime": "2020-10-27T11:45:00",
- "place": {
- "airport": {
- "iataCode": "ORY"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "ORY",
- "type": "airport"
}
}, - "canceled": false,
- "departure": {
- "localeDateTime": "2020-10-27T09:45:00",
- "place": {
- "airport": {
- "iataCode": "MAD"
}, - "name": "MAD",
- "type": "airport"
}
}, - "duration": 120,
- "exchanged": false,
- "operatingCarrier": {
- "id": "IB",
- "name": "Iberia Airlines"
}, - "rateId": "dd447fad-c27c-4eba-ab55-d6d6f4a3844a___amadeus-itinerary-economy-09f99581-81e2-4ed0-9389-1ee6b26e2668",
- "transportNumber": "3436"
}
], - "summary": "From MAD to ORY"
}
], - "travelerIds": [
- "35c93884-5cca-4e72-98ff-eb52f611cb21"
]
}
], - "meta": {
- "pageKind": "offset",
- "limit": 2,
- "offset": 16,
- "total": 612,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Retrieve a trip project
Retrieves a trip project.
path Parameters
id required | string <uuid> The identifier of the trip project to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "d5f57c1f-dc33-4632-a5aa-681367685daf",
- "type": "tripProject",
- "createdAt": "2020-06-26T08:24:45Z",
- "bookings": [
- {
- "id": "8528765e-792d-4180-941b-dabce29e7638",
- "type": "booking",
- "createdAt": "2020-06-26T08:27:10Z",
- "canceled": false,
- "exchanged": false,
- "kind": "flight",
- "rateId": "b56fcc03-5655-4318-b4ce-99d7447da556___amadeus-itinerary-economy-5376461d-682b-415d-96a3-70b5a36d777a",
- "reference": "N2BYRD",
- "status": "succeeded",
- "tripProjectId": "d5f57c1f-dc33-4632-a5aa-681367685daf"
}, - {
- "id": "5ef5b168a1890759e7f1f4fb",
- "type": "booking",
- "createdAt": "2020-06-26T08:27:20Z",
- "canceled": false,
- "exchanged": false,
- "kind": "hotel",
- "rateId": "5ef5b10ca1890759e7f1f4fa",
- "reference": "5ef5b168a1890759e7f1f4fc",
- "status": "succeeded",
- "tripProjectId": "d5f57c1f-dc33-4632-a5aa-681367685daf"
}
], - "customFields": [
- {
- "customFieldId": "5fc5127ec00e48351c12b6de",
- "name": "Business unit tag",
- "values": [
- {
- "data": "Kervignac"
}
]
}, - {
- "customFieldId": "5fce2fc333d1f42f6ee71dba",
- "name": "Budget center",
- "values": [
- {
- "customFieldOptionId": "5fc5127ec00e48351c12b6e2",
- "data": "BRU499"
}
]
}
], - "hotelStays": [
- {
- "bookingId": "5ef5b168a1890759e7f1f4fb",
- "checkinLocaleDate": "2020-10-26",
- "checkoutLocaleDate": "2020-10-27",
- "hotelId": "5cee58325621bddc666e0604",
- "place": {
- "geoloc": {
- "lat": 40.418667,
- "lng": -3.704013
}, - "name": "Liabeny",
- "type": "hotel"
}, - "rateId": "5ef5b10ca1890759e7f1f4fa"
}
], - "rates": [
- {
- "id": "b56fcc03-5655-4318-b4ce-99d7447da556___amadeus-itinerary-economy-5376461d-682b-415d-96a3-70b5a36d777a",
- "type": "rate",
- "createdAt": "2020-06-26T08:24:45Z",
- "kind": "flight",
- "price": {
- "currency": "EUR",
- "total": 195.85
}
}, - {
- "id": "5ef5b10ca1890759e7f1f4fa",
- "type": "rate",
- "createdAt": "2020-06-26T08:24:45Z",
- "kind": "hotel",
- "price": {
- "currency": "EUR",
- "total": 79.8
}
}
], - "search": {
- "arrivalPlace": {
- "country": {
- "code": "ES",
- "name": "Spain"
}, - "geoloc": {
- "lat": 40.4167754,
- "lng": -3.7037902
}, - "name": "Madrid",
- "type": "address"
}, - "departureLocaleDateTime": "2020-10-26T10:00:00",
- "departurePlace": {
- "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "Paris",
- "type": "address"
}, - "kind": "roundTripWithHotel",
- "returnLocaleDateTime": "2020-10-27T10:00:00"
}, - "transportLegs": [
- {
- "kind": "flight",
- "segments": [
- {
- "id": "12",
- "arrival": {
- "localeDateTime": "2020-10-26T12:40:00",
- "place": {
- "airport": {
- "iataCode": "MAD"
}, - "name": "MAD",
- "type": "airport"
}
}, - "bookingId": "8528765e-792d-4180-941b-dabce29e7638",
- "canceled": false,
- "departure": {
- "localeDateTime": "2020-10-26T10:35:00",
- "place": {
- "airport": {
- "iataCode": "ORY"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "ORY",
- "type": "airport"
}
}, - "duration": 125,
- "exchanged": false,
- "operatingCarrier": {
- "id": "IB",
- "name": "Iberia Airlines"
}, - "rateId": "b56fcc03-5655-4318-b4ce-99d7447da556___amadeus-itinerary-economy-5376461d-682b-415d-96a3-70b5a36d777a",
- "transportNumber": "3403"
}
], - "summary": "From ORY to MAD"
}, - {
- "kind": "flight",
- "segments": [
- {
- "id": "88",
- "arrival": {
- "localeDateTime": "2020-10-27T11:45:00",
- "place": {
- "airport": {
- "iataCode": "ORY"
}, - "country": {
- "code": "FR",
- "name": "France"
}, - "geoloc": {
- "lat": 48.856614,
- "lng": 2.3522219
}, - "name": "ORY",
- "type": "airport"
}
}, - "bookingId": "8528765e-792d-4180-941b-dabce29e7638",
- "canceled": false,
- "departure": {
- "localeDateTime": "2020-10-27T09:45:00",
- "place": {
- "airport": {
- "iataCode": "MAD"
}, - "name": "MAD",
- "type": "airport"
}
}, - "duration": 120,
- "exchanged": false,
- "operatingCarrier": {
- "id": "IB",
- "name": "Iberia Airlines"
}, - "rateId": "b56fcc03-5655-4318-b4ce-99d7447da556___amadeus-itinerary-economy-5376461d-682b-415d-96a3-70b5a36d777a",
- "transportNumber": "3436"
}
], - "summary": "From MAD to ORY"
}
], - "travelerIds": [
- "35c93884-5cca-4e72-98ff-eb52f611cb21"
]
}
}
List trip project billing operations
Returns a list of billing operations corresponding to trip project.
By default, billing operations are returned sorted by creation date with oldest operations returned first.
The sortBy
parameter allows you to sort billing operations by date
field too.
You can enable cursor based pagination by setting pageKind
parameter with cursor
value.
path Parameters
id required | string <uuid> The identifier of the trip project. |
query Parameters
pageKind | string Default: "offset" Enum: "offset" "cursor" Pagination kind. |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
before | string Example: before=ZG9jX2lkOjVkOTc2OTYxYTI0YjBjMTcyNmY2NWJkMg== Cursor value that identifies the last item to retrieve. Can be used only for cursor based pagination. |
after | string Example: after=ZG9jX2lkOjVkYWVmYThhMTg1YjNlNmNiM2Q3OTY3OA== Cursor value that identifies the first item to retrieve. Can be used only for cursor based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "date" Sorting field. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5e725560cdb9f6125a4acb51",
- "type": "billingOperation",
- "createdAt": "2020-03-18T17:07:44Z",
- "amount": {
- "currency": "EUR",
- "total": 5
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "offline",
- "date": "2020-03-18T16:52:23Z",
- "kind": "car",
- "reference": "OSEF984LOL",
- "supplierName": "Sixt",
- "transport": {
- "departure": {
- "city": "Rennes"
}, - "departureLocaleDate": "2020-03-20",
- "destination": {
- "city": "Paris"
}, - "returnLocaleDate": "2020-03-23"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "hubert@mycorp.fr",
- "fullName": "Hubert Bonisseur de La Bath"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-18T17:07:44Z",
- "invoiceId": "5e5feb94509e9b5aac9db538",
- "operationType": "car",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "refundId": "5e725560cdb9f6125a4acb50",
- "status": "succeeded",
- "transactionKind": "refund",
- "tripProjectId": "d5f57c1f-dc33-4632-a5aa-681367685daf"
}, - {
- "id": "5e70ffd5b5db0f5bb839a4ab",
- "type": "billingOperation",
- "createdAt": "2020-03-17T16:50:29Z",
- "amount": {
- "currency": "EUR",
- "total": 110
}, - "bookingSnapshot": {
- "booker": {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "email": "roger@mycorp.fr",
- "fullName": "Roger Moulinier"
}, - "channel": "offline",
- "date": "2020-03-17T16:52:23Z",
- "kind": "car",
- "reference": "OSEF984LOL",
- "supplierName": "Sixt",
- "transport": {
- "cabinClass": "second",
- "departure": {
- "city": "Milan"
}, - "departureLocaleDate": "2020-01-28",
- "destination": {
- "city": "Milan"
}, - "fareType": "flex",
- "returnLocaleDate": "2020-01-30"
}, - "traveler": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "email": "marie-jo@mycorp.fr",
- "fullName": "Marie-Jo Cotin"
}
}, - "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "date": "2020-03-17T16:50:29Z",
- "description": "Car rental - Marie-Jo Cotin - Milan - 28MAR2020",
- "invoiceId": "5e5feb94509e9b5aac9db538",
- "operationType": "car",
- "projectCodeId": "5e7e25b06cb4333b7ec6477e",
- "status": "paid",
- "transactionKind": "purchase",
- "tripProjectId": "d5f57c1f-dc33-4632-a5aa-681367685daf"
}
], - "meta": {
- "pageKind": "cursor",
- "limit": 10,
- "prevBefore": "b3BlcmF0aW9uX2RhdGU6MTU4NDY5NTg2NTkwOQ==",
- "nextAfter": "b3BlcmF0aW9uX2RhdGU6MTU4NDY5NTkwNDYzMw==",
- "order": "asc",
- "sortBy": "createdAt"
}
}
List trip project travelers
Returns a list of users.
path Parameters
id required | string <uuid> The identifier of the trip project. |
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c796cb4333b7ec64777",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 1
}
}
This is the user
resource schema:
id required | string <uuid> <= 50 characters ^[@~\-\.\w]+$ Unique identifier for the user. |
type required | string Value: "user" The resource type. |
createdAt required | string <date-time> Time at which the user was created. |
object User postal address. | |
archived required | boolean If true, then that user is archived. |
billingProfileId | string = 24 characters ^[a-f\d]{24}$ The ID of a billing profile associated with user. |
costCenterId | string = 24 characters ^[a-f\d]{24}$ The ID of a cost center associated with user. |
currency | string Display currency preference. |
dateOfBirth | string Date of birth (format: Example: |
email required | string <email> User email. |
firstName | string User first name. |
gender | string Enum: "female" "male" User gender. |
lang | string Enum: "en" "fr" User language. |
lastName | string User last name. |
managerId | string <uuid> <= 50 characters ^[@~\-\.\w]+$ User ID of manager. |
phoneNumber | string User international phone number. Example: The space between region code and phone number if mandatory. |
roles | Array of strings Items Enum: "accountant" "admin" "authAdmin" "guest" "guestCreator" "manager" "organizer" "premium" Array of user roles |
object Traveler preferences. | |
travelPolicyId | string = 24 characters ^[a-f\d]{24}$ The ID of the travel policy associated to this user. |
Array of objects Array of custom fields. |
{- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2019-09-25T07:35:42Z",
- "address": {
- "city": "string",
- "countryCode": "string",
- "postalCode": "string",
- "region": "string",
- "streetAddress": "string"
}, - "archived": true,
- "billingProfileId": "5de7bc72bf882f3bb31619bf",
- "costCenterId": "5de7bc72bf882f3bb31619bf",
- "currency": "EUR",
- "dateOfBirth": "1977-09-25",
- "email": "john.smith@example.com",
- "firstName": "John",
- "gender": "female",
- "lang": "en",
- "lastName": "Smith",
- "managerId": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "phoneNumber": "+33 661328598",
- "roles": [
- "accountant"
], - "travelerPrefs": {
- "flightSeatPosition": "aisle"
}, - "travelPolicyId": "5de7bc72bf882f3bb31619bf",
- "customFields": [
- {
- "customFieldId": "5de7bc72bf882f3bb31619bf",
- "name": "string",
- "values": [
- {
- "customFieldOptionId": "5de7bc72bf882f3bb31619bf",
- "data": "string",
- "displayName": "string"
}
]
}
]
}
List users
Returns a list of users.
The archived
parameter permits to returns only archived or non archived users
The emails
parameter permits to returns only users that match those emails.
The sortBy
parameter allows you to sort users by email
field too.
By default, users are returned sorted by creation date with oldest users returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
sortBy | string Default: "createdAt" Enum: "createdAt" "email" Sorting field. |
archived | string Example: archived=false If |
emails | string Example: emails=jean@mycorp.fr,juan@mycorp.es A comma separated list of emails. Permits to filter results to return only resources that match those emails. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5add4aee-df89-4fea-9f86-68450a294484",
- "type": "user",
- "createdAt": "2020-03-27T17:02:37Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "email": "jacky@mycorp.fr",
- "firstName": "Jacky",
- "lastName": "Jacquard"
}, - {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c796cb4333b7ec64777",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}, - {
- "id": "16e43434-6f78-44ae-bb90-90f06459e10e",
- "type": "user",
- "createdAt": "2020-03-27T17:03:07Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "email": "roger@mycorp.fr",
- "firstName": "Roger",
- "lastName": "Moulinier",
- "managerId": "35c93884-5cca-4e72-98ff-eb52f611cb21"
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 3,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a user
Creates a new user.
Request Body schema: application/jsonrequired
User resource
required | object (UserPatch) The user fields to update. | ||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath",
- "billingProfileId": "5e7e09f76cb4333b7ec64774"
}
}
Response samples
- 201
{- "data": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
Retrieve a user
Retrieves a user.
path Parameters
id required | string <uuid> The identifier of the user to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
Patch a user
Updates a user with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the user to update. |
Request Body schema: application/jsonrequired
User resource
required | object (UserPatch) The user fields to update. | ||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "costCenterId": "5e7e0c796cb4333b7ec64777"
}
}
Response samples
- 200
{- "data": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c796cb4333b7ec64777",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
Replace a user
Updates a user by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the user to update. |
Request Body schema: application/jsonrequired
User resource
required | object (UserReplace) The user resource. | ||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c796cb4333b7ec64777",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
Response samples
- 200
{- "data": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c796cb4333b7ec64777",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
Delete a user
Deletes a user.
path Parameters
id required | string <uuid> The identifier of the user to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
This is the webhook
resource schema:
id required | string = 24 characters ^[a-f\d]{24}$ Unique identifier for the webhook. |
type required | string Value: "webhook" The resource type. |
createdAt required | string <date-time> Time at which the webhook was created. |
description | string What this webhook is used for. |
disabled required | boolean Default: false Webhook is disabled. |
events | Array of strings Items Enum: "billingOperation.created" "billingOperation.updated" "billingProfile.created" "billingProfile.deleted" "billingProfile.updated" "bookingCancellation.created" "bookingModification.created" "costCenter.created" "costCenter.deleted" "costCenter.updated" "dispute.created" "dispute.updated" "invoice.created" "invoice.updated" "projectCode.created" "projectCode.deleted" "projectCode.updated" "refund.created" "refund.updated" "travelPolicy.created" "travelPolicy.deleted" "travelPolicy.updated" "tripProject.booking.failed" "tripProject.booking.succeeded" "tripProject.created" "user.created" "user.deleted" "user.updated" "webhook.created" "webhook.deleted" "webhook.updated" The list of events kinds enabled for this endpoint. |
url required | string <url> The endpoint URL. |
{- "id": "5de7bc72bf882f3bb31619bf",
- "type": "webhook",
- "createdAt": "2019-09-25T07:35:42Z",
- "description": "string",
- "disabled": false,
- "events": [
- "billingOperation.created"
], - "url": "string"
}
List webhooks
Returns a list of webhooks.
Webooks are returned sorted by creation date, and by default oldest webooks are returned first.
Cursor based pagination is not available.
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Maximum number of items to return. |
offset | integer <int32> Default: 0 Number of items to skip. Can be used only for offset based pagination. |
order | string Default: "asc" Enum: "asc" "desc" Sort order. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "5eb006e01eae0a64503ead28",
- "type": "webhook",
- "createdAt": "2020-05-11T17:08:23Z",
- "description": "Users observer",
- "disabled": false,
- "events": [
- "costCenter.created",
- "costCenter.updated"
],
}, - {
- "id": "5e7e25b06cb4333b7ec6477e",
- "type": "webhook",
- "createdAt": "2020-05-11T17:05:12Z",
- "description": "Invoices observer",
- "disabled": false,
- "events": [
- "invoice.created",
- "invoice.updated"
],
}
], - "meta": {
- "pageKind": "offset",
- "limit": 10,
- "offset": 0,
- "total": 2,
- "order": "asc",
- "sortBy": "createdAt"
}
}
Create a webhook
Creates a new webhook.
Request Body schema: application/jsonrequired
Webhook resource
required | object (WebhookReplace) The webhook resource. | ||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "description": "Testing webhooks",
- "events": [
- "costCenter.created",
- "invoice.created",
- "invoice.updated"
],
}
}
Response samples
- 201
{- "data": {
- "id": "5e875e56fd67c2b801ad6d98",
- "type": "webhook",
- "createdAt": "2020-05-11T16:59:45Z",
- "description": "Testing webhooks",
- "disabled": false,
- "events": [
- "costCenter.created",
- "invoice.created",
- "invoice.updated"
], - "secret": "....",
}
}
Retrieve a webhook
Retrieves a webhook.
path Parameters
id required | string <uuid> The identifier of the webhook to retrieve. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e875e56fd67c2b801ad6d98",
- "type": "webhook",
- "createdAt": "2020-05-11T16:59:45Z",
- "description": "Testing webhooks",
- "disabled": false,
- "events": [
- "costCenter.created",
- "invoice.created",
- "invoice.updated"
],
}
}
Patch a webhook
Updates a webhook with merge patching:
- missing attributes are left unchanged
- set
null
value to remove an attribute.
path Parameters
id required | string <uuid> The identifier of the webhook to update. |
Request Body schema: application/jsonrequired
Webhook resource
required | object (WebhookPatch) The webhook fields to update. | ||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "events": [
- "costCenter.created",
- "costCenter.updated",
- "invoice.created",
- "invoice.updated"
]
}
}
Response samples
- 200
{- "data": {
- "id": "5e875e56fd67c2b801ad6d98",
- "type": "webhook",
- "createdAt": "2020-05-11T16:59:45Z",
- "description": "Testing webhooks",
- "disabled": false,
- "events": [
- "costCenter.created",
- "costCenter.updated",
- "invoice.created",
- "invoice.updated"
],
}
}
Replace a webhook
Updates a webhook by replacing the resource. Missing attributes are removed.
path Parameters
id required | string <uuid> The identifier of the webhook to update. |
Request Body schema: application/jsonrequired
Webhook resource
required | object (WebhookReplace) The webhook resource. | ||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "description": "Testing webhooks",
- "events": [
- "costCenter.created",
- "costCenter.updated",
- "invoice.created",
- "invoice.updated"
],
}
}
Response samples
- 200
{- "data": {
- "id": "5e875e56fd67c2b801ad6d98",
- "type": "webhook",
- "createdAt": "2020-05-11T16:59:45Z",
- "description": "Testing webhooks",
- "disabled": false,
- "events": [
- "costCenter.created",
- "costCenter.updated",
- "invoice.created",
- "invoice.updated"
],
}
}
Delete a webhook
Deletes a webhook.
path Parameters
id required | string <uuid> The identifier of the webhook to delete. |
Responses
Response samples
- 200
{- "data": {
- "id": "5e875e56fd67c2b801ad6d98",
- "type": "webhook",
- "createdAt": "2020-05-11T16:59:45Z",
- "description": "Testing webhooks",
- "disabled": false,
- "events": [
- "costCenter.created",
- "costCenter.updated",
- "invoice.created",
- "invoice.updated"
],
}
}
Response samples
- 200
{- "data": {
- "id": "35c93884-5cca-4e72-98ff-eb52f611cb21",
- "type": "user",
- "createdAt": "2020-03-27T16:28:45Z",
- "archived": false,
- "billingProfileId": "5e7e09f76cb4333b7ec64774",
- "costCenterId": "5e7e0c9a6cb4333b7ec64779",
- "email": "hubert@mycorp.fr",
- "firstName": "Hubert",
- "lastName": "Bonisseur de La Bath"
}
}
With the SCIM API, you can configure your identity provider to provision users on fairjungle.
This documentation describes the supported parts of the SCIM specification.
This is the Error
response schema:
schemas | Array of strings SCIM Error Schema URI. |
detail | string A detailed human-readable message. |
scimType | string Enum: "invalidFilter" "tooMany" "uniqueness" "mutability" "invalidSyntax" "invalidPath" "noTarget" "invalidValue" "invalidVers" "sensitive" A SCIM detail error keyword. |
status | string The HTTP status code expressed as a JSON string. |
{- "schemas": [
- "urn:ietf:params:scim:api:messages:2.0:Error"
], - "detail": "Invalid 'email' value",
- "scimType": "invalidValue",
- "status": "400"
}
This is the SCIM User resource schema:
schemas | Array of strings List of one or more URIs that indicate included SCIM schemas that are used to indicate the attributes contained within resource |
id | string Unique identifier for the user. |
object User metadata. | |
active | boolean If |
Array of objects User work address. Only one address is supported, with:
| |
displayName | string Setup a SCIM User Mapping to enable that attribute. |
Array of objects User email. This field is mandatory. This array must contain only one email, with:
| |
externalId | string An identifier for the user as defined by the provisioning client. |
object Components of the user's name. | |
nickName | string Setup a SCIM User Mapping to enable that attribute. |
Array of objects User phone number. Only one phone number is supported, with:
| |
title | string Setup a SCIM User Mapping to enable that attribute. |
userName | string <email> User email, used to login on fairjungle. |
userType | string Setup a SCIM User Mapping to enable that attribute. |
object Enterprise user extension. | |
object Fairjungle user extension. |
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User",
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User"
], - "id": "517fac99-af7e-4791-bc7f-20613bc9e591",
- "meta": {
- "resourceType": "User",
- "created": "2019-09-25T07:35:42Z",
- "lastModified": "2019-09-26T18:26:57Z",
}, - "active": true,
- "addresses": [
- {
- "country": "string",
- "formatted": "string",
- "locality": "string",
- "postalCode": "string",
- "region": "string",
- "streetAddress": "string",
- "primary": true,
- "type": "work"
}
], - "displayName": "string",
- "emails": [
- {
- "primary": true,
- "type": "work",
- "value": "jean.peuplu@example.com"
}
], - "externalId": "00u15yqwxsIVFisi6697",
- "name": {
- "familyName": "Peuplu",
- "givenName": "Jean",
- "honorificPrefix": "string",
- "honorificSuffix": "string",
- "middleName": "string"
}, - "nickName": "string",
- "phoneNumbers": [
- {
- "primary": true,
- "type": "work",
- "value": "tel:+33-6-61-32-85-98"
}
], - "title": "string",
- "userName": "user@example.com",
- "userType": "string",
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
- "costCenter": "string",
- "division": "string",
- "department": "string",
- "employeeNumber": "string",
- "manager": {
- "displayName": "string",
- "value": "string"
}, - "organization": "string"
}, - "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User": {
- "billingProfile": {
- "id": "6045f5ec1e48d1a57b80ef51",
- "name": "Executives"
}, - "costCenter": {
- "id": "613b079e8172dba464e5a3b4",
- "name": "123 Yepppaaaa"
}, - "dateOfBirth": "1977-09-25",
- "gender": "male",
- "manager": {
- "id": "8b6d84ae-0e09-451d-8a7f-1b8ea699da54",
- "email": "jean-mich.muche@example.com"
}, - "roles": [
- {
- "display": "Admin",
- "value": "admin"
}
], - "travelPolicy": {
- "id": "6062d3982aa781bc8a8a43d9",
- "name": "YOLO"
}
}
}
List users
Query users, as specified in RFC 7644 - 3.4.2. Query Resources.
The sortBy
, sortOrder
, attributes
and excludedAttributes
query parameters are not supported.
query Parameters
startIndex | integer <int32> >= 1 Default: 1 The 1-based index of the first query result. |
count | integer <int32> [ 0 .. 100 ] Default: 10 Desired maximum number of query results per page. |
filter | string A filter expression to request a subset of resources (RFC 7644 - 3.4.2.2. Filtering) Only those
|
Responses
Response samples
- 200
{- "schemas": [
- "urn:ietf:params:scim:api:messages:2.0:ListResponse"
], - "startIndex": 1,
- "itemsPerPage": 2,
- "totalResults": 427,
- "Resources": [
- {
- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User",
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User"
], - "id": "517fac99-af7e-4791-bc7f-20613bc9e591",
- "meta": {
- "resourceType": "User",
- "created": "2017-10-31T23:00:00Z",
- "lastModified": "2022-04-22T15:41:27Z",
}, - "active": true,
- "emails": [
- {
- "primary": true,
- "type": "work",
- "value": "jean.peuplu@example.com"
}
], - "externalId": "00u15yqwxsIVFisi6697",
- "name": {
- "familyName": "Jean",
- "givenName": "Peuplu"
}, - "phoneNumbers": [
- {
- "primary": true,
- "type": "work",
- "value": "tel:+33-6-61-32-85-98"
}
], - "userName": "jean.peuplu@example.com",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User": {
- "billingProfile": {
- "id": "6045f5ec1e48d1a57b80ef51",
- "name": "Executives"
}, - "costCenter": {
- "id": "613b079e8172dba464e5a3b4",
- "name": "123 Yepppaaaa"
}, - "dateOfBirth": "1977-09-25",
- "gender": "male",
- "manager": {
- "id": "8b6d84ae-0e09-451d-8a7f-1b8ea699da54",
- "email": "jean-mich.muche@example.com"
}, - "roles": [
- {
- "display": "Admin",
- "value": "admin"
}
], - "travelPolicy": {
- "id": "6062d3982aa781bc8a8a43d9",
- "name": "YOLO"
}
}
}, - {
- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User",
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User"
], - "id": "9433c45e-ac9e-43d8-80e2-18f4d2634a83",
- "meta": {
- "resourceType": "User",
- "created": "2018-11-11T12:42:22Z",
- "lastModified": "2022-05-23T10:38:14Z",
}, - "active": true,
- "emails": [
- {
- "primary": true,
- "type": "work",
- "value": "johnny.bigoude@example.com"
}
], - "externalId": "88wffghjuykyko81ef861d",
- "name": {
- "familyName": "Johnny",
- "givenName": "Bigoude"
}, - "phoneNumbers": [
- {
- "primary": true,
- "type": "work",
- "value": "tel:+33-6-61-32-85-70"
}
], - "userName": "johnny.bigoude@example.com",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User": {
- "billingProfile": {
- "id": "6045f5ec1e48d1a57b80ef51",
- "name": "Executives"
}, - "costCenter": {
- "id": "613b079e8172dba464e5a3b4",
- "name": "123 Yepppaaaa"
}, - "dateOfBirth": "1977-09-25",
- "gender": "male",
- "manager": {
- "id": "8b6d84ae-0e09-451d-8a7f-1b8ea699da54",
- "email": "jean-mich.muche@example.com"
}, - "roles": [
- {
- "display": "Admin",
- "value": "admin"
}
], - "travelPolicy": {
- "id": "6062d3982aa781bc8a8a43d9",
- "name": "YOLO"
}
}
}
]
}
Create a user
Creates a new user, as specified in RFC 7644 - 3.3. Creating Resources.
Request Body schema: application/jsonrequired
User resource
schemas | Array of strings List of one or more URIs that indicate included SCIM schemas that are used to indicate the attributes contained within resource |
active | boolean If |
Array of objects User work address. Only one address is supported, with:
| |
displayName | string Setup a SCIM User Mapping to enable that attribute. |
Array of objects User email. This field is mandatory. This array must contain only one email, with:
| |
externalId | string An identifier for the user as defined by the provisioning client. |
object Components of the user's name. | |
nickName | string Setup a SCIM User Mapping to enable that attribute. |
Array of objects User phone number. Only one phone number is supported, with:
| |
title | string Setup a SCIM User Mapping to enable that attribute. |
userName | string <email> User email, used to login on fairjungle. |
userType | string Setup a SCIM User Mapping to enable that attribute. |
object Enterprise user extension. | |
object Fairjungle user extension. |
Responses
Request samples
- Payload
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User"
], - "active": true,
- "userName": "jean-mich.muche@example.com",
- "externalId": "88wffghjuykyko81ef861d",
- "name": {
- "givenName": "Jean-Mich",
- "familyName": "Muche"
}, - "emails": [
- {
- "primary": true,
- "value": "jean-mich.muche@example.com",
- "type": "work"
}
]
}
Response samples
- 201
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User"
], - "id": "9433c45e-ac9e-43d8-80e2-18f4d2634a83",
- "active": true,
- "userName": "jean-mich.muche@example.com",
- "externalId": "88wffghjuykyko81ef861d",
- "name": {
- "givenName": "Jean-Mich",
- "familyName": "Muche"
}, - "emails": [
- {
- "primary": true,
- "value": "jean-mich.muche@example.com",
- "type": "work"
}
]
}
Retrieve a user
Retrieves a user as specified in RFC 7644 - 3.4.1. Retrieving a Known Resource.
path Parameters
id required | string <uuid> The identifier of the user to retrieve. |
Responses
Response samples
- 200
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User",
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User"
], - "id": "517fac99-af7e-4791-bc7f-20613bc9e591",
- "meta": {
- "resourceType": "User",
- "created": "2017-10-31T23:00:00Z",
- "lastModified": "2022-04-22T15:41:27Z",
}, - "active": true,
- "emails": [
- {
- "primary": true,
- "type": "work",
- "value": "jean.peuplu@example.com"
}
], - "externalId": "00u15yqwxsIVFisi6697",
- "name": {
- "familyName": "Jean",
- "givenName": "Peuplu"
}, - "phoneNumbers": [
- {
- "primary": true,
- "type": "work",
- "value": "tel:+33-6-61-32-85-98"
}
], - "userName": "jean.peuplu@example.com",
- "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User": {
- "billingProfile": {
- "id": "6045f5ec1e48d1a57b80ef51",
- "name": "Executives"
}, - "costCenter": {
- "id": "613b079e8172dba464e5a3b4",
- "name": "123 Yepppaaaa"
}, - "dateOfBirth": "1977-09-25",
- "gender": "male",
- "manager": {
- "id": "8b6d84ae-0e09-451d-8a7f-1b8ea699da54",
- "email": "jean-mich.muche@example.com"
}, - "roles": [
- {
- "display": "Admin",
- "value": "admin"
}
], - "travelPolicy": {
- "id": "6062d3982aa781bc8a8a43d9",
- "name": "YOLO"
}
}
}
Patch a user
Patch an existing user, as specified in RFC 7644 - 3.5.2. Modifying with PATCH
Missing attributes are left unchanged. Set null
value to remove an attribute.
Only a limited subset of path
expressions are supported:
For
add
operation:emails[type eq \"work\"].value
phoneNumbers[type eq \"work\"].value
For
remove
andreplace
operation:active
emails
emails[type eq \"work\"].value
externalId
name
name.familyName
name.givenName
phoneNumbers
phoneNumbers[type eq \"work\"].value
userName
path Parameters
id required | string <uuid> The identifier of the user to update. |
Request Body schema: application/jsonrequired
User resource
schemas | Array of strings SCIM PatchOp Schema URI. |
Array of objects Patch operations. |
Responses
Request samples
- Payload
{- "schemas": [
- "urn:ietf:params:scim:api:messages:2.0:PatchOp"
], - "Operations": [
- {
- "op": "replace",
- "value": {
- "active": false,
- "name": {
- "givenName": "Jean-Luc"
}, - "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User": {
- "dateOfBirth": null,
- "gender": "male"
}
}
}
]
}
Response samples
- 200
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User"
], - "id": "9433c45e-ac9e-43d8-80e2-18f4d2634a83",
- "active": false,
- "userName": "jean-mich.muche@example.com",
- "externalId": "88wffghjuykyko81ef861d",
- "name": {
- "givenName": "Jean-Luc",
- "familyName": "Muche"
}, - "emails": [
- {
- "primary": true,
- "value": "jean-mich.muche@example.com",
- "type": "work"
}
], - "urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User": {
- "gender": "male"
}
}
Replace a user
Updates a user by replacing the resource, as specified in RFC 7644 - 3.5.1. Replacing with PUT.
Attributes not provided in request are removed.
One notable exception is the attribute urn:ietf:params:scim:schemas:extension:fairjungle:2.0:User
: if not present in request, then fairjungle specific attributes are left unchanged.
path Parameters
id required | string <uuid> The identifier of the user to update. |
Request Body schema: application/jsonrequired
User resource
schemas | Array of strings List of one or more URIs that indicate included SCIM schemas that are used to indicate the attributes contained within resource |
active | boolean If |
Array of objects User work address. Only one address is supported, with:
| |
displayName | string Setup a SCIM User Mapping to enable that attribute. |
Array of objects User email. This field is mandatory. This array must contain only one email, with:
| |
externalId | string An identifier for the user as defined by the provisioning client. |
object Components of the user's name. | |
nickName | string Setup a SCIM User Mapping to enable that attribute. |
Array of objects User phone number. Only one phone number is supported, with:
| |
title | string Setup a SCIM User Mapping to enable that attribute. |
userName | string <email> User email, used to login on fairjungle. |
userType | string Setup a SCIM User Mapping to enable that attribute. |
object Enterprise user extension. | |
object Fairjungle user extension. |
Responses
Request samples
- Payload
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User"
], - "id": "9433c45e-ac9e-43d8-80e2-18f4d2634a83",
- "active": true,
- "userName": "jean-mich.muche@example.com",
- "externalId": "88wffghjuykyko81ef861d",
- "name": {
- "givenName": "Jean-Mich",
- "familyName": "Muche"
}, - "emails": [
- {
- "primary": true,
- "value": "jean-mich.muche@example.com",
- "type": "work"
}
]
}
Response samples
- 200
{- "schemas": [
- "urn:ietf:params:scim:schemas:core:2.0:User"
], - "id": "9433c45e-ac9e-43d8-80e2-18f4d2634a83",
- "active": true,
- "userName": "jean-mich.muche@example.com",
- "externalId": "88wffghjuykyko81ef861d",
- "name": {
- "givenName": "Jean-Mich",
- "familyName": "Muche"
}, - "emails": [
- {
- "primary": true,
- "value": "jean-mich.muche@example.com",
- "type": "work"
}
]
}
Delete a user
Deletes a user, as specified in RFC 7644 - 3.6. Deleting Resources.
path Parameters
id required | string <uuid> The identifier of the user to delete. |