Grant a member one business card
/v1/businesses/{id}/memberships/{membershipId}/card-grantsRequires an API client bearer token.
Grants the member the right to hold one business card, until valid_until when given (else until revoked). The grant is created only after a sanctions screening of the person comes back clear: the screening_subject's given and family names, joined by one space, must be the member's full name (after Unicode NFKC, case folding and whitespace collapsing), else 409 screening_subject_mismatch and no screening; a result of candidates or confirmed_match is 409 screening_not_clear, carrying that result as screening_result; an unreachable or unconfigured screening service is 503, and no grant is created. The subject is not stored: the grant keeps the screening_id, and the Idempotency-Key keeps a keyed fingerprint (HMAC-SHA-256) of the whole request, retained with the key's stored outcome, so a reused key with a different body is 409. The business must be active (409 business_disabled, business_closed) and the membership active with can_hold_card (409 member_not_eligible); valid_until must be in the future (400 valid_until_not_future). Requires an Idempotency-Key: a retry replays the grant without screening again, and a screening_not_clear refusal is equally the key's stored answer, replayed on every retry under it; a request after the screening is dispositioned needs a new Idempotency-Key. Emits card_grant.created. 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. Every call the route decides (the release flag on, a well-formed body, and a valid 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; a replay of a stored outcome writes none, and neither does a 5xx. A concurrent first attempt under the same Idempotency-Key that is still screening answers 429 idempotency_in_progress (transient: wait Retry-After and retry unchanged, never a fresh attempt). While the `business-cards` release flag is off for the caller's mode 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
| Name | Required | Description |
|---|---|---|
| id | required | |
| membershipId | required |
Header parameters
| Name | Required | Description |
|---|---|---|
| Idempotency-Key | required | 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-Person | optional |
Request body
+ show properties− hide properties
Example
curl -X POST https://api.rigid.fi/v1/businesses/{id}/memberships/{membershipId}/card-grants \
-H "Authorization: Bearer $RIGID_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"screening_subject": {
"given_name": "string",
"family_name": "string"
}
}'Responses
201The grant.
+ show properties− hide properties
One of
Option 1
{
"type": "string",
"enum": [
"revoked",
"expired",
"membership_removed",
"business_closed"
]
}Option 2
{
"type": "null"
}Option 3
{
"type": "null"
}400Validation error, including valid_until_not_future and acting_person_required
401Authentication required
403The acting person is not permitted; admin_kyc_not_complete
404Business or membership not found, or the business routes are not released
409Idempotency-Key reused with a different payload; business_disabled; business_closed; member_not_eligible; screening_subject_mismatch; screening_not_clear, with screening_result (candidates or confirmed_match), the stored answer of its Idempotency-Key: a retry after the screening is dispositioned needs a new key
429idempotency_in_progress: a concurrent first attempt under this key is screening now; wait Retry-After and retry unchanged
500Internal server error
503screening_unavailable or screening_unconfigured: no grant is created