Docs

Every address, option, answer and error, with code examples and common questions.

Basics

  • Address: https://api.dondoo.com. Every path starts with /v1/; calls use GET (or HEAD) and HTTPS only.
  • Key: send it in the X-API-Key header (see Authentication). Only the free sample and /v1/health work without one.
  • Formats: JSON by default, XML with format=xml, a ready-to-send PDF with format=pdf.
  • Changes: if we ever need to change something that could affect your integration, we tell you well in advance, and your current version keeps working until you have moved over. New fields may appear in the answers, so read the fields you need and ignore the others.

The whole API in one file

openapi.yaml describes every address, option and answer in OpenAPI, the standard format for describing an API. Import it into Postman, Insomnia or a code generator, and you can try every address or create a client for your language in a few clicks. It is the same description this page is made from.

Download openapi.yaml

GET /v1/donts

Don'ts for one destination

Send the destination with the parameter for its code type, so it is always clear which code you mean: iata=DXB, icao=OMDB, iso2=AE, iso3=ARE or isonum=784. Codes are not case-sensitive and stray spaces are ignored.

Send one destination per call. If you send more than one, the first in this order is used and the others are named in warnings: iata → icao → iso2 → iso3 → isonum.

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

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.

country_info querystring · one of yes, no · default yes

PDF only. no leaves out the "Good to know" box (capital, currency, languages, calling code, driving side, plugs), for example when your own page already shows them. Default yes. JSON and XML accept and ignore it.

lang querystring

The language of the answer, as a standard language code: de, fr, es, pt-BR, zh-Hans and so on. Close variants find the language: de-DE and de-AT give de, pt-PT gives pt-BR, zh-TW gives zh-Hant. English (en) is the default and is always available. Which language you get: the one you ask for, if it is available; otherwise your account's default language, if one is set and available; otherwise English. A language that is not available is never an error: the answer comes in English (or your default language) with the warning lang_not_available. Every don't that is not translated yet comes in English, marked with "language": "en" (warning partly_in_english), so your integration never breaks while languages grow. Country, region and currency names follow the language; airport names always stay official. The ranking is the same in every language. The PDF comes in the same language: its fixed texts, names and don'ts (English for a don't not translated yet); a language whose PDF is not prepared yet gives an English PDF, never a mixed one.

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.

from_iata from_icao from_iso2 from_iso3 from_isonum querystring

Origin (optional): where the traveller comes from, with the same code types as the destination. Accepted on every call and echoed in origin; an unknown origin never makes the call fail, it only gives a warning. For now it does not change the list.

Example: ZRH

The answer

For iata=DXB&limit=2. The XML has the same content; with format=pdf the answer is the PDF itself (application/pdf).

{
  "place": {
    "name": "[DXB] Dubai - Airport, United Arab Emirates",
    "type": "airport",
    "country": "United Arab Emirates (UAE)"
  },
  "language": "en",
  "input": {
    "parameter": "iata",
    "value": "DXB"
  },
  "method": {
    "name": "AlphaAPI",
    "version": "1.0"
  },
  "data_version": "1009",
  "total_count": 23,
  "page": 1,
  "limit": 2,
  "total_pages": 12,
  "warnings": [],
  "donts": [
    {
      "rank": 1,
      "kind": "dont",
      "text": "Don't refuse a gift, and be careful when praising your host's watch or other things - a generous host may insist on giving it to you.",
      "locality": "United Arab Emirates (UAE)",
      "illustrations": {
        "no": "https://api.dondoo.com/pictures/3f9a0c5e1b2d4f6a8c7e9b0d1f2a3c4e.png",
        "yes": "https://api.dondoo.com/pictures/c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8.png"
      }
    },
    {
      "rank": 2,
      "kind": "dont",
      "text": "Don't be surprised when men greet each other with a light handshake, cheek kisses or a touch of noses - a right hand on your heart after shaking hands shows great respect.",
      "locality": "United Arab Emirates (UAE)",
      "illustrations": {
        "yes": "https://api.dondoo.com/pictures/8b1e2d3c4f5a6b7c8d9e0f1a2b3c4d5e.png"
      }
    }
  ]
}

