Countries API

List countries

GET /country
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
order_by optional string Sorting
limit optional integer Limit
offset optional integer Offset
callback optional string Javascript callback

The following sort parameters may be applied:

  • id
  • name
  • name_short

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 212
Content-Type: application/json
[
  {
    "id": 1,
    "name": "Schweiz",
    "name_short": "CH",
    "iso_3166_alpha2": null
  },
  {
    "id": 2,
    "name": "Deutschland",
    "name_short": "D",
    "iso_3166_alpha2": null
  },
  {
    "id": 3,
    "name": "Österreich",
    "name_short": "A",
    "iso_3166_alpha2": null
  }
]

Search countries

POST /country/search
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
[
  {
    "field": "name",
    "value": "China"
  }
]
Name Required Type Description
order_by optional string Sorting
limit optional integer Limit
offset optional integer Offset
callback optional string Javascript callback

The following sort parameters may be applied:

  • id
  • name
  • name_short
Name Required Type Description
name optional string
name_short optional string

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 66
Content-Type: application/json
[
  {
    "id": 6,
    "name": "China",
    "name_short": "CN",
    "iso_3166_alpha2": null
  }
]

Show country

GET /country/37
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 68
Content-Type: application/json
{
  "id": 37,
  "name": "Kiribati",
  "name_short": "KI",
  "iso_3166_alpha2": "KI"
}

Create country

POST /country
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "name": "Kiribati",
  "iso3166_alpha2": "KI",
  "name_short": "KI"
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
iso3166_alpha2 required undefined
name required string (80)
name_short required string (4)

The following scopes are needed:

  • general
Status: 201 Created
X-Authenticated-User: apiextract_1
Content-Length: 68
Content-Type: application/json
{
  "id": 37,
  "name": "Kiribati",
  "name_short": "KI",
  "iso_3166_alpha2": "KI"
}

Overwrite country

PUT /country/37
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "name": "Kiribati",
  "iso3166_alpha2": "KI",
  "name_short": "KI"
}
Name Required Type Description
callback optional string
Name Required Type Description
iso3166_alpha2 required undefined
name required string (80)
name_short required string (4)

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 68
Content-Type: application/json
{
  "id": 37,
  "name": "Kiribati",
  "name_short": "KI",
  "iso_3166_alpha2": "KI"
}

Edit country

POST /country/37
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "name_short": "Kiri"
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
iso3166_alpha2 optional undefined
name optional string (80)
name_short optional string (4)

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 70
Content-Type: application/json
{
  "id": 37,
  "name": "Kiribati",
  "name_short": "Kiri",
  "iso_3166_alpha2": "KI"
}

Delete country

DELETE /country/37
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 16
Content-Type: application/json
{
  "success": true
}