The Country object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

country_name string required
code string required
date_format string
time_format string

Default: HH:mm:ss

time_zones string
The Country object
{
  "id": "country_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "country_name": "country_name_example",
  "code": "code_example",
  "date_format": "2024-01-15",
  "time_format": "HH:mm:ss",
  "time_zones": "time_zones_example"
}
GET /api/core/country/{id}

Retrieve a country

Retrieves the details of an existing country. Supply the unique country ID that was returned from a previous request.

Path parameters

id string required

The identifier of the country to retrieve.

Returns

Returns the country object if a valid identifier was provided.

GET /api/core/country/{id}
curl https://api.overplane.dev/api/core/country/country_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "country_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "country_name": "country_name_example",
  "code": "code_example",
  "date_format": "2024-01-15",
  "time_format": "HH:mm:ss",
  "time_zones": "time_zones_example"
}
GET /api/core/country

List all countrys

Returns a list of countrys. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of country objects.

GET /api/core/country
curl https://api.overplane.dev/api/core/country \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "country_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "country_name": "country_name_example",
      "code": "code_example",
      "date_format": "2024-01-15",
      "time_format": "HH:mm:ss",
      "time_zones": "time_zones_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/core/country

Create a country

Creates a new country object.

Body parameters

country_name string required
code string required
date_format string
time_format string

Default: HH:mm:ss

time_zones string

Returns

Returns the newly created country object if the call succeeded.

POST /api/core/country
curl https://api.overplane.dev/api/core/country \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"country_name":"country_name_example","code":"code_example"}'
Response
{
  "id": "country_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "country_name": "country_name_example",
  "code": "code_example",
  "date_format": "2024-01-15",
  "time_format": "HH:mm:ss",
  "time_zones": "time_zones_example"
}
PATCH /api/core/country/{id}

Update a country

Updates the specified country by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the country to update.

Body parameters

country_name string
code string
date_format string
time_format string

Default: HH:mm:ss

time_zones string

Returns

Returns the updated country object.

PATCH /api/core/country/{id}
curl https://api.overplane.dev/api/core/country/country_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"country_name":"country_name_example","code":"code_example"}'
Response
{
  "id": "country_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "country_name": "country_name_example",
  "code": "code_example",
  "date_format": "2024-01-15",
  "time_format": "HH:mm:ss",
  "time_zones": "time_zones_example"
}
DELETE /api/core/country/{id}

Delete a country

Permanently deletes a country. This cannot be undone.

Path parameters

id string required

The identifier of the country to delete.

Returns

Returns a confirmation that the country has been deleted.

DELETE /api/core/country/{id}
curl https://api.overplane.dev/api/core/country/country_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "country_abc123",
  "deleted": true
}