Updates multiple purchase invoices. Returns 200 on success, or 400 if any entry fails validation.
Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
Body
Required
-
Entity ID. If negative value, a new entity will be created
-
Journal entry ID
-
Invoice date (format dd/MM/yyyy)
-
Supplier contact ID
-
Currency ID
-
Supplier invoice reference
-
Invoice description
-
Internal comment
-
Whether the invoice is validated. Only applied if the current user has validation permission
-
VAT type
Values are
NO_VAT,NATIVE, orIMPORT_OF_SERVICE. -
VAT type code ID
-
Payment chart of accounts ID. Auto-filled from organization defaults when creating and left empty
-
Whether to save the invoice as a draft, bypassing strict validation. Forced to true by the server if validation fails for a not-yet-existing or draft invoice
-
Invoice amount lines (VAT breakdown). Required, must not be empty
-
Cost attributions, must not be empty
-
Payment records. Required, must not be empty
curl \
--request POST 'https://wyzio.app/api-v1/purchase-invoice/batch' \
--header "Content-Type: application/json" \
--data '[
{
"id": 12345678,
"journalEntryId": 12345678,
"date": "01/06/2026",
"supplierId": 12345678,
"currencyId": 12345678,
"reference": "INV-2026-001",
"description": "Office supplies Q2",
"comment": "Approved by manager",
"validated": false,
"vatType": "NO_VAT",
"vatTypeCodeId": 12345678,
"paymentAccountId": 12345678,
"isDraft": false,
"amounts": [
{
"id": 12345678,
"vatRateId": 12345678,
"amountType": "NO_VAT",
"net": "100.00",
"vat": "7.70",
"vatType": "NO_VAT",
"vatTypeCodeId": 12345678
}
],
"attributions": [
{
"id": 12345678,
"chartOfAccountsId": 12345678,
"dateFrom": "01/01/2026",
"dateTo": "31/03/2026",
"net": "100.00",
"percent": "100.00",
"departmentId": 12345678,
"orderId": 12345678,
"reBill": false,
"articleId": 12345678,
"quantity": "1.00",
"shipments": [
{
"id": 12345678,
"shipmentDate": "01/06/2026",
"articleId": 12345678,
"quantity": "10.000",
"totalCost": 250.0,
"generatedStockMovementId": 12345678,
"officeId": 12345678
}
],
"fixedAssetId": 12345678,
"officeId": 12345678
}
],
"payments": [
{
"id": 12345678,
"requestedDate": "01/06/2026",
"plannedDate": "05/06/2026",
"sentDate": "05/06/2026",
"valueDate": "05/06/2026",
"requestedAmount": "1200.00",
"paidAmount": "1200.00",
"bankCharges": "5.00",
"payableByAccountId": 12345678,
"paymentType": "BANK_TRANSFER",
"payableToBankId": 12345678,
"lineCode": "L001",
"accountNumber": "CH56 0483 5012 3456 7800 9",
"referenceNumber": "210000000003139471430009017",
"qrBillData": "SPC...",
"paymentPurposeCodeId": 12345678
}
]
}
]'
# Headers
# Payload
[
{
"id": 12345678,
"journalEntryId": 12345678,
"date": "01/06/2026",
"supplierId": 12345678,
"currencyId": 12345678,
"reference": "INV-2026-001",
"description": "Office supplies Q2",
"comment": "Approved by manager",
"validated": false,
"vatType": "NO_VAT",
"vatTypeCodeId": 12345678,
"paymentAccountId": 12345678,
"isDraft": false,
"amounts": [
{
"id": 12345678,
"vatRateId": 12345678,
"amountType": "NO_VAT",
"net": "100.00",
"vat": "7.70",
"vatType": "NO_VAT",
"vatTypeCodeId": 12345678
}
],
"attributions": [
{
"id": 12345678,
"chartOfAccountsId": 12345678,
"dateFrom": "01/01/2026",
"dateTo": "31/03/2026",
"net": "100.00",
"percent": "100.00",
"departmentId": 12345678,
"orderId": 12345678,
"reBill": false,
"articleId": 12345678,
"quantity": "1.00",
"shipments": [
{
"id": 12345678,
"shipmentDate": "01/06/2026",
"articleId": 12345678,
"quantity": "10.000",
"totalCost": 250.0,
"generatedStockMovementId": 12345678,
"officeId": 12345678
}
],
"fixedAssetId": 12345678,
"officeId": 12345678
}
],
"payments": [
{
"id": 12345678,
"requestedDate": "01/06/2026",
"plannedDate": "05/06/2026",
"sentDate": "05/06/2026",
"valueDate": "05/06/2026",
"requestedAmount": "1200.00",
"paidAmount": "1200.00",
"bankCharges": "5.00",
"payableByAccountId": 12345678,
"paymentType": "BANK_TRANSFER",
"payableToBankId": 12345678,
"lineCode": "L001",
"accountNumber": "CH56 0483 5012 3456 7800 9",
"referenceNumber": "210000000003139471430009017",
"qrBillData": "SPC...",
"paymentPurposeCodeId": 12345678
}
]
}
]
{
"items": [
{
"errorCode": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"errorCode": "string",
"fieldName": "string",
"data": "string",
"isSevere": true
}
]
},
"possibleWorkflows": [
{
"id": 42,
"name": "string"
}
],
"error": true,
"severeError": true
}
]
}