Reference · Taxes
Create a tax
/v1/sites/{siteId}/taxesAdds a tax to a site. The response is the tax, with the code to use from then on.
Path
siteIdrequiredThe site, from GET /v1/sites.
string
Headers
AuthorizationrequiredAn API key from Automation > Access in the Dnero portal, sent as
Authorization: Bearer <key>.string
Idempotency-KeyA value you choose, unique to what this request creates: a UUID, or your own id for it. Sending it again with the same body returns the first response and creates nothing more. Required.
string · at most 255 characters
Body
namerequiredThe tax's name.
string · 1–200 characters
ratePercentrequiredThe rate, as a percentage, to three decimal places.
number · double · ≥ 0 · ≤ 100
activeFalse to create it retired. Defaults to true.
boolean
Responses
- bad_requestinvalid_cursoridempotency_key_required
- missing_keyinvalid_keykey_expired+1 more
- key_revokedassistant_keykey_without_access+7 more
- site_not_foundnot_found
- idempotency_key_reusedrequest_in_progress
- invalid_requestnot_a_modifier_group
- rate_limited
- server_error
- upstream_unavailable
201 Created
activerequiredFalse for a retired tax.
boolean
coderequiredThe tax's code. Products carry these.
string
namerequiredThe tax's name.
string
ratePercentrequiredThe rate, as a percentage.
number · double
updatedAtWhen the tax last changed.
string · date-time