Countries
#
GET CountriesGets all countries.
GET ALL | |
---|---|
Method | GET ALL |
URL or EndPoint | /api/v{version}/countries |
Headers | Authorization or X-API-Key |
Parameters | projectId, version |
Body | Not Applicable |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
v{version} | Yes | string | v1 | Shows the version of API |
{projectId} | Yes | string($uuid) | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
The description of the parameters is as follows:
Parameter Name | Mandatory | Type | Example | Description |
---|---|---|---|---|
version | Yes | string | 1 | The api version |
Search | No | string($uuid) | "string" | Search criteria |
PageIndex | No | string($uuid) | "string" | Enter page index |
PageSize | No | string($uuid) | "string" | Enter number of entities per page |
#
Request BodyThe request does not have a request body.
#
ResponsesIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in json format by the service.
{ "success": true, "errors": [ "string" ], "messages": [ "string" ], "result": [ { "name": "string", "code": "string" } ], "resultInfo": { "totalCount": 0, "pageIndex": 0, "pageSize": 0, "totalPages": 0, "hasNextPage": true, "hasPreviousPage": true }}
Field Name | Type | Example | Description |
---|---|---|---|
success | bool | true | If response is success will return true otherwise will get false |
errors | string | "string" | Indicate if there was an error |
messages | string | "string" | Returns the response message from back-end |
result | array [object] | Returns an distribution object | |
name | string | "string" | Returns name of the countrie |
code | string | "string" | Returns the code of the countrie |
resultInfo | object | Returs information about distribution | |
totalCount | integer($int32) | 0 | Total number of objects in database |
pageIndex | integer($int32) | 0 | Returns Current pageop paganed data |
pageSize | integer($int32) | 0 | Returns Objects per page |
totalPages | integer($int32) | 0 | Returns Total pages |
hasNextPage | bool | true | Returns true if it has a next page, otherwise returns false |
hasPreviousPage | bool | true | Returns true if it has a previous page, otherwise returns false |
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code: 401 Unauthorized
- HTTP Status Code: 403 Forbidden
- HTTP Status Code: 404 Not found