FTBook ReST API Documentation

The FTBook API is a way to integrate with Flygtaxi's and Sverigetaxi's distribution/booking system.

The API have the following methods/functions:


General information

The API can be used for the following functions:

The following product concepts are bookable in the API:

To book the different product concepts there are different API methods that you have to use to make a booking.

Below is an example of how we think the different booking methods should be called and in what order they should be called:

To book to/from an connection any of the following product concecpts Flygtaxi, Tågtaxi, Arlanda Express and Flygbussarna do:

  1. Call "GetServices"-method - To find out which services are available on the airport/train station
  2. Choose service
  3. If service.addressType is of type "Address" you have to call the "Search for a street or location"-method. If service.addressType is of type "Bus Location" or "Train Location" you have to call "Get service locations for a connection"-method instead
  4. Choose address or serviceLocation depending on what service you choosed
  5. Call "Get availability between two locations"-method with the serviceType set to get the available products / prices
  6. Choose product
  7. Create booking
  8. Create segment

To book a regular taxi (Sverigetaxi) from an address to another address do:

  1. Call "Search for a street or location"-method for the pick-up address
  2. Choose pick-up address
  3. Call "Search for a street or location"-method for the drop-off address
  4. Choose destination address
  5. Call "Get availability between two locations"-method with the serviceType set to "Taxi" to get the available products / prices
  6. Choose product
  7. Create booking
  8. Create segment


WADL

Web Application Description Language (WADL) that describes the service can be found on the following url:

(855) 815-0045

Date format

All dates handled in the API will be sent as strings as JSON doesn't have a date type. The format will be in ISO 8601 format:

2014-05-28T22:33:44+02:00

If you are using java 1.5 or later you can use the following code to serialize and deserialize dates

/ serialize Calendar cal = javax.xml.bind.DatatypeConverter.parseDateTime(date); return cal.getTime(); / deserialize Calendar cal = GregorianCalendar.getInstance(); cal.setTime(date); return javax.xml.bind.DatatypeConverter.printDateTime(cal);

Version Numbers

Our URL is versioned with a version number. In our example URLs <version> should be replaced with our current API version number, which is currently version 1.
This means that the full URL should look like:

/ftbook-prod.api.flygtaxi.se/rest/v1/<method>/...

Error handling

All errors are returned using standard HTTP Codes. If there is more information, it will be included in the body of the return call in the following format.

Name Description Format Type
faults Fault messages Array of (877) 948-9278 Required

JSON example

{ [ { "code": 1102, "message": "Booking can not be empty" }, { "code": 1104, "message": "bookingDate can not be empty" }, ] }

Authentication

All requests requires authentication (Basic HTTP AUTH). Contact mikael.kjellstrom@flygtaxi.se about getting a login and password.


Example bookings

Here is an example of a createBooking request

{ "agencyOfficeId": "FT1", "bookingDate": "2014-04-25T12:56:57.235+02:00", "debitMethod": "INVOICE", "invoiceAddress": { "name": "FLYGTAXI Sverige AB", "address1": "Drottningholmsvägen 37", "zipCode": "112 42", "city": "Stockholm", "countryCode": "SE" }, "comment": "This is a comment", "identities": [ { "system": "SABRE", "number": "XYZ123", "unique": false } ] }

Here is an example of the result of the createBooking request above

{ "bookingReference": "2014000000058", "agencyOfficeId": "FT1", "bookingDate": "2014-04-25T12:56:57.235+02:00", "debitMethod": "INVOICE", "invoiceAddress": { "name": "FLYGTAXI Sverige AB", "address1": "Drottningholmsvägen 37", "zipCode": "112 42", "city": "Stockholm", "countryCode": "SE" }, "comment": "This is a comment", "identities": [ { "system": "SABRE", "number": "XYZ123", "unique": false } ] }

Here is an example of a createSegment request

{ "cancelled": false, "bookingDate": "2014-04-25T13:09:43.243+02:00", "infoToDriver": "This is a message for the driver", "clientName": "FLYGTAXI Test Client", "comment": "This is a comment", "passenger": { "firstName": "Mikael", "lastName": "Kjellström", "phone": "0730123456", "email": "info@flygtaxi.se", "uniqueSrc": "FT:ORGID", "uniqueId": "4711" }, "product": { "code": "VTAX", }, "connection": { "type": "FLIGHT", "number": "SK123", "international": false, "departureDate": "2014-04-30T09:00:00+02:00", "departureCode": "ARN", "arrivalDate": "2014-04-30T10:15:00+02:00", "arrivalCode": "GOT" }, "startNode": { "time": "2014-04-30T07:30:00+02:00", "street": { "name": "Drottningholmsvägen", "number": 37, "location": { "name": "Kungsholmen (Stockholm)" } } }, "endNode": { "street": { "location": { "type": "AIRPORT", "code": "ARN" } } }, "feePrice": { "includingVat": "12.50", "excludingVat": "10.00", "vatPercent": "0.25", "currencyCode": "SEK" }, "references": [ { "type": "COSTCENTER", "value": "123" }, { "type": "PROJECT", "value": "test" } ], }

Here is an example of the result of the createSegment request above

