GetTransfer API

With the GetTransfer API, affiliates can:

  • receive and display information about transfers on their website
  • create transfer requests on their website
  • receive remuneration for paid requests after transfer completion

Before you start working with GetTransfer API you need to register in the Travelpayouts affiliate network and join the GetTransfer program. 

To work with the API you will need a special key (API_KEY). To get it, please send the following information to our support team:

  • where and how you plan to use the API
  • prototypes/designs of the future project or an existing project where you plan to use the function
  • number of visitors/users per month
  • language/region of the resource
  • how you attract traffic.
Terms of API access:
  • Prices can only be requested if the request is initiated by a real user with points from/to and the date of travel. Collection of price data in automatic mode without real user requests is prohibited.
  • Users should always use the latest information from the GetTransfer.com API to show them; data caching on the affiliate side is prohibited.
  • In the affiliate interface, the price obtained by using the Display Prices query must be specified with the specification that it is the initial price (price "from").
  • In the request Create a transfer request, the affiliate must specify the current email of the user who requests the transfer. It is this email the user will receive a link to his account to view the offers received from the carriers and the subsequent booking.
  • In order to be launched into production, the affiliate must successfully pass the testing by GetTransfer.com in the test environment (GetTransfer.com specialists must be given access to the affiliate's test environment for testing).

Address for sending requests

API requests are sent to: https://gettransfer.com/api.

Test Environment: https://gtrbox.org/api

Getting an API token

GET /access_token?api_key=API_KEY

Where api_key is your key, which will be provided after contacting support.

Request example

https://gettransfer.com/api/access_token?b288898c36e9a438b0577ecca41ae495

Response example

{
    "result": "success",
    "data": {
        "token": "f679fa7c628ec12f9229dbf52a5ec1cece364b23ff09841567c9ea7c25473569"
    }
}

Create transfer request

POST /api/transfers

The received access token must be specified in the request header:

'X-ACCESS-TOKEN: f679fa7c628ec12f9229dbf52a5ec1cece364b23ff09841567c9ea7c25473569'

Request parameters

Required parameters:

  • point - points from where/to where (for hourly transfer you can only from where)
  • pax - number of passengers
  • transport_type_ids - type of transport
  • email, phone - client's contacts: email, phone (only email is allowed)

Additional parameters:

  • comment - comments for the driver (for example, that the passenger has an animal with him, snowboarding, oversized luggage)
  • full_name - the name to be specified on the tablet for the meeting
  • flight_number - flight number

Request example

type Point = string // I.e. "(55.7563174,37.6170465)";
type CityPoint = {
name: string, // I.e. "Moscow, Russia"
point: Point,
place_id: string // Google`s place_id
};
type TripParams = {
date: string, // _YYYY/MM/DD_
time: string // _HH:MM_ (in `CityPoint` timezone ),
flight_number: ?string
};
type TransportTypeId = "economy" | "comfort" | "business" | "premium" | "limousine" | "suv" | "van" | "mini
bus" | "bus" | "helicopter";
type Params = {
transfer: {
from: CityPoint,
to: CityPoint,
trip_to: TripParams,
trip_return?: TripParams,
duration: number // for per hour transfers only, In hours, i.e. 3,
transport_type_ids: TransportTypeId[], // Transport type ids, at least one requred
pax: number, // Total number of passengers (adults + child seats), >= 1
child_seats_infant?: number, // >=0
child_seats_convertible?: number, // >=0
child_seats_booster?: number, // >=0
name_sign?: string,
comment?: string,
}
passenger_account?: { //real passenger data, email is mandatory, phone is optional
email: string,
full_name: string, // may be any nickname
phone: string // I.e. "+78005553535" leading "+" requried
},
promo_code: string?
}

Response example

type Point = string // I.e. "(55.7563174,37.6170465)";
type CityPoint = {
name: string, // I.e. "Moscow, Russia"
point: Point,
place_id: string // Google`s place_id
};
type DateTime = string // ISO 8601, i.e. "2018-03-02T16:00:00+02:00";
type TransferStatus = "new" | "performed" | "completed" | "canceled" | "not_completed" | "rejected" | "pen
ding_confirmation" | "outdated";
type TransportTypeId = "economy" | "comfort" | "business" | "premium" | "limousine" | "suv" | "van" | "mini
bus" | "bus" | "helicopter";
type Money = {
default: string, // I.e. "9,98 ₽" in base currency
preferred?: string // I.e. "US$1.00" exchanged to preferred currency
};
type BookNowOffer = {
TransportTypeId: {
currency: string,
amount: number,
base: Money,
?without_discount: Money
}
};
type TransferType = 'one_way' | 'hourly' | 'round_trip';
type Transfer = {
id: number,
created_at: DateTime,
duration: ?number, // In hours
distance: ?number, // In km or miles depending on account settings (distance_unit)
status: TransferStatus,
from: CityPoint,
to: ?CityPoint,
date_to_local: DateTime,
date_return_local: ?DateTime,
flight_number: ?string,
flight_number_return: ?string,
transport_type_ids: TransportTypeId[],
pax: number, // Total number of passengers (adults + child seats)
book_now: ?TransportTypeId,
time: ?integer, // estimated time in minutes
name_sign: ?string,
comment: ?string,
child_seats_infant: number,
child_seats_convertible: number,
child_seats_booster: number,
promo_code: ?string,
passenger_offered_price: ?string,
price: ?Money,
paid_sum: Money,
remains_to_pay: ?Money,
paid_percentage: number,
watertaxi: boolean,
book_now_offers: { ?BookNowOffer },
// Number of active offers for this transfer
offers_count: number,
// Number of carriers relevant to this transfer
relevant_carriers_count: number,
offers_updated_at: ?DateTime,
date_refund: DateTime, // In UTC
paypal_only: ?boolean,
carrier_main_phone: ?string,
pending_payment_id: ?number,
analytics_sent: boolean,
rub_price: ?number,
usd_price: ?number,
refunded_price: ?Money,
refunded_date: ?DateTime
campaign: ?string,
editable_fields: string[], // fields that can be updated in current transfer
airline_card: ?string,
airline_card_surname: ?string,
partner_passenger: ?PartnerPassenger,
payment_percentages: number[], // deprecated
cancelable: boolean, // for passenger and partner as passenger
refundable: boolean, // for partner as passenger
type: TransferType
};
type AccountFoundBy = {
id?: number,
email?: string,
phone?: string
}
type Response = {
result: "success",
data: {
transfer: Transfer,
account_found_by: AccountFoundBy?
}
};

After the transfer is created, the user will receive an email containing a link to the created account. In it the user can choose the offer of the carrier and make an order.

Displaying prices

In addition, the affiliate can show preliminary prices at the initial stage.

Request example

GET /api/route_info?points[]=%2850.4501%2C30.523400000000038%29&points[]=%2850.4501%2C30.523400000000038%29&with_prices=true&return_way=false&date_to=2018-01-12+13%3A00%3A00

Request parameters

type Params = {
points: Point[],
with_prices: boolean,
return_way: boolean // true if roundtrip
date_to: DateTime
}

Response example

TransportTypePrice = {
min_float: number, // I.e. 43.4323421
min: string, // formatted, in passenger's currency
max: string,
book_now?: string // Price to book now
}
type Response = {
result: "success",
// Key is transport type id
data: {
success: boolean, //is route available?
distance?: Int, //if known - distance for one way travel, km
duration?: Int, //if known - expected one way travel time, min
prices?: { [string]: TransportTypePrice }, // if `with_prices` and `success` is tru
e
watertaxi: boolean,
DirectionsResultsObject? //if route available - https://developers.google.co
m/maps/documentation/javascript/directions#DirectionsResults
date_to_ok: ?boolean //is date_to has passed minimum datetime, null if no `
points[0]`
hints_to_comments: string[]
}
}

Was this article helpful?

Have more questions? Submit a request