Generate a card series

POST /api/v1/card-batches prm_cards_generate_user

اعرض الصفحة بصيغة Markdown

Stages an asynchronous generation job and returns immediately. The cards and the printable artifact are produced in the background; poll the series until status is ready, then fetch the print job.

A fresh stage answers 202 Accepted; a replay of the same request_id answers 200 OK with the original batch_id and replay true. The status field says generating in both cases, because it describes the job, not the outcome of this call. Branch on the HTTP status or on replay, not on status.

نظرة سريعة

المصادقة
رمز موظّف أو جلسة
تتطلب صلاحية
prm_cards_generate_user Generate user cards
حد المعدل
t_mutate
مفتاح عدم التكرار
request_id

المعاملات

المعامل الوصف
typeمطلوب body · enum refill or prepaid.
quantityمطلوب body · integer How many cards to mint.
face_valueمطلوب body · number Value per card, major units.
expirationمطلوب body · string yyyy-MM-dd HH:mm:ss or yyyy-MM-dd. Series-level card lifetime.
plan_profile_id body · integer Required for prepaid, and for a refill card that auto-activates.
code_length body · integer The redemption PIN length. A MINIMUM, not an exact value — a mint may exceed it when the tenant's live code pool needs more entropy.
code_charset body · enum numeric, alpha, alnum or alnum_no_ambig.
owner_manager_id body · integer The series owner. Defaults to the creator.
request_idمطلوب body · string Idempotency key.

الأخطاء

الرمز متى تُرجَع
ERR_VALIDATION400 bad expiration, an unworkable spec, or a request_id that is missing, too long or reserved
ERR_VALIDATION402 the generating manager's wallet cannot cover the generation charge
ERR_FORBIDDEN403 minting refill cards without the refill-generation permission, which is separate from the generate permission the route checks

جرّبه على شبكتك.

50 مشترك لمدة 7 أيام، من غير ما تدفع حاجة.