{ "cancelled": false, "ftresid": "R000000048", "bookingDate": "2014-04-25T13:09:43.243+02:00", "routeDistanceMeters": 40456, "routeDurationSeconds": 1955, "infoToDriver": "This is a message for the driver", "clientName": "FLYGTAXI Test Client", "comment": "This is a comment", "passenger": { "firstName": "Mikael", "lastName": "Kjellström", "phone": "0730123456", "email": "info@flygtaxi.se", "uniqueSrc": "FT:ORGID", "uniqueId": "4711" }, "product": { "code": "VTAX", "name": "Egen TAXI", "description": "Egen Taxi för upp till 4 resenärer som åker från/till samma adress.", "maxPassengers": 4, "childDiscountPercent": 0, "pickupTimeLocked": false, "childAgeRequired": false, "numberOfPassengersRequired": false, "connectionRequired": true, "firstPossibleBookingTime": "2014-04-25T14:09:00+02:00", "latestCancelTime": "2014-04-30T06:40:00+02:00" }, "connection": { "type": "FLIGHT", "number": "SK123", "international": false, "departureDate": "2014-04-30T09:00:00+02:00", "departureCode": "ARN", "departureName": "Stockholm Arlanda Flygplats", "arrivalDate": "2014-04-30T10:15:00+02:00", "arrivalCode": "GOT", "arrivalName": "Göteborg Landvetter flygplats" }, "startNode": { "time": "2014-04-30T07:30:00+02:00", "street": { "id": 4013, "name": "Drottningholmsvägen", "number": 37, "numberRequired": false, "location": { "type": "LOCATION", "code": "KU8", "name": "Kungsholmen (Stockholm)", "countryCode": "SE", "community": "Stockholm" }, "latitude": 6581076, "longitude": 1626391 } }, "endNode": { "time": "2014-04-30T08:07:00+02:00", "street": { "numberRequired": false, "location": { "type": "AIRPORT", "code": "ARN", "name": "Stockholm Arlanda Flygplats", "countryCode": "SE", "community": "Sigtuna", }, "latitude": 6615859, "longitude": 1620071 } }, "customerPrice": { "priceListOrganizationId": 1, "priceListName": "Standard", "includingVat": "679.00", "excludingVat": "640.57", "vatPercent": "0.06", "currencyCode": "SEK" }, "feePrice": { "includingVat": "12.50", "excludingVat": "10.00", "vatPercent": "0.25", "currencyCode": "SEK" }, "refundPrice": { "priceListOrganizationId": 1, "priceListName": "Standard", "includingVat": "679.00", "excludingVat": "640.57", "vatPercent": "0.06", "currencyCode": "SEK" }, "references": [ { "type": "COSTCENTER", "value": "123" }, { "type": "PROJECT", "value": "test" } ], "latestCancelTime": "2014-04-30T06:40:00+02:00" }

Debit methods

Below are the different debit methods that the API accepts

Type Description
REVERSE This is a special form of invoicing where the agent that makes the booking debits Flygtaxi
AGENT Flygtaxi debits the agent that makes the booking according to agreed upon type of invoicing
AGENT_CUSTOMER Flygtaxi debits the agents own customer according to the debiting type set in Flygtaxis database.
Requires that debitReference is set to the agents customer number/id and that the
customer exists in Flygtaxis database
FLYGTAXI_CUSTOMER An existing Flygtaxi customer will be debited according to debiting type set in Flygtaxis database.
Requires that debitReference is set to an existing Flygtaxi customer number

Object Definitions

Below are the defintions of the different objects that are used in the different methods.

Booking

Name Description Format Type Min length/value Max length/value
bookingId Flygtaxi internal booking id number Readonly n/a n/a
bookingReference Reference to the booking. Example "2014000000001" number Readonly 1 13
agencyOfficeId An identifier that identifies the booking agency string Required 1 32
agencyIataNumber The official IATA-number of the booking agency string Optional 1 32
agencyCustomerId The identity of the booking agencys own customer string Optional 1 32
bookingDate The date and time of when the booking was created string Required 25 25
creatorOrganizationId Flygtaxi internal creatorOrganizationId Number Readonly n/a n/a
creatorName Creator (login) of the booking String Readonly n/a n/a
customerOrganizationId Flygtaxi internal id of the customer Number Readonly n/a n/a
customerName Flygtaxi internal Customer name String Readonly n/a n/a
creationDate Flygtaxi creation date of the booking String Readonly n/a n/a
debitMethod The debit method that should be used for the booking.
Valid methods are:
"REVERSE", "AGENT", "AGENT_CUSTOMER", "FLYGTAXI_CUSTOMER"

For a more detailed explanation of the different debit methods see DebitMethods
string Required 1 32
debitReference The debit reference that should be used for the booking string Optional 1 32
comment Can be used for internal comments. Will not be sent with the booking string Optional 1 256
invoiceAddress The invoice address to use if debitMethod is set to "INVOICE" Address Optional n/a n/a
amadeusUpdate Can be used to specify that MIS and RM*SUR-rows should be added to the Amadeus PNR. Requires that you specify an amadeus record locator in identities AmadeusUpdate Optional n/a n/a
identities Array of additional identities for the booking. Like for an example a Amadeus Record Locator
or Sabre Record Locator
Array of Identity Optional n/a n/a

Segment

Name Description Format Type Min length/value Max length/value
cancelled Boolean that is either true if segment is cancelled or false if not cancelled boolean Required n/a n/a
bookingReference Flygtaxi booking reference. Example "2014000000001" string Readonly 1 13
ftresid Unique Flygtaxi identifier for this segment. Example "R0000000001" string Readonly 1 10
bookingDate The date and time of when the segment was created string Readonly 25 25
routeDistanceMeters Amount of meters calculated by the route planning number Optional 1 32
routeDurationSeconds Amount of seconds calculated by the route planning number Optional 1 32
responsible Responsible transport company code. If set the booking will be sent directly to the specified taxi company instead of going through the regular rules that decides which taxi company should get the booking string Optional 1 32
status Status of the segment. Valid statuses are "PENDING" or "COMPLETE".
If status is PENDING the booking is on hold and will not be sent. Segment is only complete when it have the status COMPLETE
string Optional 1 32
infoToDriver A short message to the taxi driver that can be viewed by the taxi driver and/or the taxi company can be entered here string Optional 1 256
clientName The name of the client software that created the segment. Example: "Flygtaxi Booking Client v1.00" string Required 1 64
comment Can be used for internal comment. Will not be sent with the booking to the taxi company string Optional 1 256
latestCancelTime After this date and time you cannot cancel the segment string Readonly 25 25
passenger The passenger connected to this segment 5044269758 Required n/a n/a
product The product connected to this segment Product Required n/a n/a
connection The connection connected to this segment (423) 987-6946 Optional n/a n/a
startNode The start node connected to this segment Node Required n/a n/a
endNode The end node connected to this segment 4255074226 Optional n/a n/a
customerPrice The customer price connected to this segment (844) 557-1872 Optional n/a n/a
feePrice The fee price connected to this segment. Price Optional n/a n/a
refundPrice The refund price that you get back when you cancel a segment. At the moment it is always 100% of the customer price Price Optional n/a n/a
references The references connected to this segment Array of Reference Optional n/a n/a

Passenger

Name Description Format Type Min length/value Max length/value
title Title of the passenger. "MR", "MRS", "MS", "DR", "CHD" etc. string Optional 1 16
firstName First name (surname) of the passenger string Required 1 32
lastName Last name of the passenger string Required 1 32
phone Phone number to the passenger. Preferable the mobile phone where the passenger can be reached.
Valid characters are "+0-9() -"
string Required 5 64
email The passengers e-mail string Optional 1 64
foid FOID (Form of Identification)

Used to identify the passenger on board Arlanda Express.

NOTE: The card is only used to identify the passenger and is not used for debit.

The FOID should always start with the prefix CC followed by card type and then the card number.

Credit card types:
"CCCC" = General credit card prefix
"CCAX" = American Express
"CCCA" = MasterCard
"CCCO" = COOP
"CCDC" = Diners Club
"CCEC" = EuroCard
"CCIC" = ICA
"CCMC" = MasterCard
"CCST" = Sverigetaxi
"CCVI" = VISA

Credit card example:
CCVI1234567890123456 = VISA

NOTE: Card number can be masked according to the PCI DSS standard. I.e. only
show the first 6 digits and the last 4 digits and mask everything in between with a "X".

It is recommended to always mask the card number.

Here is an example of a masked card number:
CCVI123456XXXXXX3456
string Optional 14 32
childAge The age of the child if the product requires it number Optional n/a n/a
numberOfPassengers Number of passengers number Optional n/a n/a
uniqueSrc Unique Src used to identify a passenger. Is used in combination with uniqueId string Optional 1 32
uniqueId Unique Id of passenger. Should be globally unique in combination with uniqueSrc string Optional 1 32

Identity

Name Description Format Type Min length/value Max length/value
system Name of the booking system string Required 1 64
number Booking number string Required 1 64
unique Is the combination of system and number guaranteed to be unique? boolean Optional n/a n/a

Connection

Name Description Format Type Min length/value Max length/value
type Type of connection, "FLIGHT" or "TRAIN" string Required 5 64
number Flight number or train number string Required 1 32
international Is the flight or train an arrival or departure from abroad? boolean Required n/a n/a
departureDate Departure date and time of the flight or train string Required 25 25
departureCode Departure code. IATA code of the airport or UIC-code of the train station string Required 1 32
arrivalDate Arrival date and time of the flight or train string Required 25 25
arrivalCode Arrival code. IATA code of the airport or UIC-code of the train station string Required 1 32

Node

Name Description Format Type Min length/value Max length/value
time The time of the node string Optional 25 25
street Street of the node Street Optional n/a n/a

Street

Name Description Format Type Min length/value Max length/value
id Unique Flygtaxi id of the street number Required n/a n/a
name Street name string Optional 1 64
number Street number number Optional n/a n/a
letter Street letter string Optional 1 32
numberRequired Is street number required? boolean Optional n/a n/a
zipcode Zipcode number Optional n/a n/a
rt90x RT90 X coordinate number Optional n/a n/a
rt90y RT90 Y coordinate number Optional n/a n/a
location Location 813-756-5253 Optional n/a n/a
distance Distance number Optional n/a n/a
latitude WGS84 latitude number Optional n/a n/a
longitude WGS84 longitude number Optional n/a n/a
description Description string Optional 1 256
numberRange Number range Array of 8506626914 Optional n/a n/a

NumberRange

Name Description Format Type Min length/value Max length/value
start Start number of the range number Required n/a n/a
end End number of the range number Required n/a n/a

Location

Name Description Format Type Min length/value Max length/value
type Location type. string Required 1 32
code Location code string Required 1 32
name Location name string Required 1 64
countryCode Country code string Required 1 64
community Community / Municipality / County string Required 1 64
communityCode Community code (Flygtaxi internal code) string Required 1 64
description Description string Required 1 256

StreetSearchResult

Name Description Format Type Min length/value Max length/value
moreResultsAvailable Is more search results available? boolean Required n/a n/a
streets An array of Street containing the matching search results Array of (516) 727-7465 Required n/a n/a

Address

Name Description Format Type Min length/value Max length/value
name Company name or person name string Optional 2 64
address1 Address row 1 string Required 1 64
address2 Address row 2 string Required 1 64
zipCode zip code string Required 1 64
city City string Required 1 64
state State string Required 1 64
countryCode Code according to ISO 3166-1 alpha-2, "SE" for Sweden, "UK" for United Kingdom etc. string Required 2 32
email E-mail address string Required 2 64

Product

Name Description Format Type Min length/value Max length/value
name The name of the product string Readonly 1 64
code Product code "TAXI", "VTAX", "VTAX-2" etc. string Required 4 32
description Product description string Readonly 1 256
maxPassengers Maximum number of passengers number Readonly n/a n/a
childDiscountPercent If different from 0 then the product have a child discount number Readonly n/a n/a
pickupTimeLocked If set the product doesn't allow that you change the pickup time boolean Readonly n/a n/a
childAgeRequired If set the product requires that you specify the old of the child boolean Readonly n/a n/a
foidRequired If set the product requires that you specify a foid on the passenger-object boolean Readonly n/a n/a
numberOfPassengersRequired If set the product requires that you specify how many passengers that should travel boolean Readonly n/a n/a
connectionRequired If true then this product requires that a connection is specified boolean Readonly n/a n/a
firstPossibleBookingTime The first possible date and time that this product is bookable from string Readonly 25 25
latestCancelTime The latest date and time you can cancel this product string Readonly 25 25

Price

Name Description Format Type Min length/value Max length/value
priceListOrganizationId The price list organization id number Readonly n/a n/a
priceListName The name of the price list string Readonly 1 64
includingVat The price including VAT string Required 10 9999
excludingVat The price excluding VAT string Required 10 9999
vatPercent The vat percentage in hundreds of a percent, usually 0.06 (6%) for taxi string Required 0.00 0.25
currencyCode The currency code according to ISO 4217 string Required n/a n/a

Note the use of string datatype instead of number as the number datatype is often
implemented as float or double datatype in languages as Java, C#
That datatype has problem with rounding and is not suitable of handling monetary values.


Reference

Name Description Format Type Min length/value Max length/value
type Reference type. Allowed types are:
"COSTCENTER", "DEPARTMENT", "MISCELLANEOUS",
"PROJECT", "REQUISITION", "REFERNCE",
"EMPLOYEECODE" and "AMADEUSTRANSACTIONID"
string Required 1 64
name Reference name. This is what should be shown to the user as the name of the reference string Required 1 64
value The value of the reference string Required 1 64
mandatory True if the reference is mandatory boolean Required n/a n/a

Availability

Name Description Format Type Min length/value Max length/value
startNode start node Node Readonly n/a n/a
endNode end node Node Readonly n/a n/a
product The product 604-920-3849 Readonly n/a n/a
price The customer price purlieu Readonly n/a n/a
distanceMeters Distance in meters calculated between the start node and end node number Readonly n/a n/a
durationSeconds Duration in seconds calculated between the start node and end node number Readonly n/a n/a

Service

Name Description Format Type Min length/value Max length/value
name Service name

Can be one of the following:

"Bus" - Flygbussarna and other busses
"Parcel" - Transport of parcels or packages
"Special Transport" - Special transports like wheel chair transports
"Taxi" - Regular taxi - Flygtaxi, Tågtaxi and Sverigetaxi
"Ticket" - Different kind of tickets, like Länsbussarna in Luleå
"Train" - Arlanda Express
"Transfer" - Different kind of transfers like Åretransfer in Östersund
string Readonly 1 64
description Description of the service string Readonly 1 256
addressType Address type of the service.

Type can be one of the following:

"Address" - Requires that you search for an address
"Bus Location" - Requires that you do a serviceLocation search
"Train Location" - Requires that you do a serviceLocation search
string Readonly 1 64

ServiceLocation

Name Description Format Type Min length/value Max length/value
name Location name string Readonly 1 64
serviceName Service name string Readonly 1 64
locationCode Location code string Readonly 1 32
productName Name of the product string Readonly 1 64
productCode Product code string Readonly 1 32
distance Distance in kilometer number Readonly n/a n/a
duration Duration in minutes number Readonly n/a n/a
description Description of the location string Readonly 1 256

AccountRequest

Name Description Format Type Min length/value Max length/value
id Id of the registration number Readonly n/a n/a
name Name of the company / travel agency string Required 1 128
address1 First address line string Required 1 64
address2 Second address line string Optional 1 64
zipcode Zip code string Optional 1 64
city City string Optional 1 64
country Country. Sweden, Denmark etc string Optional 1 64
vatNumber VAT-number string Optional 1 64
contactEmail Contact email address string Optional 1 64
contactPhone Contact phone number string Optional 1 64
officeId Office id or PCC string Optional 1 64
debitMethod Debit method. Valid values are "INVOICE", "TRAVELACCOUNT", "PDF" string Optional 1 64
debitEmail Debit email address string Optional 1 64
travelAccountType Travel account type. Valid values are "AMEX_BTA", "FIRST_CARD", "DINERS_CLUB_TAC" string Optional 1 64
travelAccountNumber Travel account number string Optional 1 64

AuthenticateResponse

Name Description Format Type Min length/value Max length/value
name Name of the authenticated user string Required 1 128
type Authenticated user type. Valid types: "AGENT", "CUSTOMER", "TRAVELLER" string Required 1 64

SabreXmlRequest

Name Description Format Type Min length/value Max length/value
xmlMessage A string containing the XML-document to be decoded string Required 1 64000

