Modifies batch of allocation rules
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
-
Values are
PURCHASE_INVOICESorSALES_INVOICES. -
JSON string with allocation filters.
Supported structures depend on moduleType.
SALES_INVOICES example: { "street": "Street", "clientId": ["1"], "houseNumber": "1", "city": "City", "account": ["1"], "postCode": "PO Box", "zipCode": "1", "ourContactId": "1", "currency": "1", "status": ["OPEN"], "country": "1", "yourReference": "You Ref", "ourReference": "Ref" }
PURCHASE_INVOICES example: { "supplierId": ["1"], "reference": "Ref", "status": ["OPEN"], "account": ["1"], "currency": "1" }
-
Single allocation rule entry.
curl \
--request POST 'https://wyzio.app/api-v1/allocations/batch' \
--header "Content-Type: application/json" \
--data '[{"id":12345678,"name":"string","description":"string","moduleType":"PURCHASE_INVOICES","filters":"string","dateFrom":"2026-05-04T09:42:00Z","dateTo":"2026-05-04T09:42:00Z","active":true,"actions":[{"id":12345678,"position":0,"departmentId":12345678,"officeId":12345678,"accountId":12345678,"percentage":25}]}]'
# Headers
# Payload
[
{
"id": 12345678,
"name": "string",
"description": "string",
"moduleType": "PURCHASE_INVOICES",
"filters": "string",
"dateFrom": "2026-05-04T09:42:00Z",
"dateTo": "2026-05-04T09:42:00Z",
"active": true,
"actions": [
{
"id": 12345678,
"position": 0,
"departmentId": 12345678,
"officeId": 12345678,
"accountId": 12345678,
"percentage": 25
}
]
}
]
{
"items": [
{
"errorCode": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"errorCode": "string",
"fieldName": "string",
"data": "string",
"isSevere": true
}
]
},
"possibleWorkflows": [
{
"id": 42,
"name": "string"
}
],
"error": true,
"severeError": true
}
]
}