Region
Create region#
Creates a new region.
Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| externalId | String | Region external id | true |
| name | String | Region name | false |
| divisionId | Integer | Identifier of the division the region belongs to | false |
| active | Boolean | Whether the region is active | false |
| divisionExternalId | String | External id of the division the region belongs to, alternative to divisionId | true |
Response
Returns Region object
Examples
200 OK
Update region#
Updates an existing region by id.
Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| externalId | String | Region external id | true |
| name | String | Region name | false |
| divisionId | Integer | Identifier of the division the region belongs to | true |
| active | Boolean | Whether the region is active | false |
| divisionExternalId | String | External id of the division the region belongs to, alternative to divisionId | true |
Response
Returns Region object
Examples
200 OK
List regions#
Request parameters:
| Request Parameter | Type | Description | Required |
|---|---|---|---|
| ids | List of integers | Filter regions by specified ids (comma-separated) | false |
| nameLike | String | Find regions by name | false |
| shopIds | List of integers | Find regions by shop ids | false |
| divisionIds | List of integers | Find regions by division ids | false |
| businessDirIds | List of integers | Find regions by business direction ids | false |
| active | Boolean | Get only active regions | false |
| fields | List of String (comma-separated) | Additional region fields to include in the response object. Available values: dirs, division, shops. Default: dirs, division | false |
| userId | Integer | Find regions by user Id | false |
| businessDirId | Integer | Find regions by businessDir Id | false |
| shopId | Integer | Find regions by shop Id | false |
| searchString | String | Find regions by name or division name or manager of regions first or last name | false |
| withDirs | Boolean | Deprecated, use fields=dirs instead. Get regions where appointed are manager | false |
Examples
200 OK
Get region by id#
Returns a Region object. Unlike List regions, this endpoint doesn't accept a
fields parameter โ the relations (dirs, division, shops) are never included.Examples
200 OK