Grant an offer Coming soon
POST/v1/offers/{id}/grants
Puts a granted offer in up to 500 members' wallets. Each grant becomes a wallet item with source: "offer" and fires reward.issued. The same grant_ref and member never grant twice, so you can safely resume a job that stopped halfway.
Permissions: Secret key with offers:write.
Request headers#
Idempotency-KeystringRequiredRequired on this endpoint. Any string up to 255 characters; use a UUID v4. Missing returns400 idempotency_key_required.Max Length 255
Path parameters#
idstring (uuid)Required
Request body#
grant_refstringRequiredYour name for this send, up to 128 characters. Reuse it for every batch of the same send.member_idsarray of string (uuid)Required1 to 500 member ids.Max Items 500
Members are skipped, not failed, so one bad id doesn't stop the batch. reason is already_granted, member_not_found, member_deleted, per_member_limit_reached or budget_exhausted.
Response fields#
Returns 200 with GrantResult
grantedintegerskippedarray of SkippedShow attributesSkipped
member_idstring (uuid)reasonstring
Error descriptions#
400Bad request
idempotency_key_required
The header is missing.
400Bad request
invalid_param
More than 500 member_ids.
400Bad request
invalid_request
The offer's distribution isn't granted.
409Conflict
invalid_state
The offer isn't live.
422Unprocessable
idempotency_key_reused
Same key, different body.
Any endpoint can also return the common errors.