Optional fields: input, method and data_version are included by default; origin and references only when the call sent them. Each can be switched off globally or per customer by settings, and compact=yes leaves them all out for one call.

FieldTypeMeaning
placeobject

The destination you asked for, with its name and type (airport or country).

languagestring

The language of the answer (see lang). Always included, also with compact=yes. Don'ts that are not translated yet carry their own "language": "en".

inputobject

Which code was used (optional).

originobject or null

Origin echo (optional). applied says whether the origin logic was used or the origin was only recorded.

methodobject

Ranking method and version (optional).

data_versionstring

The data version: a release number that goes up with every data update, for example 1009 (optional).

referencesobject

Your reference fields, echoed back (optional).

total_countinteger

All don'ts for this request, across all pages. The notice entry is not counted.

pageinteger

This page (see page).

limitinteger

Don'ts per page (see limit).

total_pagesinteger

How many pages there are with this limit.

warningsarray

Notes about the call; the call still worked. Each has a code and a message: codes_ignored (more than one destination code was sent), parameters_ignored (unknown options), limit_capped (limit above 100), lang_not_available (the language asked for is not available: the answer is in English or your default language), partly_in_english (some don'ts on this page are not translated yet and come in English), origin_not_recognised and origin_not_applied (about the origin), no_donts_yet (the place has no don'ts yet).

dontsarray

The don'ts, best first.

donts[].rankinteger

Position, starting at 1. Not present on a notice entry.

donts[].kindstring

dont for a normal entry. notice for the single entry returned when the origin logic leaves nothing, for example "No extra don'ts are needed for this trip.".

donts[].textstring

The don't itself, in the answer's language when translated.

donts[].languagestring

Only on a don't that is not translated yet into the answer's language. It is always en: the text is in English.

donts[].localitystring

The place the don't applies to, for example "Japan", named in the answer's language where that name differs.

donts[].illustrationsobject

Picture links, labelled by the field they are stored in. A don't may have only one. Left out with pictures=no.

Responses

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 for a free Explorer key outside the sample places, place_not_included for a trial or an account limited to agreed places, or paused_for_check when new destinations are paused for a short routine check; the destinations already in use keep working).

404

The code is not known (not_found), 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: your allowance is used up, or, on a plan that continues above its allowance, its upper stop (150%) is reached.

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}

Shortcut for an airport

A shortcut with the code in the address: /v1/airports/DXB is the same as /v1/donts?iata=DXB. Three characters are read as IATA (DXB), four as ICAO (OMDB), so the two can never be mixed up.

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

Parameters

NameInTypeDescription
code required pathstring

Example: DXB

Options: the same as GET /v1/donts.

Responses

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 for a free Explorer key outside the sample places, place_not_included for a trial or an account limited to agreed places, or paused_for_check when new destinations are paused for a short routine check; the destinations already in use keep working).

404

The code is not known (not_found), 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: your allowance is used up, or, on a plan that continues above its allowance, its upper stop (150%) is reached.

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}

Shortcut for a country

A shortcut with the code in the address: /v1/countries/AE is the same as /v1/donts?iso2=AE. Two letters are read as ISO alpha-2 (AE), three letters as alpha-3 (ARE) and digits as numeric (784), so the three can never be mixed up.

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

Parameters

NameInTypeDescription
code required pathstring

Example: AE

Options: the same as GET /v1/donts.

Responses

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 for a free Explorer key outside the sample places, place_not_included for a trial or an account limited to agreed places, or paused_for_check when new destinations are paused for a short routine check; the destinations already in use keep working).

404

The code is not known (not_found), 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: your allowance is used up, or, on a plan that continues above its allowance, its upper stop (150%) is reached.

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.

Options: the same as GET /v1/donts.

