top of page

Regions

API endpoint to get information about Region entities ​

Retrieve regions data

GET

Supported Protocol: HTTPS

GET /api/:version_number/:project_name/entity/store/region?:pagination_params

curl -K -H "Authorization: Auth-Token YOUR_PROJECT-API-KEY" https://services.traxretail.com/api/v4/my-project/entity/store/region?sort=region_name&page=1&per_page=10

metadata object 

Info related to pagination

region Object[]

List of regions, each containing the following fields:

region_name string

Region name (Region names that have been configured in coordination with Trax implementation team) 

is_deleted boolean

True/False​

country_name string

The name of the Country as configured in Trax

region_code number

Code of the given region​

The product's container type

Request Details

Mandatory fields marked indicated by

*

{

"metadata": {

"page": 1,

"per_page": 200,

"page_count": 1,

"total_count": 1,

"links": {

"self": "?page=0&per_page=200",

"first": "?page=0&per_page=200",

"previous": "",

"next": "",

"last": ""

}

},

"region": [

{

"region_name": "My region",

"region_code": null,

"is_deleted": false,

"country_name": "United States"

},

{

"region_name": "My district-1",

"region_code": null,

"is_deleted": false,

"country_name": "United States"

}

]

}

Response

Response Details

The Regions GET reply body will contain the following fields:

Validation and Errors

The following are the validations and errors that may appear due to an invalid GET request:

Incorrect or expired token

  • Error Code: 401 - Unauthorized

  • Error: Incorrect or expired token 
     

Requesting a forbidden resource

  • Error Code: 403 - Forbidden

  • Error: A forbidden resource has been requested <resource>

Request Headers

Authorization string

Value: 'Auth-Token {project auth token}'

Authentication token provided by Trax

Query Parameters

version_number string *

The current implemented API version. <Major> version (e.g. 'v4')

 

project_name string *

Project name as provided by Trax

pagination params 

For more info see the pagination page. By default the first page will be returned first

bottom of page