POST
/cards/v1/batchesCreate Batch of Innominated Cards
The endpoint /cards/v1/batches allows you to create a batch of innominated cards.
We will validate that you meet the requirements detailed in the documentation.
Considerations
- Each batch has a maximum of 1,000 cards.
- The shipping address is mandatory if the distribution type is
CLIENT. - We will process the call asynchronously, meaning that the cards may not be available immediately.
Available parameters
Header Parameters
AuthorizationStringrequired
x-idempotency-keyStringrequired
Cuerpo de solicitud
application/jsonaffinity_group_idstringrequired
quantitynumberrequired
distribution_typeenumrequired
addressobject10 properties
receiverobject5 properties
Response details
401
Unauthorized
403
Access denied
Ejemplo de solicitud
{
"affinity_group_id": "afg-20MpN8vmIPj77ujhb9cS8ctstN2",
"quantity": 100,
"distribution_type": "CLIENT",
"address": {
"street_name": "Street",
"street_number": "123",
"floor": "5",
"apartment": "A",
"city": "Buenos Aires",
"region": "Buenos Aires",
"country": "Argentina",
"zip_code": "5653",
"neighborhood": "Palermo",
"additional_info": "Torre 2. Casa amarilla"
},
"receiver": {
"full_name": "Gonzalo Iglesias",
"email": "[email protected]",
"document_type": "DNI",
"document_number": "35354896",
"telephone_number": "1132421452"
}
}Ejemplo de código
curl -X POST "https://api.pomelo.la/cards/v1/batches" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-idempotency-key: fRwX12Dg3345AD" \
-d '{
"affinity_group_id": "afg-20MpN8vmIPj77ujhb9cS8ctstN2",
"quantity": 100,
"distribution_type": "CLIENT",
"address": {
"street_name": "Street",
"street_number": "123",
"floor": "5",
"apartment": "A",
"city": "Buenos Aires",
"region": "Buenos Aires",
"country": "Argentina",
"zip_code": "5653",
"neighborhood": "Palermo",
"additional_info": "Torre 2. Casa amarilla"
},
"receiver": {
"full_name": "Gonzalo Iglesias",
"email": "[email protected]",
"document_type": "DNI",
"document_number": "35354896",
"telephone_number": "1132421452"
}
}'Ejemplo de respuesta (202)Card batch accepted
{
"data": {
"shipment_id": "shi-16281925351057V5BKK",
"affinity_group_id": "afg-20MpN8vmIPj77ujhb9cS8ctstN2",
"card_type": "PHYSICAL",
"quantity": 100,
"distribution_type": "CLIENT"
}
}