Skip to content

Deactivate a business spend control

POST/v1/businesses/{id}/authorization-controls/{controlId}/deactivate

Requires an API client bearer token.

Deactivates a spend control; the body names its scope and scope_id, matched with the id. A control of another business or another scope is 404, and a second deactivate is 409. Requires an Idempotency-Key. An API client names its acting person in X-Rigid-Acting-Person (400 acting_person_required without it); the person needs an active membership of the business with can_grant_cards, else 403 acting_person_not_permitted (403 admin_kyc_not_complete when the KYC of the admin no longer holds). Every call with a well-formed body and an Idempotency-Key not already used with a different body, allowed or refused, writes one audit intent with the API client, the asserted person, the business and the decision. While the `business-cards` release flag is off for the mode of the caller this route answers 404 to every authenticated, well-formed request not replaying an outcome stored while it was on, as if absent.

Parameters

Path parameters

NameRequiredDescription
idrequired
controlIdrequired

Header parameters

NameRequiredDescription
Idempotency-Keyrequired

Client-chosen. An identical retry with the same key returns the stored response; reusing the key with a different payload returns 409.

X-Rigid-Acting-Personoptional

Request body

scope"business" | "membership" | "card_group"required
scope_idstring (uuid)required

Example

curl -X POST https://api.rigid.fi/v1/businesses/{id}/authorization-controls/{controlId}/deactivate \
  -H "Authorization: Bearer $RIGID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "scope": "business",
  "scope_id": "uuid"
}'

Responses

200

Deactivate a business spend control — the control.

mcc_allowarray of string
mcc_denyarray of string
country_allowarray of string
country_denyarray of string
channels_denyarray of "pos" | "ecommerce" | "atm" | "moto"
entry_mode_denyarray of "contactless" | "chip" | "magstripe" | "manual"
max_amountstring
idstringrequired
activebooleanrequired
scope"business" | "membership" | "card_group"required
scope_idstringrequired
400

scope_not_of_business; invalid_body; acting_person_required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401

Authentication required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403

Forbidden

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
404

control_not_found: no such control of this scope; or the business is not found or not released

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
409

Idempotency-Key reused with a different payload; control_conflict (already inactive); business_closed

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500

Internal server error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring