Skip to main content

Endpoints for State

The State entity refers to the provinces or states that make up a country. Each entity of this type is related to a Country through its unique identifier.

Endpoints

GET/State/getState

Obtains all State entities stored in the system.

Description

This endpoint retrieves a paginated list of the states stored in the system. The pagination parameters can be modified by following the instructions detailed in the next point.

Parameters
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses
JSON
{
"data": [
{
"id": "string",
"name": "string",
"iso": "string",
"country": {
"id": "string",
"description": "string",
"iso": "string"
}
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<export>
<id>string</id>
<name>string</name>
<iso>string</iso>
<country>
<id>string</id>
<description>string</description>
<iso>string</iso>
</country>
</export>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

👉Try it out🌱

Possible Response Errors

ErrorResponse StatusResponse Body
This error occurs when the database name is not registered. It indicates an internal server problem.500{"code": 500,"error": "This dbs name is not register"}
This error indicates that the server rejects the request.400{"code": 400,"error": "Bad Request"}
This error occurs when you are not authorized.401{"code": 401,"error": "Unauthorized."}
This error occurs when the State could not be found.404{"code": 404,"error": "No entity found for Country."}
This error occurs when you try to send too many requests in a short period of time.429{"code": 429,"error": "Too Many Requests"}