Modify batch of purchase invoices
Headers
-
TARGET-ORGANIZATION-ID
integer(int32) ID of organization, for which the operation must be performed
-
WEAL-TOKEN
string Required API token (can be retrieved from account settings)
Query parameters
-
suppressDuplicateWarning
boolean suppressDuplicateWarning
Body
Required
purchaseInvoices
-
accrualEntriesAmount
integer(int32) -
amounts
array[object] -
attributions
array[object] -
comment
string -
currencyId
integer -
date
string -
description
string -
id
integer -
isContainsSoldFixedAsset
boolean -
isDraft
boolean -
isFromLockedAccountingPeriod
boolean -
journalEntryId
integer -
organizationId
integer -
paymentAccountId
integer -
payments
array[object] -
realValidated
boolean -
reference
string -
supplierId
integer -
systemValidated
boolean -
validated
boolean -
validatorUserIds
array[integer(int32)] -
validatorUserIdsSize
integer -
vatType
string Values are
NO_VAT
,NATIVE
, orIMPORT_OF_SERVICE
. -
vatTypeCodeId
integer -
warnings
string
POST
/api-v1/purchase-invoice/batch
curl \
--request POST 'http://wyzio.app/api-v1/purchase-invoice/batch' \
--header "TARGET-ORGANIZATION-ID: 42" \
--header "WEAL-TOKEN: string" \
--data '[{"accrualEntriesAmount":42,"amounts":[{"amountType":"NO_VAT","id":42,"net":"string","vat":"string","vatRateId":42,"vatType":"NO_VAT","vatTypeCodeId":42}],"attributions":[{"appliedAllocationRules":["string"],"articleId":42,"articleName":{"de":"string","en":"string","fr":"string","it":"string"},"chartOfAccountsId":42,"chartOfAccountsName":{"de":"string","en":"string","fr":"string","it":"string"},"dateFrom":"string","dateTo":"string","departmentId":42,"departmentName":"string","endDate":"string","fixedAssetId":42,"fixedAssetName":"string","id":42,"net":"string","officeId":42,"officeName":"string","orderClientId":42,"orderId":42,"orderIdToDisplay":"string","percent":"string","quantity":"string","reBill":true,"reBillDate":"2025-05-04T09:42:00Z","readOnly":true,"shipments":[{"articleId":42,"articleIdSku":"string","articleName":{"de":"string","en":"string","fr":"string","it":"string"},"attributionId":42,"currencyCode":"string","departmentId":42,"generatedStockMovementId":42,"id":42,"officeId":42,"quantity":"string","shipmentDate":"string","totalCost":42.0}],"startDate":"string"}],"comment":"string","currencyId":42,"date":"string","description":"string","id":42,"isContainsSoldFixedAsset":true,"isDraft":true,"isFromLockedAccountingPeriod":true,"journalEntryId":42,"organizationId":42,"paymentAccountId":42,"payments":[{"accountNumber":"string","bankCharges":"string","id":42,"isFromLockedAccountingPeriod":true,"lineCode":"string","paidAmount":"string","payableByAccountId":42,"payableByAccountName":{"de":"string","en":"string","fr":"string","it":"string"},"payableToBankId":42,"paymentPurposeCodeId":42,"paymentType":"BANK_TRANSFER","plannedDate":"string","qrBillData":"string","referenceNumber":"string","requestedAmount":"string","requestedDate":"string","sentDate":"string","valueDate":"string"}],"realValidated":true,"reference":"string","supplierId":42,"systemValidated":true,"validated":true,"validatorUserIds":[42],"validatorUserIdsSize":42,"vatType":"NO_VAT","vatTypeCodeId":42,"warnings":"string"}]'
Request examples
# Headers
TARGET-ORGANIZATION-ID: 42
WEAL-TOKEN: string
# Payload
[
{
"accrualEntriesAmount": 42,
"amounts": [
{
"amountType": "NO_VAT",
"id": 42,
"net": "string",
"vat": "string",
"vatRateId": 42,
"vatType": "NO_VAT",
"vatTypeCodeId": 42
}
],
"attributions": [
{
"appliedAllocationRules": [
"string"
],
"articleId": 42,
"articleName": {
"de": "string",
"en": "string",
"fr": "string",
"it": "string"
},
"chartOfAccountsId": 42,
"chartOfAccountsName": {
"de": "string",
"en": "string",
"fr": "string",
"it": "string"
},
"dateFrom": "string",
"dateTo": "string",
"departmentId": 42,
"departmentName": "string",
"endDate": "string",
"fixedAssetId": 42,
"fixedAssetName": "string",
"id": 42,
"net": "string",
"officeId": 42,
"officeName": "string",
"orderClientId": 42,
"orderId": 42,
"orderIdToDisplay": "string",
"percent": "string",
"quantity": "string",
"reBill": true,
"reBillDate": "2025-05-04T09:42:00Z",
"readOnly": true,
"shipments": [
{
"articleId": 42,
"articleIdSku": "string",
"articleName": {
"de": "string",
"en": "string",
"fr": "string",
"it": "string"
},
"attributionId": 42,
"currencyCode": "string",
"departmentId": 42,
"generatedStockMovementId": 42,
"id": 42,
"officeId": 42,
"quantity": "string",
"shipmentDate": "string",
"totalCost": 42.0
}
],
"startDate": "string"
}
],
"comment": "string",
"currencyId": 42,
"date": "string",
"description": "string",
"id": 42,
"isContainsSoldFixedAsset": true,
"isDraft": true,
"isFromLockedAccountingPeriod": true,
"journalEntryId": 42,
"organizationId": 42,
"paymentAccountId": 42,
"payments": [
{
"accountNumber": "string",
"bankCharges": "string",
"id": 42,
"isFromLockedAccountingPeriod": true,
"lineCode": "string",
"paidAmount": "string",
"payableByAccountId": 42,
"payableByAccountName": {
"de": "string",
"en": "string",
"fr": "string",
"it": "string"
},
"payableToBankId": 42,
"paymentPurposeCodeId": 42,
"paymentType": "BANK_TRANSFER",
"plannedDate": "string",
"qrBillData": "string",
"referenceNumber": "string",
"requestedAmount": "string",
"requestedDate": "string",
"sentDate": "string",
"valueDate": "string"
}
],
"realValidated": true,
"reference": "string",
"supplierId": 42,
"systemValidated": true,
"validated": true,
"validatorUserIds": [
42
],
"validatorUserIdsSize": 42,
"vatType": "NO_VAT",
"vatTypeCodeId": 42,
"warnings": "string"
}
]
Response examples (200)
{
"items": [
{
"error": true,
"errorCode": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"data": "string",
"errorCode": "string",
"fieldName": "string",
"isSevere": true
}
]
},
"freshData": {},
"freshRow": {},
"possibleWorkflows": [
{
"id": 42,
"name": "string"
}
],
"severeError": true
}
]
}