Responses

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 place is not one of the free sample places (sample_place_only).

404

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

429

The free sample's daily limit for your address is reached (limit_reached). Sign up for a free Explorer key to continue.

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.

Responses

StatusMeaning
200

The API is running.

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 XYZ was not found.", "hint": "Check the code; try an airport code such as LHR, or a country code.", "contact": "api@dondoo.com" } }

With format=xml, errors come as XML too: <error_response><error><code>…, with the same fields.

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 place_not_included paused_for_check not_found unknown_address too_fast limit_reached internal_error unavailable pdf_unavailable

Which status goes with which code is listed under "Responses" for each address above. A failure on our side (status 5xx) never counts against your allowance.

Status

Is it us or you? Open the Status page: it asks the API live and shows any notice from us, for example planned maintenance.

For your own monitoring, call GET /v1/health. It needs no key and is not counted. It answers {"status": "ok"} with the data version and, when there is one, our notice.

Code examples

The same call in curl, JavaScript, Python, PHP, Java and C#. Replace the key with yours and keep it on your server.

curl --max-time 5 "https://api.dondoo.com/v1/donts?iata=DXB&limit=5" \
  -H "X-API-Key: $DONDOO_KEY"

# The PDF, ready to attach to an email:
curl --max-time 15 "https://api.dondoo.com/v1/donts?iata=DXB&format=pdf" \
  -H "X-API-Key: $DONDOO_KEY" -o DXB-travel-donts.pdf

Send it with your booking confirmation

When you send a booking confirmation, fetch the PDF for the destination and attach it. If the PDF is not ready in time (about 5 seconds), send the email without it; nothing else depends on it.

# Fetch the PDF for a booking confirmation; give up after 5 seconds.
if curl --fail --silent --max-time 5 "https://api.dondoo.com/v1/donts?iata=DXB&format=pdf" \
     -H "X-API-Key: $DONDOO_KEY" -o "Your travel tips for Dubai.pdf"; then
  echo "Attach the PDF to the email"
else
  echo "Send the email without the PDF"
fi

Good to know

  • Send the key in the X-API-Key header, never in the address.
  • Use a short timeout (about 5 seconds for JSON and XML, up to 15 for a PDF, as in the examples) and carry on if the call fails.
  • A 429 answer is either too_fast (wait the seconds in Retry-After) or limit_reached (your allowance is used up).
  • Every successful answer has an X-Data-Version header: it tells you which data version it came from.

Frequently asked questions

Which codes can I send?

Airport codes (IATA like DXB, ICAO like OMDB) and country codes (ISO, like AE, ARE or 784), each with its own parameter, for example iata=DXB, so it is always clear which code you send. See the parameters of GET /v1/donts.

Does every don't have its own illustration?

Yes. Every don't has its own illustration, carefully designed for exactly that situation and checked by hand by our team.

Can I trust the content?

Yes. Every don't is verified: our team checks it against reliable local sources before it goes live, written to inform, never to judge or offend. Each has its own illustration in the style Dondoo developed by hand over years, checked by hand too. Dondoo is fully independent and neutral, not sponsored by any government or organisation. No ads and no sponsored tips: only what matters for the destination.

How fresh is the content?

Our team looks after the don'ts all the time: we add new ones, update existing ones and retire what no longer applies, and we draw new illustrations for them. Every answer tells you which data version it comes from.

Can I approve content changes before my travellers see them?

Updates reach every customer at the same time, and every answer tells you its data version. If you need more control, a Tailor-made plan can include a sign-off: we show you each update first and switch it on for you only after your OK. We can also agree your own illustrations or wording. Request an offer.

Can I keep a copy of the content?

Show the answers to your travellers when they need them, and ask again next time: the content changes often, so a fresh answer is always the best one. Copying the collection, in whole or in part, is not allowed (see Terms & Privacy).

A traveller is flying home. Do they still need the don'ts?

