Countries

Countries, with the number formatting NolaPro uses for each. The formatting columns are worth reading if you display amounts - they explain why a total renders differently per country.

The object#

FieldTypeDescription
countries_idread-onlyintegerIdentifier.
countries_namestring(64)Country name.
countries_iso_code_2string(2)ISO 3166-1 alpha-2.
countries_iso_code_3string(3)ISO 3166-1 alpha-3.
calling_codestring(3)International dialling prefix.
decimalplacesintegerDecimal places used when displaying money.
decimalsymbolstring(6)Decimal separator.
thousandssymbolstring(6)Thousands separator.
currency_symbolstring(6)Currency symbol shown for amounts in this country’s currency.
symbolafterstring(6)Symbol goes after the amount when set.

Endpoints#

GET/countries 200403

List countries.

Requires scope reference:read.

Parameters
NameInTypeNotes
includequerystringComma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions.
When it fails
StatusCodeMeaning
403insufficient_scopeToken lacks countries:read.
curl \
  'https://acme.nolapro.com/!/api/v2/countries' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/countries/{id} 200404

Retrieve one record.

Requires scope reference:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
includequerystringComma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl \
  'https://acme.nolapro.com/!/api/v2/countries/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "countries_id": 223,
    "countries_name": "United States",
    "countries_iso_code_2": "US",
    "countries_iso_code_3": "USA",
    "calling_code": "1",
    "decimalplaces": 2,
    "decimalsymbol": ".",
    "thousandssymbol": ",",
    "currency_symbol": "$",
    "symbolafter": ""
}