Update sales territory
PUT/sales/territories/{id}
Updates an existing territory's details. All fields follow the same rules as creation. The code is normalised to uppercase on save.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Integer ID of the SalesTerritory to update. Example: |
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Full territory name. Max length: 180 |
code | string, nullable | No | Short code, auto-uppercased on save. Max length: 20 |
manager_user_id | integer, nullable | No | Tenant user ID to assign as manager. |
description | string, nullable | No | Human-readable territory description. Max length: 2000 |
status | string | No | Active/inactive lifecycle flag. One of: |
notes | string, nullable | No | Internal notes. Max length: 2000 |
Example
{
"name": "Greater Accra",
"code": "GHA-ACC",
"manager_user_id": 9,
"status": "active"
}
Responses
302 Redirect to territories list after update
404 Territory not found
422 Validation error
Example request
curl -X PUT "https://{tenant}.faciotech.net/api/v1/sales/territories/{id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name": "Greater Accra", "code": "GHA-ACC", "manager_user_id": 9, "status": "active"}'