Reference

Every address, option, answer and error, generated from the API contract.

GET /v1/donts

Don'ts for one destination

Send exactly one destination code. If several are sent, the first in this order is used: iata → icao → iso2 → iso3 → isonum; the others are listed in warnings. Codes are not case-sensitive and stray spaces are ignored.

Needs your key in the X-API-Key header.

Parameters

NameInTypeDescription
iata querystring

IATA airport code (3 letters). Whole-city codes such as LON work when the data contains them.

Example: DXB

icao querystring

ICAO airport code (4 letters).

Example: OMDB

iso2 querystring

ISO 3166-1 alpha-2 country code.

Example: AE

iso3 querystring

ISO 3166-1 alpha-3 country code.

Example: ARE

isonum querystring

ISO 3166-1 numeric country code. Leading zeros are optional (28 = 028).

Example: 784

from_iata querystring

Origin: where the traveller comes from. Accepted and recorded now; used to skip don'ts the traveller already knows from home once the origin logic is active. An unknown origin never makes the call fail; it gives a warning.

Example: ZRH

from_icao querystring

Origin as ICAO airport code. See from_iata.

from_iso2 querystring

Origin as ISO alpha-2 country code. See from_iata.

from_iso3 querystring

Origin as ISO alpha-3 country code. See from_iata.

from_isonum querystring

Origin as ISO numeric country code. See from_iata.

limit queryinteger · default 100

How many don'ts per page, best first (1 to 100, default 100). limit=10 gives the top 10. Values above 100 are treated as 100 and noted in warnings.

Example: 10

page queryinteger · default 1

Which page, starting at 1. Ranks continue across pages (page 2 with limit=10 starts at rank 11).

pictures querystring · one of yes, no · default yes

Include picture links (yes, default) or leave them out (no). The PDF always has pictures.

format querystring · one of json, xml, pdf · default json

Answer format. All formats come from the same ranked answer. A PDF counts as several calls.

compact querystring · one of yes, no · default no

yes leaves out all optional fields (input, origin, method, data_version, references) and returns only the place, the counts, the warnings and the don'ts. Default no.

lang querystring · default en

Language. Only en for now; any other value is answered in English with a warning.

ref1 querystring · up to 100 characters

Your own reference, for example a booking number (up to 100 characters), echoed back and logged if your plan stores it. Never put personal data here (names, emails, passport numbers).

ref2 querystring · up to 100 characters

Second reference field. See ref1.

ref3 querystring · up to 100 characters

Third reference field. See ref1.

Answers

StatusMeaning
200

The don'ts for the destination, best first.

400

The call is not complete or not valid (missing_destination, invalid_code, invalid_parameter, page_out_of_range).

401

No key, or the key is not valid (missing_key, invalid_key).

402

A new month of the plan started unpaid, so every key of the account is paused (payment_due). Update the payment in My account on the developer portal; the keys work again as soon as the payment arrives.

403

The key is switched off, or the plan does not include this (key_disabled, format_not_in_plan, sample_place_only).

404

The code is not known, or the address does not exist (unknown_address).

429

Two different cases: too_fast: more calls per second than the plan allows; wait the seconds in Retry-After. limit_reached: the allowance is used up (free and small-developer plans), or a plan that continues above it reached its stop.

500

Something went wrong on our side (internal_error). Carry on without the don'ts, for example send the confirmation email without the PDF, and try again later.

503

The API is temporarily unavailable (unavailable), or only the PDF could not be made (pdf_unavailable). Same advice as internal_error; after pdf_unavailable the same call with format=json usually works.

GET /v1/airports/{code}

Don'ts for an airport

code is an IATA code (3 letters, for example NRT) or an ICAO code (4 letters, for example RJAA). Same answer as /v1/donts?iata=… or ?icao=….

Needs your key in the X-API-Key header.

Parameters

NameInTypeDescription
code required pathstring

Example: NRT

from_iata querystring

Origin: where the traveller comes from. Accepted and recorded now; used to skip don'ts the traveller already knows from home once the origin logic is active. An unknown origin never makes the call fail; it gives a warning.

Example: ZRH

from_icao querystring

Origin as ICAO airport code. See from_iata.

from_iso2 querystring

Origin as ISO alpha-2 country code. See from_iata.

from_iso3 querystring

Origin as ISO alpha-3 country code. See from_iata.

from_isonum querystring