SabreXmlResponse

Name Description Format Type Min length/value Max length/value
defaultDebitMethod The default debit method that is to be selected string Required 1 64
defaultDebitReference The default debit reference to be used for debit methods that requires
a debit reference. For example if defaultDebitMethod is "AGENT_CUSTOMER"
defaultDebitReference should contain the agents customer number
string Optional 1 64
allowedDebitMethods An array of String with allowed debit methods. For example "AGENT", "AGENT_CUSTOMER" Array of String Required n/a n/a
passengers A list of passengers decoded from the Sabre XML
containing name, email, phone number, foid, profile index etc.
Array of 843-618-0072 Required n/a n/a
references A list of references that should be used in the booking Array of Reference Optional n/a n/a

AmadeusUpdate

Name Description Format Type Min length/value Max length/value
addMis Flag that indicates if a MIS-rows should be added to the Amadeus PNR boolean Required n/a n/a
addRmsur Flag that indicates if a RM*SUR-rows should be added to the Amadeus PNR boolean Required n/a n/a
suffix The suffix to add after MIS and RM*SUR-rows. Allowed suffixes are:
"SELLFT", "SELLTT", "TRANFT" and "TRANTT"
string Required 3 16

Complete

Name Description Format Type Min length/value Max length/value
bookingReference Flygtaxi booking reference number Readonly 1 13
identities Array of additional identities for the booking.
Like for an example a Amadeus Record Locator or Sabre Record Locator
Array of 208-936-4225 Optional n/a n/a

Profile

Name Description Format Type Min length/value Max length/value
startNode Start node 301-472-5394 Readonly n/a n/a
endNode End node (204) 421-6055 Readonly n/a n/a

Fault

Name Description Format Type Min length/value Max length/value
code Error code number Required n/a n/a
message Fault message string Required n/a n/a

REST Calls


Create a booking

Creates a booking and returns the created booking with an added Flygtaxi booking reference

Resource Path

/rest/v<version>/booking

Supported API versions

HTTP Method

POST

HTTP Request / Query parameters

MIME Type Body Description
application/json 581-804-4483 Body should contain a booking object

HTTP Response

Code MIME Type Body Description
200 application/json protozoonal Body containing a Booking object with bookingReference filled in
422 application/json (972) 277-5602 Body containing an array of Fault's

Faults

Code Description
500 Internal error
1102 Booking empty
1103 bookingReference not empty
1104 bookingDate can not be empty
1105 bookingDate too far in the past
1106 bookingDate too far in the future
1107 comment is invalid
1110 agencyOfficeId can not be empty
1111 agencyOfficeId is invalid
1112 agencyIataNumber is invalid
1113 agencyCustomerId is invalid
1114 debitMethod can not be empty
1115 debitMethod is invalid
1116 debitReference can not be empty
1117 debitReference is invalid
1120 invoiceAddress can not be empty
1121 invoiceAddress.name can not be empty
1122 invoiceAddress.name is invalid
1123 invoiceAddress.address1 can not be empty
1124 invoiceAddress.address1 is invalid
1125 invoiceAddress.address2 is invalid
1126 invoiceAddress.zipCode can not be empty
1127 invoiceAddress.zipCode is invalid
1128 invoiceAddress.city can not be empty
1129 invoiceAddress.city is invalid
1130 invoiceAddress.state is invalid
1131 invoiceAddress.countryCode can not be empty
1132 invoiceAddress.countryCode is invalid
1133 invoiceAddress.email is invalid
1140 amadeusUpdate.addMis is invalid
1141 amadeusUpdate.addRmsur is invalid
1142 amadeusUpdate.suffix can not be empty
1143 amadeusUpdate.suffix is invalid
1144 amadeusUpdate requires an amadeus record locator in identities

Get a booking by booking reference

Retreive a booking by a Flygtaxi booking reference

Resource Path

/rest/v<version>/booking/<bookingReference>

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Name Description Format Type
bookingReference Flygtaxi bookingReference string Required

HTTP Response

Code MIME Type Body Description
200 application/json booking Body containing the booking object
422 application/json diaspidine Body containing the fault object

Faults

Code Description
500 Internal error
1100 Booking not found
1101 Booking access denied
1108 Booking reference can not be empty
1109 Booking reference is invalid

Get a booking by type and reference

Retreive a booking by type (AMADEUS or SABRE) and reference (PNR record locator)

Resource Path

/rest/v<version>/booking/<type>/<bookingReference>

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Name Description Format Type
type Reference type. Valid types are "AMADEUS" and "SABRE" string Required
bookingReference Booking reference string Required

HTTP Response

Code MIME Type Body Description
200 application/json booking Body containing the booking object
422 application/json 702-501-1832 Body containing the fault object

Faults

Code Description
500 Internal error
1100 Booking not found
1101 Booking access denied
1108 Booking reference can not be empty
1109 Booking reference is invalid

Cancel a booking

Cancells all cancellable segments connected to the booking by Flygtaxi booking reference

Resource Path

/rest/v<version>/booking/<bookingNumber>

Supported API versions

HTTP Method

DELETE

HTTP Request / Query parameters

Name Description Format Type
bookingNumber Flygtaxi bookingReference string Required

HTTP Response

Code MIME Type Body Description
200 application/json Array of 956-775-5836 that was cancelled Booking cancelled OK
422 application/json 252-339-3619 Body containing the fault object

Faults

Code Description
500 Internal error
1100 Booking not found
1101 Booking access denied
1108 Booking reference can not be empty
1109 Booking reference is invalid
1302 All cancellable segments already cancelled
1303 No segments cancelled

