Company add-ons
1 operation in the WP Waterfall API.
Add or remove an add-on on many targets at once
post/companies/me/add-ons/bulkPermalink to Add or remove an add-on on many targets at once
- Dashboard session only, no API key
A signed-in session only. No API key may call it. Needs an Owner, an Admin, or a Billing user. Up to 200 targets. add needs addon_key and, for a per environment add-on, an environment_id on each target. remove needs an addon_id on each target. Answers 202 with one child job for each change that touches a node, and the amount of each line.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, BulkAddonRequest
Fields
| Name | Type | Description |
|---|---|---|
action required | string | One of: add, remove. |
addon_key | string | Required for add. |
quantity | integer | Range: 1 to 50. |
targets required | array of object | |
targets[].environment_id | string (uuid) | For add: the environment that gets the add-on, when the add-on is per environment. |
targets[].addon_id | string (uuid) | For remove: the add-on to switch off. |
Responses
| Status | Body | Description |
|---|---|---|
202 | object | The group and its child jobs |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The caller may not change billing |
409 | Problem | One of the add-ons is already off |
422 | Problem | A target or the add-on is not valid |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
202 response fields
| Name | Type | Description |
|---|---|---|
group_id required | string (uuid) | |
action required | string | One of: add, remove. |
preview_cents required | integer | |
lines required | array of object | |
lines[].company_id required | string | |
lines[].addon_id required | one of string (uuid), null | |
lines[].amount_cents required | integer | |
children required | array of object | |
children[].company_id required | string | |
children[].addon_id required | one of string (uuid), null | |
children[].job_id required | one of string (uuid), null |