대량 발급
POST /certificates/:certificateId/batch-issue
한 번의 요청으로 여러 수신자에게 발급합니다.
각 수신자별로 개별 tokenUri를 지정할 수 있습니다.
경로 파라미터
| 파라미터 | 설명 |
|---|---|
certificateId | 발급할 인증서 ID |
요청 바디 (application/json)
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
recipients | array | ✅ | 수신자 목록 |
recipients[].walletAddress | string | ✅ | 수신자 지갑 주소 |
recipients[].tokenUri | string | — | 개별 토큰 메타데이터 URI |
recipients[].expiresAt | number | — | SBT 만료 timestamp (0 = 무기한) |
응답
{
"success": true,
"data": {
"id": "673a5d1e-f92b-4a61-9094-8eee1387bbea",
"type": "batch_issue",
"status": "pending",
"txHash": null,
"from": "0x592C4D1b...",
"to": "0xd2D53c7b...",
"contractAddress": "0xd2D53c7b...",
"createdAt": "2024-01-01T00:00:00.000Z",
"confirmedAt": null
}
}
- TypeScript
- Python
const tx = await api('POST', `/certificates/${certificateId}/batch-issue`, {
recipients: [
{
walletAddress: '0x2222222222222222222222222222222222222222',
tokenUri: 'https://storage.example.com/metadata/001.json',
},
{
walletAddress: '0x3333333333333333333333333333333333333333',
tokenUri: 'https://storage.example.com/metadata/002.json',
},
],
});
tx = api('POST', f'/certificates/{certificate_id}/batch-issue', {
'recipients': [
{
'walletAddress': '0x2222222222222222222222222222222222222222',
'tokenUri': 'https://storage.example.com/metadata/001.json',
},
{
'walletAddress': '0x3333333333333333333333333333333333333333',
'tokenUri': 'https://storage.example.com/metadata/002.json',
},
],
})
info
발급 완료 후 실제 블록체인에서 확정되기까지 수 초가 소요될 수 있습니다.
트랜잭션 조회 API로 상태를 확인하거나 웹훅을 활용하세요.