Create invoices in bulk for multiple customers
POST
Issues the same invoice (items, discounts, dates) to each customer in customerInvoices.
bearerAuthheader
AutorizaciónBearer <token>Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.
application/json- body
customerInvoices*array<>Elementos
1 <= itemscurrency*stringValor en
"VES""USD""EUR"issueDate?stringdueDate?stringAfter this day the invoice is OVERDUE and the late fee, if any, applies.
lateFee?numberAdded once dueDate has passed: a fixed amount, or a percentage of the items' subtotal, per lateFeeType.
Rango
0 <= value <= 1000000000lateFeeType?stringValor en
"PERCENTAGE""FIXED"accountPaymentMethodIds?array<string>Ids from GET /v1/payment-methods. Limits how the customer can pay this invoice; without it, any of your account's methods.
items*array<>Elementos
1 <= items <= 50discounts?array<>Elementos
items <= 5Por defecto
[]Successful response
application/json- response
[index: integer]?curl -X POST 'https://api.unopago.com/v1/invoices/bulk' \ -H 'Content-Type: application/json' \ -d '{ "customerInvoices": [ { "customerId": "string" } ], "currency": "VES", "items": [ { "description": "string", "quantity": 1, "amount": 0.01 } ]}'Ejemplo de respuesta
[ { "lateFeeType": "PERCENTAGE", "currency": "VES", "pricingMode": "CURRENCY", "status": "DRAFT", "source": "STANDARD", "id": "string", "externalId": "string", "accountId": "string", "customerId": "string", "printJobId": "string", "fiscalRecordId": "string", "billingDetailsId": "string", "description": "string", "issueDate": "string", "dueDate": "string", "expired": true, "paidAt": "string", "voidedAt": "string", "planDate": "string", "billingRunKey": "string", "lateFee": 0, "fiscalInvoicing": true, "createdAt": "string", "updatedAt": "string", "total": 0, "balance": 0, "feesTotals": [ { "type": "IGTF", "rateBase": 0, "rate": 0, "total": 0 } ], "customer": { "id": "string", "accountId": "string", "externalId": "string", "mainContactId": "string", "nationalId": "string", "firstName": "string", "lastName": "string", "email": "string", "phoneNumber": "string", "address": "string", "createdAt": "string", "updatedAt": "string" }, "discounts": [ { "valueType": "PERCENTAGE", "id": "string", "accountId": "string", "invoiceId": "string", "fromPaymentId": "string", "description": "string", "value": 0, "expiresAt": "string", "expired": true, "createdAt": "string", "updatedAt": "string" } ], "fees": [ { "type": "IGTF", "id": "string", "accountId": "string", "invoiceId": "string", "fromPaymentId": "string", "amount": 0, "rate": 0, "rateBase": 0, "createdAt": "string", "updatedAt": "string" } ], "items": [ { "discountValueType": "PERCENTAGE", "id": "string", "accountId": "string", "invoiceId": "string", "productId": "string", "studentId": "string", "description": "string", "amount": 0, "quantity": -9007199254740991, "exento": true, "isService": true, "subscriptionId": "string", "ivaRatePercent": -9007199254740991, "discountValue": 0, "discountExpiresAt": "string", "discountExpired": true, "createdAt": "string", "updatedAt": "string" } ], "transactions": [ { "kind": "ITEMS", "currency": "VES", "id": "string", "accountId": "string", "customerId": "string", "invoiceId": "string", "statementId": "string", "description": "string", "transactionDate": "string", "exchangeRate": 0, "rateDate": "string", "credit": 0, "debit": 0, "paymentId": "string", "fromPaymentId": "string", "retentionId": "string", "createdAt": "string", "updatedAt": "string" } ], "paymentMethods": [ { "id": "string", "invoiceId": "string", "accountPaymentMethodId": "string", "createdAt": "string", "updatedAt": "string" } ], "paymentLink": "string", "invoiceSequence": "string", "fiscalInvoice": { "source": "UNOPRINT", "invoiceNumber": "string", "controlNumber": "string", "issuedAt": "string" } }]