Origin as ISO numeric country code. See from_iata.

limit queryinteger · default 100

How many don'ts per page, best first (1 to 100, default 100). limit=10 gives the top 10. Values above 100 are treated as 100 and noted in warnings.

Example: 10

page queryinteger · default 1

Which page, starting at 1. Ranks continue across pages (page 2 with limit=10 starts at rank 11).

pictures querystring · one of yes, no · default yes

Include picture links (yes, default) or leave them out (no). The PDF always has pictures.

format querystring · one of json, xml, pdf · default json

Answer format. All formats come from the same ranked answer. A PDF counts as several calls.

compact querystring · one of yes, no · default no

yes leaves out all optional fields (input, origin, method, data_version, references) and returns only the place, the counts, the warnings and the don'ts. Default no.

lang querystring · default en

Language. Only en for now; any other value is answered in English with a warning.

ref1 querystring · up to 100 characters

Your own reference, for example a booking number (up to 100 characters), echoed back and logged if your plan stores it. Never put personal data here (names, emails, passport numbers).

ref2 querystring · up to 100 characters

Second reference field. See ref1.

ref3 querystring · up to 100 characters

Third reference field. See ref1.

Answers

StatusMeaning
200

The don'ts for the destination, best first.

400

The call is not complete or not valid (missing_destination, invalid_code, invalid_parameter, page_out_of_range).

401

No key, or the key is not valid (missing_key, invalid_key).

402

A new month of the plan started unpaid, so every key of the account is paused (payment_due). Update the payment in My account on the developer portal; the keys work again as soon as the payment arrives.

403

The key is switched off, or the plan does not include this (key_disabled, format_not_in_plan, sample_place_only).

404

The code is not known, or the address does not exist (unknown_address).

429

Two different cases: too_fast: more calls per second than the plan allows; wait the seconds in Retry-After. limit_reached: the allowance is used up (free and small-developer plans), or a plan that continues above it reached its stop.

500

Something went wrong on our side (internal_error). Carry on without the don'ts, for example send the confirmation email without the PDF, and try again later.

503

The API is temporarily unavailable (unavailable), or only the PDF could not be made (pdf_unavailable). Same advice as internal_error; after pdf_unavailable the same call with format=json usually works.

GET /v1/countries/{code}

Don'ts for a country

code is ISO 3166-1 alpha-2 (JP), alpha-3 (JPN) or numeric (392). Three letters are read as alpha-3, three digits as numeric. Same answer as /v1/donts?iso2=… and so on.

Needs your key in the X-API-Key header.

Parameters

NameInTypeDescription
code required pathstring

Example: JP

from_iata querystring

Origin: where the traveller comes from. Accepted and recorded now; used to skip don'ts the traveller already knows from home once the origin logic is active. An unknown origin never makes the call fail; it gives a warning.

Example: ZRH

from_icao querystring

Origin as ICAO airport code. See from_iata.

from_iso2 querystring

Origin as ISO alpha-2 country code. See from_iata.

from_iso3 querystring

Origin as ISO alpha-3 country code. See from_iata.

from_isonum querystring

Origin as ISO numeric country code. See from_iata.

limit queryinteger · default 100

How many don'ts per page, best first (1 to 100, default 100). limit=10 gives the top 10. Values above 100 are treated as 100 and noted in warnings.

Example: 10

page queryinteger · default 1

Which page, starting at 1. Ranks continue across pages (page 2 with limit=10 starts at rank 11).

pictures querystring · one of yes, no · default yes

Include picture links (yes, default) or leave them out (no). The PDF always has pictures.

format querystring · one of json, xml, pdf · default json

Answer format. All formats come from the same ranked answer. A PDF counts as several calls.

compact querystring · one of yes, no · default no

yes leaves out all optional fields (input, origin, method, data_version, references) and returns only the place, the counts, the warnings and the don'ts. Default no.

lang querystring · default en

Language. Only en for now; any other value is answered in English with a warning.

ref1 querystring · up to 100 characters

Your own reference, for example a booking number (up to 100 characters), echoed back and logged if your plan stores it. Never put personal data here (names, emails, passport numbers).

ref2 querystring · up to 100 characters

Second reference field. See ref1.

ref3 querystring · up to 100 characters

Third reference field. See ref1.

Answers

StatusMeaning
200

The don'ts for the destination, best first.

400

