Skip to main content

Update Customer Visit Coverage

PATCH 

/api/crm/customers/:customer/coverage

Set a customer's grade, visit frequency or "Do not schedule visits". Only the fields you send change. The next visit due date and coverage status are recalculated straight away.

Required scope: customers:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token with the customers scope and the customers.update permission.

The CRM activities feature must be switched on for the account; otherwise every CRM endpoint returns 404.

Visibility: a user who may view all customers, or all CRM activities, can open any customer. Anyone else can open only customers whose default sales rep is their own sales rep; any other customer returns 404, never 403.

Body fields (all optional):

  • crm_grade (string or null): A, B or C (case-insensitive); null or empty for Unclassified. Changing the grade sets grade_set_on to today
  • visit_frequency_days (integer 1-3650 or null): overrides the grade's interval; null uses the grade's interval. Setting it on a customer with no grade_set_on sets that to today
  • exclude_from_visit_planning (boolean): true removes the customer from coverage (status not_scheduled, no due date)

Returns the customer's coverage, as Get Customer Visit Coverage.

Coverage status (coverage_status.value), against today in the account timezone:

  • on_track: next visit due more than 7 days from today
  • due_soon: due today or within the next 7 days
  • overdue: the due date has passed
  • planned: a planned visit falls on or before the due date; replaces due soon and overdue (an overdue customer whose only planned visit is after the due date stays overdue)
  • not_scheduled: no visit interval applies (no grade and no frequency, or the grade has no interval), or the customer is set to "Do not schedule visits"

Request​

Responses​

OK

Response Headers
    Content-Type