Countries

Retrieve Country

get

Retrieve a specific Country by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200

Country retrieved successfully

application/json
get
GET /api/v1/countries/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": 1,
  "name": "Türkiye",
  "code": "TR",
  "is_active": true,
  "created_date": "2021-07-07T14:00:00Z",
  "modified_date": "2021-07-07T14:00:00Z",
  "translations": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

Update Country

put

Update a specific Country by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Body
idintegerRead-onlyOptional

Country ID

namestringRequired

Country Name

Example: Türkiye
codestringRequired

Country Code

Example: TR
is_activebooleanOptional

Is Active (true/false)

Example: true
created_datestring · date-timeRead-onlyOptional

Created Date

Example: 2021-07-07T14:00:00Z
modified_datestring · date-timeRead-onlyOptional

Modified Date

Example: 2021-07-07T14:00:00Z
Responses
200

Country updated

No content

put
PUT /api/v1/countries/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "name": "Türkiye",
  "code": "TR",
  "is_active": true
}

No content

Delete Country

delete

Delete a specific Country by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
204

Country deleted successfully

No content

delete
DELETE /api/v1/countries/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Partial Update Country

patch

Partial update a specific Country by ID

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Body
idintegerRead-onlyOptional

Country ID

namestringRequired

Country Name

Example: Türkiye
codestringRequired

Country Code

Example: TR
is_activebooleanOptional

Is Active (true/false)

Example: true
created_datestring · date-timeRead-onlyOptional

Created Date

Example: 2021-07-07T14:00:00Z
modified_datestring · date-timeRead-onlyOptional

Modified Date

Example: 2021-07-07T14:00:00Z
Responses
200

Country updated

No content

patch
PATCH /api/v1/countries/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "name": "Türkiye",
  "code": "TR",
  "is_active": true
}

No content

Retrieve Country with details

get

Retrieve a specific Country by ID with details

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200

Country retrieved successfully with details

application/json
get
GET /api/v1/countries/{id}/detailed/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": 1,
  "name": "Türkiye",
  "code": "TR",
  "is_active": true,
  "created_date": "2021-07-07T14:00:00Z",
  "modified_date": "2021-07-07T14:00:00Z",
  "translations": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

List Countries

get

List Countries

Authorizations
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
name__exactstringOptional

Filters by exact name

code__exactstringOptional

Filters by exact code

mapping__integration_typestring · enumOptional

Filter by integration mapping object's integration type

Possible values:
mapping__code__exactstringOptional

Filter by integration mapping object's code

hyperbooleanOptional

Activate id to hyperlink the response data.

Responses
200

OK

application/json
get
GET /api/v1/countries/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "count": 0,
  "next": "text",
  "previous": "text",
  "results": [
    {
      "id": 1,
      "name": "Türkiye",
      "code": "TR",
      "is_active": true,
      "created_date": "2021-07-07T14:00:00Z",
      "modified_date": "2021-07-07T14:00:00Z",
      "translations": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ]
}

Create Country

post

Create Country

Authorizations
Body
idintegerRead-onlyOptional

Country ID

namestringRequired

Country Name

Example: Türkiye
codestringRequired

Country Code

Example: TR
is_activebooleanOptional

Is Active (true/false)

Example: true
created_datestring · date-timeRead-onlyOptional

Created Date

Example: 2021-07-07T14:00:00Z
modified_datestring · date-timeRead-onlyOptional

Modified Date

Example: 2021-07-07T14:00:00Z
Responses
201

Country Created

application/json
post
POST /api/v1/countries/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "name": "Türkiye",
  "code": "TR",
  "is_active": true
}
{
  "id": 1,
  "name": "Türkiye",
  "code": "TR",
  "is_active": true,
  "created_date": "2021-07-07T14:00:00Z",
  "modified_date": "2021-07-07T14:00:00Z",
  "translations": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

List Countries with details

get

List Countries with details

Authorizations
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
name__exactstringOptional

Filters by exact name

code__exactstringOptional

Filters by exact code

mapping__integration_typestring · enumOptional

Filter by integration mapping object's integration type

Possible values:
mapping__code__exactstringOptional

Filter by integration mapping object's code

hyperbooleanOptional

Activate id to hyperlink the response data.

Responses
200

OK

application/json
get
GET /api/v1/countries/detailed/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "count": 0,
  "next": "text",
  "previous": "text",
  "results": [
    {
      "id": 1,
      "name": "Türkiye",
      "code": "TR",
      "is_active": true,
      "created_date": "2021-07-07T14:00:00Z",
      "modified_date": "2021-07-07T14:00:00Z",
      "translations": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ]
}

Was this helpful?