Search for a street or location

Search for a street or location in Flygtaxis database

Resource Path

/rest/v<version>/street

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
type The address/location type you want to search for.

Valid types are:

"ALL" - Matches all types
"ADDRESS" - Matches street addresses
"POI" - Matches compy names, hotels etc.
"AIRPORT" - Matches airports
"TRAIN_STATION" - Matches train stations
"FERRY_PORT" - Matches ferry ports

Default if not specified is ALL
string Optional
search Street address or POI to search for. You can narrow the search if you specify ", <location>" after the street address or POI. Example: Drottningholmsvägen 37 or Drottningholmsvägen 37, Stockholm string Optional
code Location code. Example "ARN" for Arlanda airport string Optional
sort_code Sorts the result based on the closest distance from the supplied location code. Example "ARN" for Arlanda airport string Optional
coordinate_type Coordinate type. Either "RT90" or "WGS84". Default "RT90" string Optional
coordinate A comma separated string (latitude,longitude).
Used to measure the distance between the specified coordinate and the matching address.
Also sorts the search result according to nearest distance if specified.
Example RT90 "6581076,1626391"
string Optional
street_coordinate_type Street coordinate type. Either "RT90" or "WGS84". Default "RT90" string Optional
street_coordinate A comma separated string (latitude,longitude).
Used to restrict the search to only return results that are
in close proximity to the coordinate.
Also sorts the search result according to nearest distance if specified.
Example RT90 "6581076,1626391"
string Optional
street_coordinate_precision When used with street_coordinate it restricts the search to the specified coordinate
and precision, which is in meters. Default 0
number Optional
exact Do an exact match when searching for a street name or location Boolean Optional
offset Offset in the search result. Default 0 number Optional
limit Limit the number of results. Default 25 number Optional

HTTP Response

Code MIME Type Body Description
200 application/json (304) 584-8003 Body containing an streetSearchResult object
204 application/json empty Returned if search returned no matches
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
4000 type can not be empty
4001 type is invalid
4002 code is invalid
4003 search is invalid
4004 coordinateType can not be empty
4005 coordinateType is invalid
4006 coordinate is invalid
4007 exact is invalid
4008 offset can not be empty
4009 offset is invalid
4010 limit can not be empty
4011 limit is invalid
4012 streetCoordinateType can not be empty
4013 streetCoordinateType is invalid
4014 streetCoordinate is invalid
4015 streetCoordinatePrecision is invalid
4016 sortCode is invalid

Get services for a connection

Get services for a connection to show what kind of services (products) that are available to/from a connection

Resource Path

/rest/v<version>/service

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
connectionCode The connection code. Example "ARN" for Arlanda airport string Required
direction Direction. Can be either "D" (departure) or "A" (Arrival) string Required
date Date and time to check for when a service is available string Required
language Language code. "sv" for Swedish and "en" for English. Default "sv" string Optional

HTTP Response

Code MIME Type Body Description
200 application/json Array of 8146942532 Body containing an array of Service objects
204 application/json empty Returned if search returned no matches
422 application/json (816) 881-5180 Body containing the fault object

Faults

Code Description
500 Internal error
4100 connectionCode can not be empty
4101 connectionCode is invalid
4102 direction can not be empty
4103 direction is invalid
4104 date can not be empty
4105 date is invalid
4106 language is invalid

Get service locations for a connection

Get service locations for a connection that shows a list of available locations and products that are available to/from a connection

Resource Path

/rest/v<version>/servicelocation

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
connectionCode The connection code. Example "ARN" for Arlanda airport string Required
direction Direction. Can be either "D" (departure) or "A" (Arrival) string Required
date Date and time to check for services string Required
serviceName Service name. Valid service names are
"Bus", "Bus&Taxi", "Parcel", "Special Transport",
"Taxi", "Ticket", "Train", "Transfer"
string Required
language Language code. "sv" for Swedish and "en" for English. Default "sv" string Optional

HTTP Response

Code MIME Type Body Description
200 application/json Array of serviceLocation Body containing an array of ServiceLocation objects
204 application/json empty Returned if search returned no matches
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
4200 connectionCode can not be empty
4201 connectionCode is invalid
4202 direction can not be empty
4203 direction is invalid
4204 date can not be empty
4205 date is invalid
4206 serviceName can not be empty
4207 serviceName is invalid
4208 language is invalid

Get service availability for a connection

Get service availability for a connection that returns a list of availabilities to/from a connection

Resource Path

/rest/v<version>/serviceavailability

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
connectionCode The connection code. Example "ARN" for Arlanda airport string Required
direction Direction. Can be either "D" (departure) or "A" (Arrival) string Required
date Date and time to check for services string Required
serviceName Service name. Valid service names are
"Bus", "Bus&Taxi", "Parcel", "Special Transport",
"Taxi", "Ticket", "Train", "Transfer"
Array of strings Required
language Language code. "sv" for Swedish and "en" for English. Default "sv" string Optional

HTTP Response

Code MIME Type Body Description
200 application/json Array of availability Body containing an array of Availability objects
204 application/json empty Returned if search returned no matches
422 application/json (203) 488-9172 Body containing the fault object

Faults

Code Description
500 Internal error
5500 connectionCode can not be empty
5501 connectionCode is invalid
5502 direction can not be empty
5503 direction is invalid
5504 date can not be empty
5505 date is invalid
5506 serviceName can not be empty
5507 serviceName is invalid
5508 language is invalid

Get availability between two locations

