Skip to content

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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
action requiredstringOne of: add, remove.
addon_keystringRequired for add.
quantityintegerRange: 1 to 50.
targets requiredarray of object
targets[].environment_idstring (uuid)For add: the environment that gets the add-on, when the add-on is per environment.
targets[].addon_idstring (uuid)For remove: the add-on to switch off.

Responses

StatusBodyDescription
202objectThe group and its child jobs
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe caller may not change billing
409ProblemOne of the add-ons is already off
422ProblemA target or the add-on is not valid
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

202 response fields

NameTypeDescription
group_id requiredstring (uuid)
action requiredstringOne of: add, remove.
preview_cents requiredinteger
lines requiredarray of object
lines[].company_id requiredstring
lines[].addon_id requiredone of string (uuid), null
lines[].amount_cents requiredinteger
children requiredarray of object
children[].company_id requiredstring
children[].addon_id requiredone of string (uuid), null
children[].job_id requiredone of string (uuid), null