Skip to content

List a member's card grants

GET/v1/businesses/{id}/memberships/{membershipId}/card-grants

Requires an API client bearer token.

Lists the membership's card grants, oldest first, each with its card's id once a card is issued under it. An API client names its acting person in X-Rigid-Acting-Person (400 acting_person_required without it); the person must hold an active membership of the business and be the member, or hold can_view_all_cards, else 403 acting_person_not_permitted; reading another member's grants also re-checks that admin's KYC (403 admin_kyc_not_complete once it no longer holds). Every read writes one business.read audit intent with the decision. While the `business-cards` release flag is off for the caller's mode this route answers 404, as if absent.

Parameters

Path parameters

NameRequiredDescription
idrequired
membershipIdrequired

Query parameters

NameRequiredDescription
limitoptional
starting_afteroptional

Header parameters

NameRequiredDescription
X-Rigid-Acting-Personoptional

Example

curl https://api.rigid.fi/v1/businesses/{id}/memberships/{membershipId}/card-grants \
  -H "Authorization: Bearer $RIGID_API_TOKEN"

Responses

200

The membership's grants.

dataarray of objectrequired
+ show properties
idstring (uuid)required
business_idstring (uuid)required
membership_idstring (uuid)required
state"active" | "revoked" | "expired"required
valid_fromstring (date-time)required
valid_untilstring (date-time) | nullrequired
screening_idstringrequired
card_idstring (uuid) | nullrequired
ends_atstring (date-time) | nullrequired
ended_atstring (date-time) | nullrequired
end_reasonone ofrequired
+ show properties

One of

Option 1

{
  "type": "string",
  "enum": [
    "revoked",
    "expired",
    "membership_removed",
    "business_closed"
  ]
}

Option 2

{
  "type": "null"
}

Option 3

{
  "type": "null"
}
created_atstring (date-time)required
has_morebooleanrequired
next_cursorstring (uuid) | nullrequired
400

Validation error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401

Authentication required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403

The acting person is not permitted (acting_person_not_permitted), or an admin whose KYC no longer holds reads another member's grants (admin_kyc_not_complete)

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
404

Business or membership not found, or the business routes are not released

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500

Internal server error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring