Skip to content

Create quota plan

POST/sales/quotas

Creates a quota plan targeting either a territory or an individual user (or both). At least one of territory_id or owner_user_id must be provided. Plans start as 'draft' unless explicitly set to 'active'.

Request

Request body

Content type application/json (required).

FieldTypeRequiredDescription
namestringYes

Descriptive label for the quota plan.

Max length: 180

territory_idinteger, nullableNo

ID of a sales_territories record. At least one of territory_id or owner_user_id must be supplied.

owner_user_idinteger, nullableNo

ID of the tenant user this quota is assigned to. Used for individual rep quotas alongside or instead of a territory.

currencystringNo

ISO 4217 currency code. Defaults to GHS.

Default: "GHS" · Min length: 3 · Max length: 3

period_startstring (date)Yes

First day of the quota period.

period_endstring (date)Yes

Last day of the quota period; must be >= period_start.

target_amountnumberYes

Revenue target for the period in the specified currency.

Minimum: 0

statusstringNo

Lifecycle status of the quota plan.

One of: "draft", "active", "closed" · Default: "draft"

notesstring, nullableNo

Optional notes or context for the quota.

Max length: 2000

Example

{
  "name": "Q2 2026 – Greater Accra",
  "territory_id": 3,
  "currency": "GHS",
  "period_start": "2026-04-01",
  "period_end": "2026-06-30",
  "target_amount": 150000,
  "status": "active"
}

Responses

302 Redirect to quotas list after creation

422 Validation error — at least one of territory_id or owner_user_id required

Content type application/json, any.

Example

{
  "errors": {
    "territory_id": [
      "Quota plans must target either a territory or a user."
    ]
  }
}

Example request

curl -X POST "https://{tenant}.faciotech.net/api/v1/sales/quotas" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q2 2026 – Greater Accra", "territory_id": 3, "currency": "GHS", "period_start": "2026-04-01", "period_end": "2026-06-30", "target_amount": 150000, "status": "active"}'
Loading