Bulk Action Customer

Changed on

Performs a bulk action on a set of customers. The customer set is determined by an explicit customer_uid array, filter_rules (v3), and/or the legacy filter object — all three can be combined; customer_uid narrows additively. Role-based scoping is always applied on top: a Field Executive only sees their own records, a Team Leader only their team's (unless the company allows viewing all).

delete, activate, and update_field apply synchronously. send_email and send_sms respond before the per-customer send loop finishes (fire-and-forget relative to the response). send_customer_ar_aging_statement is fully asynchronous — it queues a worker job and responds immediately with just an acknowledgement.

activate's is_active is toggle-style: the request is automatically scoped to customers NOT already in the target state before applying it.

post/customers/bulk_action

Request

  • Base URL
    https://dc-region.zuperpro.com/api
  • URL
    https://dc-region.zuperpro.com/api/customers/bulk_action
  • Auth
    API key in header x-api-key

Request body

action'delete' | 'activate' | 'update_field' | 'send_email' | 'send_sms' | 'send_customer_ar_aging_statement'
customer_uidstring[]

Optional explicit list of customer uids. Combined additively ($in) with filter_rules/filter.

filter_rulesobject[]

v3 filter engine rules used to select the customer set.

Response

200

typestring
titlestring
messagestring

Example response

{
  "type": "success"
}

Changes