The call is not complete or not valid (missing_destination, invalid_code, invalid_parameter, page_out_of_range).

401

No key, or the key is not valid (missing_key, invalid_key).

402

A new month of the plan started unpaid, so every key of the account is paused (payment_due). Update the payment in My account on the developer portal; the keys work again as soon as the payment arrives.

403

The key is switched off, or the plan does not include this (key_disabled, format_not_in_plan, sample_place_only).

404

The code is not known, or the address does not exist (unknown_address).

429

Two different cases: too_fast: more calls per second than the plan allows; wait the seconds in Retry-After. limit_reached: the allowance is used up (free and small-developer plans), or a plan that continues above it reached its stop.

500

Something went wrong on our side (internal_error). Carry on without the don'ts, for example send the confirmation email without the PDF, and try again later.

503

The API is temporarily unavailable (unavailable), or only the PDF could not be made (pdf_unavailable). Same advice as internal_error; after pdf_unavailable the same call with format=json usually works.

GET /v1/sample/donts

Free sample, no key needed

Same options and answer as /v1/donts, but only for the sample places shown on the Try it page and with a small daily limit per visitor address. Includes the PDF. Any other place returns 403 sample_place_only.

No key needed.

Parameters

NameInTypeDescription
iata querystring

IATA airport code (3 letters). Whole-city codes such as LON work when the data contains them.

Example: DXB

icao querystring

ICAO airport code (4 letters).

Example: OMDB

iso2 querystring

ISO 3166-1 alpha-2 country code.

Example: AE

iso3 querystring

ISO 3166-1 alpha-3 country code.

Example: ARE

isonum querystring

ISO 3166-1 numeric country code. Leading zeros are optional (28 = 028).

Example: 784

limit queryinteger · default 100

How many don'ts per page, best first (1 to 100, default 100). limit=10 gives the top 10. Values above 100 are treated as 100 and noted in warnings.

Example: 10

page queryinteger · default 1

Which page, starting at 1. Ranks continue across pages (page 2 with limit=10 starts at rank 11).

pictures querystring · one of yes, no · default yes

Include picture links (yes, default) or leave them out (no). The PDF always has pictures.

format querystring · one of json, xml, pdf · default json

Answer format. All formats come from the same ranked answer. A PDF counts as several calls.

compact querystring · one of yes, no · default no

yes leaves out all optional fields (input, origin, method, data_version, references) and returns only the place, the counts, the warnings and the don'ts. Default no.

Answers

StatusMeaning
200

The don'ts for the destination, best first.

400

The call is not complete or not valid (missing_destination, invalid_code, invalid_parameter, page_out_of_range).

403

The key is switched off, or the plan does not include this (key_disabled, format_not_in_plan, sample_place_only).

404

The code is not known, or the address does not exist (unknown_address).

429

Two different cases: too_fast: more calls per second than the plan allows; wait the seconds in Retry-After. limit_reached: the allowance is used up (free and small-developer plans), or a plan that continues above it reached its stop.

500

Something went wrong on our side (internal_error). Carry on without the don'ts, for example send the confirmation email without the PDF, and try again later.

503

The API is temporarily unavailable (unavailable), or only the PDF could not be made (pdf_unavailable). Same advice as internal_error; after pdf_unavailable the same call with format=json usually works.

GET /v1/health

Is the API running?

No key needed.

Answers

StatusMeaning
200

The API is running.

503

The API is temporarily unavailable (unavailable), or only the PDF could not be made (pdf_unavailable). Same advice as internal_error; after pdf_unavailable the same call with format=json usually works.

Authentication

Your secret key, sent in the X-API-Key header on every call. Keys are for servers only; never put a normal key into a web page or app that users can download. Keys in the address (query string) are not accepted, because addresses end up in logs.

X-API-Key: dk_live_…

Errors

Every error has the same shape, so your program can always read error.code. When a call fails, carry on without the don'ts (for example, send the confirmation email without the PDF) and try again later.

{ "error": { "code": "not_found", "message": "Code XXX was not found.", "hint": "…", "contact": "api@dondoo.com" } }

All codes: missing_destination invalid_code invalid_parameter page_out_of_range missing_key invalid_key key_disabled payment_due format_not_in_plan sample_place_only not_found unknown_address too_fast limit_reached internal_error unavailable pdf_unavailable

Which status goes with which code is listed under "Answers" for each address above.