Subcontractor Bulk Action

Changed on

Operates on Subcontractors, shown in the Zuper client app as "Subcontractor" (in every industry). Subcontractors share the exact same underlying schema and endpoints as Vendors / Suppliers; they're distinguished only by the vendor_type field (SUB_CONTRACTOR here) and the /subcontractors route prefix. Supports activate, send_email, send_sms, and delete. Activate/email are processed asynchronously by a background worker. Delete skips (and reports back) any record that is a favorite supplier or set as a product's preferred vendor.

post/subcontractors/bulk_action

Request

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

Request body

vendor_uidstring[]

UIDs to target. Alternative to filter_rules.

filter_rulesobject[]
filter_rule_operator'AND' | 'OR'
action'activate' | 'send_email' | 'send_sms' | 'delete' required
action_optionsobject

Shape depends on action: activate → {is_active: boolean}; send_email → {cc?: string[], bcc?: string[]}; send_sms → {sms_body: string} (Handlebars template); delete → no fields.

update_statusboolean

Response

200

type'SUCCESS'
titlestring
messagestring

Changes