Specifications


Request headers

The headers that can be sent in the request are as follows:

Authorization

Type: Required

All functions require authorization under the HTTP/1.1 standard. Using the authorization scheme Basic.

The Authorization header has the following format:

Authorization = auth-scheme credentials

auth-scheme = "Basic"

credentials = ‹user-password coded in base64›

user-password = user ":" password

user = ‹any text that does not include ":"›

Accept

Type: Optional

This header specifies the format in which the response is received. If you do not specify a value for this header will use the default format json.

Supported formats are: text/xml, application/xml, text/json y application/json.

Content-Type

Type: Required

This header specifies the format in which the message body is sent.

Supported formats are: text/xml, application/xml, text/json y application/json.

Date Formats

The supported format for date and time elements is ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601).

Dates are specified as YYYY-MM-DD.

Date and time is specified as YYYY-MM-DDThh:mm.

Where:

Language format

We use the IETF language tag (http://en.wikipedia.org/wiki/IETF_language_tag). For example: en for English, en-US for United States English, es for Spanish, es-MX for Mexican Spanish.

Currency format

The currency format is the standard ISO 4217 (http://es.wikipedia.org/wiki/ISO_4217), it uses three letter codes. For example: USD for US dollars, MXN for Mexican pesos and GBP for Great Britain pounds.

Country code format

The country code format is ISO 3166-1, Alpha-2 (http://es.wikipedia.org/wiki/ISO_3166-1). It uses two letter codes. For example: US for United States, MX for Mexico and GB for Great Britain.

Tests

For the test environment the URI must be preceded by the stage prefix.

For example the URI:

https://api.pricetravel.com/

Must be changed to:

https://test-api.pricetravel.com.mx/