Usually not, as the don'ts are written for visitors. The API answers for the destination you ask for and does not know who is travelling. Airlines and sellers of return trips can add an optional check on their side: if the traveller lives in or is a citizen of the destination country, or the flight is the return leg of a round trip, you may skip the don'ts for that booking. It's your choice; the API only needs the destination code.

Can I use it in a web page or app?

Yes, through your own server. Keep your key on the server, never in the page or the app.

How long does a PDF take?

Usually under a second; the first one after a quiet time may take a few seconds.

Can I leave the country facts out of the PDF?

Yes. By default the PDF starts with a short "Good to know" box: capital, currency, languages, calling code, driving side and plugs. If your own page or email already shows these, add country_info=no and the PDF goes straight to the don'ts. See the parameters of GET /v1/donts.

Can it handle a lot of traffic?

Yes. The API is built for speed and runs on Amazon Web Services (AWS), which adds capacity automatically as your traffic grows, so a busy day or a big campaign is no problem. Each plan has a calls-per-second limit (see Pricing). Expecting very high volumes? Tell us, and we set up a Tailor-made plan with the limits you need.

Where does the API run?

On Amazon Web Services (AWS) in Europe (primarily Frankfurt, Germany), behind Amazon CloudFront with a firewall against abuse. It grows with your traffic by itself, and on request we also serve it from other AWS regions, closer to you and your travellers.

How do you handle data?

A call needs only a destination, an airport or a country code, so no personal data of your travellers reaches us; for a language, we receive only its code. Your own references, such as a booking number, must not contain personal data, and we erase them after 90 days. We keep call records for 13 months, for your usage and invoices. Your keys are shown to you once: we store only a secured fingerprint, never the key itself. Sign-in runs on Amazon Cognito and payments on Stripe, one of the world's leading payment platforms, so we never see your password or card details.

What counts as a call?

Only successful answers. Calls that are refused (no key or a wrong key, too fast, allowance used up), calls with a mistake in them (an unknown code or option) and anything that fails on our side are not counted. A PDF counts as 5 calls. Your usage is on My account.

What happens when I reach my allowance?

You get an email at 80% and 100%. Explorer pauses until the 1st of next month. Globetrotter keeps answering up to 150%, so your service never stops by surprise; extra calls above 100% cost USD 10 per 1,000 and are only billed after we have reviewed them with you. See Pricing.

Can the PDF carry my branding?

Yes. On Globetrotter, upload your logo in My account under Your branding. It appears at the top of the first page and on every page after it, next to "In partnership with dondoo.com", on a clean background chosen to suit it. There you can also use your own words in the PDF's file name, for example DXB-Before-you-fly.pdf. On Tailor-made there is no limit: we shape the PDF exactly to your needs, for example the title on page 1 ("Before you land in …" for airlines), a second logo for a sponsor, or your own wording. Tell us what you need.

Which languages?

All languages. Answers are in English unless you ask for another language with lang, for example lang=de, or your account has another default language. If you ask for a language that isn't set up for your account, you get the answer in your default language (English unless you've chosen another), with no error. See the parameters of GET /v1/donts. On a Tailor-made plan, we deliver the don'ts in your travellers' language: just tell us which languages you need.

Can I try it without signing up?

Yes: Try it answers for a few sample places, no key needed.

Something isn't working. What can I do?

We're here to help. Often the answer itself already says what went wrong and how to fix it, for example an unknown code or calls sent a little too quickly. The Status page shows whether the API is running normally. If it still doesn't work, just write to us at api@dondoo.com with the time, the address you called, the error code and the first characters of your key (never the whole key), and we'll sort it out together.

How do I manage my keys, plan and invoices?

All in one place: My account. Under Your keys, you can make a new key, or switch one off or replace it, for example if it was lost or someone else has it. Under Plan and billing, you can change or cancel your plan and download your invoices. If your plan is billed by invoice, just write to us and we'll take care of it.

How can I reach you?

Write to api@dondoo.com with any question, idea or partnership. For a plan built around your business, request an offer.