Get availability between two locations to show which products/prices that are available for booking

Resource Path

/rest/v<version>/availability

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
startStreetName Start street name string Optional
startStreetNumber Start street number string Optional
startStreetLetter Start street letter string Optional
startLocationCode End location code string Optional
endStreetName End street name string Optional
endStreetNumber End street number string Optional
endStreetLetter End street letter string Optional
endLocationCode End location code string Optional
desiredDate The desired date and time for the pick-up string Optional
connectionDate The date and time of the arrival or departure of the flight/train or boat string Optional
international Boolean flag that indicates if it is an international flight/train or boat. Default false boolean Optional
officeId Office Id or PCC-code of the booking agent string Optional
connectionArrival Boolean flag that if set to true indicates that the connectionDate is an arrival date, if set to false it is an departure date boolean Optional
customerId The booking agents customer id

Can be used in two ways.

In combination with officeId and then customerId contains
the booking agents customer id.

or

If officeId is empty customerId can be used to identify a Flygtaxi
customer through a Flygtaxi orgid
string Optional
serviceType Service type string Optional
language Language code. sv for Swedish and en for English. Default sv string Optional

HTTP Response

Code MIME Type Body Description
200 application/json Array of availability Body containing an array of Availability objects
204 application/json empty Returned if search returned no matches
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
4300 Neither startStreetName or startLocationCode is specified
4301 startStreetName is invalid
4302 startStreetNumber is invalid
4303 startStreetLetter is invalid
4304 startLocationCode is invalid
4305 Neither endStreetName or endLocationCode is specified
4306 endStreetName is invalid
4307 endStreetNumber is invalid
4308 endStreetLetter is invalid
4309 endLocationCode is invalid
4310 desiredDate is invalid
4311 connectionDate is invalid
4312 international can not be empty
4313 officeId can not be empty
4314 customerId can not be empty
4315 serviceType can not be empty
4316 serviceType is invalid
4317 language is invalid
4400 start not found
4401 end not found
4402 route planning failed
4403 Agreement have no products

Get a segment

Get a segment

Resource Path

/rest/v<version>/booking/segment/<ftresid>

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
ftresid Flygtaxi ftresid string Required

HTTP Response

Code MIME Type Body Description
200 application/json Segment Body containing a Segment object
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied
1200 Segment not found

Get a segment by reference type and value

Get a segment by reference type and value

Resource Path

/rest/v<version>/booking/segment/reference/<type>/<value>

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
type Reference type. Valid types are "AMADEUSTRANSACTIONID" string Required
value Reference value string Required

HTTP Response

Code MIME Type Body Description
200 application/json (305) 858-8936 Body containing a Segment object
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied
1316 Segment not found

Get all segments by booking reference

Get all segments by booking reference

Resource Path

/rest/v<version>/booking/segments/<bookingReference>

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
bookingReference Flygtaxi bookingReference string Required

HTTP Response

Code MIME Type Body Description
200 application/json Array of (845) 633-6404 Body containing an Array of Segment objects
422 application/json (574) 537-4600 Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied
1100 Booking not found

Get all segments by type and reference

Get all segments by type and reference

Resource Path

/rest/v<version>/booking/segments/<type>/<bookingReference>

Supported API versions

HTTP Method

GET

HTTP Request / Query parameters

Parameter Description Format Type
type Reference type. Valid types are "AMADEUS" and "SABRE" string Required
bookingReference Booking reference string Required

HTTP Response

Code MIME Type Body Description
200 application/json Array of 559-312-9730 Body containing an Array of Segment objects
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied
1100 Booking not found

Cancel a segment

Cancel a segment

Resource Path

/rest/v<version>/booking/segment/<ftresid>

Supported API versions

HTTP Method

DELETE

HTTP Request / Query parameters

Parameter Description Format Type
ftresid Flygtaxi ftresid string Required

HTTP Response

Code MIME Type Body Description
200 application/json Segment Body containing a Segment object
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied
1200 Segment not found
1203 Segment already cancelled
1204 Segment have passed it's latest cancellable date

Create a segment

Create a segment

Resource Path

/rest/v<version>/booking/segment/<bookingReference>

Supported API versions

HTTP Method

POST

HTTP Request / Query parameters

Parameter Description Format Type
bookingReference Flygtaxi bookingReference from the createBooking call string Required
MIME Type Body Description
application/json segment Body should contain a segment object

HTTP Response

