The Country object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: HH:mm:ss
{
"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"
} /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
The identifier of the country to retrieve.
Returns
Returns the country object if a valid identifier was provided.
curl https://api.overplane.dev/api/core/country/country_abc123 \
-H "Authorization: Bearer sk_test_..." {
"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"
} /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
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of country objects.
curl https://api.overplane.dev/api/core/country \
-H "Authorization: Bearer sk_test_..." {
"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
} /api/core/country Create a country
Creates a new country object.
Body parameters
Default: HH:mm:ss
Returns
Returns the newly created country object if the call succeeded.
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"}' {
"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"
} /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
The identifier of the country to update.
Body parameters
Default: HH:mm:ss
Returns
Returns the updated country object.
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"}' {
"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"
} /api/core/country/{id} Delete a country
Permanently deletes a country. This cannot be undone.
Path parameters
The identifier of the country to delete.
Returns
Returns a confirmation that the country has been deleted.
curl https://api.overplane.dev/api/core/country/country_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "country_abc123",
"deleted": true
}