locations.php¶
Location management module for handling location data, tags, and history retrieval.
API Methods¶
| Method | Action | Description |
|---|---|---|
add_tag | get add tag | Adds a new tag to a specific location. |
clone | get clone | Clones an existing location configuration. |
delete_tag | get delete tag | Deletes an existing tag. |
get | get location by id or code | Retrieves a specific location's data using its ID or alpha2 country code. |
history | get history | Retrieves the history of changes for locations. |
list | get list of locations | Returns a list of available locations, potentially excluding certain regions for customers. |
list_tags | get list tags | Retrieves a list of all available tags. |
show | get location by ID | Returns detailed information about a specific location, including its tags. |
update_tag | update tag information | Updates the properties of an existing location tag. |
locations/add_tag¶
Adds a new tag to a specific location.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: add_tag |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| tag | ✅ | string | Tag name to be added. |
| value | ❌ | string | Value associated with the tag. |
| extra | ❌ | string | Additional metadata for the tag. |
| location_id | ✅ | integer | ID of the location where the tag will be added. |
| internal | ❌ | boolean | Flag indicating if the tag is internal. |
Request example
locations/clone¶
Clones an existing location configuration.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: clone |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| id | ✅ | integer | ID of the location to be cloned. |
Request example
Success response example
locations/delete_tag¶
Deletes an existing tag.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: delete_tag |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| id | ✅ | integer | The unique identifier of the tag to be deleted. |
| location_id | ✅ | string | The ID or code of the location associated with the tag. |
Request example
locations/get¶
Retrieves a specific location's data using its ID or alpha2 country code.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| id | ❌ | integer | Location ID or alpha2 country code. |
| location | ❌ | string | Alpha2 country code (e.g., US, NL). |
Request example
Success response example
locations/history¶
Retrieves the history of changes for locations.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: history |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| id | ✅ | integer | Location ID to retrieve history for. |
Request example
Success response example
locations/list¶
Returns a list of available locations, potentially excluding certain regions for customers.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
Request example
Success response example
locations/list_tags¶
Retrieves a list of all available tags.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list_tags |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| location_id | ✅ | integer | The ID of the location to retrieve tags for. |
Request example
locations/show¶
Returns detailed information about a specific location, including its tags.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: show |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| params[id] | ✅ | integer | The unique identifier of the location. |
Request example
Success response example
locations/update_tag¶
Updates the properties of an existing location tag.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_tag |
| token | ✅ | string | Authentication token. |
| web_ip | ❌ | string | Client IP address used for authentication validation. |
| params[id] | ✅ | integer | The ID of the tag to update. |
| params[tag] | ✅ | string | The name or text of the tag. |
| params[location_id] | ✅ | string | The ID of the location associated with the tag. |
| params[value] | ❌ | string | Additional value for the tag. |
| params[extra] | ❌ | string | Extra information for the tag. |
| params[internal] | ❌ | integer | Internal flag for the tag. 1 if internal, 0 otherwise. |
Request example