Code MIME Type Body Description
200 application/json Segment Body containing a Segment object with ftresid and other fields filled in
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied
1201 segment can not be empty
1202 segment.comment is invalid
1210 segment.startNode not found
1211 segment.startNode not unique
1212 segment.startNode requires street number
1213 segment.startNode.time is invalid
1220 segment.endNode not found
1221 segment.endNode not unique
1222 segment.endNode requires street number
1223 segment.endNode.time is invalid
1230 segment.cancelled is invalid
1231 segment.ftresid is invalid, can not be set when creating a booking
1232 segment.bookingDate can not be empty
1233 segment.infoToDriver is invalid
1234 No availability found
1240 segment.passenger can not be empty
1241 segment.passenger.firstName can not be empty
1242 segment.passenger.firstName is invalid
1243 segment.passenger.lastName can not be empty
1244 segment.passenger.lastName is invalid
1245 segment.passenger.title is invalid
1246 segment.passenger.phone can not be empty
1247 segment.passenger.phone is invalid
1248 segment.passenger.email is invalid
1249 segment.passenger.childAge is invalid
1250 segment.passenger.numberOfPassengers is invalid
1251 segment.passenger.foid is invalid
1252 segment.passenger.uniqueSrc is invalid
1253 segment.passenger.uniqueId is invalid
1260 segment.product can not be empty
1261 segment.product.code can not be empty
1262 segment.product.code is invalid
1263 segment.product.name is invalid
1264 segment.product requires connection
1265 segment.product requires child age
1266 segment.product requires number of passengers
1267 segment.product pickup time is locked
1268 segment.product requires that passenger have a foid
1280 segment.connection can not be empty
1281 segment.connection.type can not be empty
1282 segment.connection.type is invalid
1283 segment.connection.number can not be empty
1284 segment.connection.number is invalid
1285 segment.connection.international can not be empty
1286 segment.connection.depatureDate is invalid
1287 segment.connection.depatureCode can not be empty
1288 segment.connection.depatureCode is invalid
1289 segment.connection.depatureName is invalid
1290 segment.connection.arrivalDate is invalid
1291 segment.connection.arrivalCode can not be empty
1292 segment.connection.arrivalCode is invalid
1293 segment.connection.arrivalName is invalid
1310 segment.reference.type can not be empty
1311 segment.reference.type is invalid
1312 segment.reference.value can not be empty
1313 segment.reference.value is invalid
1314 segment.reference.name can not be empty
1315 segment.reference.name is invalid

Account request

Use this method to do a request to be registered and approved for billing by Flygtaxi. Also to get a login and password to be able to make bookings through the API.

Resource Path

/rest/v<version>/account/request

Supported API versions

HTTP Method

POST

HTTP Request / Query parameters

MIME Type Body Description
application/json AccountRequest Body should contain a AccountRequest object

HTTP Response

Code MIME Type Body Description
200 application/json AccountRequest Body containing a AccountRequest object with id field filled in
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
4501 accountRequest can not be empty
4502 name can not be empty
4503 name is invalid
4504 address1 can not be empty
4505 address1 is invalid
4506 address2 is invalid
4507 zipcode can not be empty
4508 zipcode is invalid
4509 city can not be empty
4510 city is invalid
4512 vatNumber is invalid
4513 country can not be empty
4514 country is invalid
4515 officeId can not be empty
4516 officeId is invalid
4517 phone can not be empty
4518 phone is invalid
4519 contactEmail can not be empty
4520 contactEmail is invalid
4521 debitMethod can not be empty
4522 debitMethod is invalid
4523 debitEmail can not be empty
4524 debitEmail is invalid
4525 accountType can not be empty
4526 accountType is invalid
4527 accountNumber can not be empty
4528 accountNumber is invalid

Get Profile

Get a travellers last X trips

Resource Path

/rest/v<version>/profile/trips/<uniqueSrc>/<uniqueId>

Supported API versions

HTTP Method

GET

HTTP Request / Path parameters

Parameter Description Format Type
uniqueSrc Unique src of passenger. Used in combination with uniqueId string Required
uniqueId Unique id of passenger. Should be globally unique in combination with uniqueSrc string Required

HTTP Request / Query parameters

Parameter Description Format Type
startCode Used to filter the results on profiles that have a start code matching.
Example: "ARN" for Stockholm Arlanda Airport
string Optional
endCode Used to filter the results on profiles that have a end code matching.
Example: "ARN" for Stockholm Arlanda Airport
string Optional
limit Limit the number of results. Default 5 number Optional

HTTP Response

Code MIME Type Body Description
200 application/json Array of Profile Body containing an Array of Profile objects
204 application/json empty Returned if search returned no matches
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
666 Access denied

Authenticate

Authenticate user. Simple method to authenticate a user.

Resource Path

/rest/v<version>/account/authenticate

Supported API versions

HTTP Method

GET

HTTP Response

Code MIME Type Body Description
200 application/json AuthenticateResponse Body containing a AuthenticateResponse object
422 application/json fault Body containing the fault object

Faults

Code Description
500 Internal error
4701 Login is denied - contact Flygtaxi support

Decode Sabre XML

Decodes Sabre XML PNR data and returns structured information

Resource Path

/rest/v<version>/decode/sabre/pnr

Supported API versions

HTTP Method

POST

HTTP Request / Query parameters

MIME Type Body Description
application/json 7138053105 Body should contain a SabreXmlRequest object

HTTP Response

Code MIME Type Body Description
200 application/json SabreXmlResponse Body containing a SabreXmlResponse object
422 application/json (386) 774-3008 Body containing an array of Fault's

Faults

Code Description
500 Internal error
4801 sabreXmlRequest can not be empty
4802 sabreXmlRequest XML message can not be empty
4803 sabreXmlRequest XML message is invalid

Complete a booking

Completes a booking. Changes the status on all it's segment that have status PENDING to COMPLETE and also have the ability to add booking identities

Resource Path

/rest/v<version>/booking/complete

Supported API versions

HTTP Method

POST

HTTP Request / Query parameters

MIME Type Body Description
application/json Complete Body should contain a Complete object

HTTP Response

Code MIME Type Body Description
200 application/json Complete Body containing a Complete object
422 application/json fault Body containing an array of Fault's

Faults

Code Description
500 Internal error
4900 bookingReference not found
4901 bookingReference cannot be empty
4902 complete.identity.system cannot be empty
4903 complete.identity.system is invalid
4904 complete.identity.number cannot be empty
4905 complete.identity.number is invalid
4906 complete.identity.unique must be true or false

Copyright © 2014-2018 Flygtaxi Sverige AB. All rights reserved.