Skip to content

Create sales territory

POST/sales/territories

Creates a new sales territory with an optional short code, assigned manager, and description. Territories group deals for reporting and quota assignment. The code is automatically uppercased.

Request

Request body

Content type application/json (required).

FieldTypeRequiredDescription
namestringYes

Full name of the territory (e.g. "Greater Accra").

Max length: 180

codestring, nullableNo

Short unique code for the territory (e.g. "GHA-ACC"). Stored in uppercase. Leave blank to omit.

Max length: 20

manager_user_idinteger, nullableNo

ID of the tenant user assigned as territory manager. Must exist in the users table.

descriptionstring, nullableNo

Human-readable description of the territory's scope.

Max length: 2000

statusstringNo

Whether the territory is currently in use.

One of: "active", "inactive" · Default: "active"

notesstring, nullableNo

Internal operator notes.

Max length: 2000

Example

{
  "name": "Greater Accra",
  "code": "GHA-ACC",
  "manager_user_id": 7,
  "description": "Primary commercial territory covering Accra metro area.",
  "status": "active"
}

Responses

302 Redirect to the territories list after creation

422 Validation error — name is required

Content type application/json, any.

Example

{
  "errors": {
    "name": [
      "The name field is required."
    ]
  }
}

Example request

curl -X POST "https://{tenant}.faciotech.net/api/v1/sales/territories" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name": "Greater Accra", "code": "GHA-ACC", "manager_user_id": 7, "description": "Primary commercial territory covering Accra metro area.", "status": "active"}'
Loading