Deals API 1.0 JSON Schema Unofficial

Decision records ·

D-004 What is a country code in countries, which the text writes as "ISO-3166-3"?

Proposal Cited on main and at the tag 1.0-202602.

What we propose

An ISO 3166-1 alpha-3 code, such as USA, as OpenRTB 2.6 writes geo.country, checked against the codes ISO 3166-1 assigns.

As written

Each of a deal's countries is any string, as the row types it, a code a receiver compares by exact equality, with no check that ISO 3166-1 assigns it.

The as-written variant takes the option as-written. Switch the type map to As written to see it.

Options

  • iso-3166-1-alpha-3 Chosen

    An ISO 3166-1 alpha-3 code, such as USA, as OpenRTB 2.6 writes geo.country, checked against the codes ISO 3166-1 assigns.

  • as-written As written

    Any string, as the row types it: the codes ISO 3166-3 names are the four-letter codes of countries that no longer exist, which no current deal can run in, so the row's string type is all that stays.

Why

ISO 3166-3 is the part of the standard that holds the codes of former countries, such as CSHH for Czechoslovakia, so a deal "available" in them can run nowhere. The intent is plainly current countries, and OpenRTB 2.6, whose bid requests the deal's terms are checked against, writes geo.country in ISO 3166-1 alpha-3. The schema departs from the text: it takes ISO 3166-1 alpha-3 codes. As written, the schema takes any string.

What we ask the specification to change

Write "ISO 3166-1 alpha-3" for countries, as OpenRTB 2.6 writes geo.country. ISO 3166-3 holds the codes of countries that no longer exist.

The specification lines it rests on

Each line is quoted as the record pins it. Expand an item to read the quote.

main

  • Object: Terms, the countries row L110 at 3028ddc
    countries | string array | An array of country codes in which the deal is available, where country code is a string using ISO-3166-3. If this is empty or missing, the deal is assumed to apply to all countries.

Tag 1.0-202602

  • Object: Terms, the countries row L110 at 938a5d1
    countries | string array | An array of country codes in which the deal is available, where country code is a string using ISO-3166-3. If this is empty or missing, the deal is assumed to apply to all countries.

What it shapes

main: CountryCode, Terms.countries

Tag 1.0-202602: CountryCode, Terms.countries

The record's YAML file