Batch update allocation rules

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://restapi.wyzio.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Wyzio MCP server": {
    "url": "https://restapi.wyzio.com/mcp"
  }
}

Close
POST /api-v1/allocations/batch

Modifies batch of allocation rules

Headers

  • WEAL-TOKEN Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID

    ID of organization, for which the operation must be performed

application/json

Body Required

  • id integer

    Entity ID. If negative value, a new entity will be created

  • name string
  • description string
  • moduleType string

    Values are PURCHASE_INVOICES or SALES_INVOICES.

  • filters string

    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" }

  • dateFrom string(date-time) Required
  • dateTo string(date-time)
  • active boolean
  • actions array[object]

    Single allocation rule entry.

    Hide actions attributes Show actions attributes object

    Single allocation rule entry.

    • id integer

      Entity ID. If negative value, a new entity will be created

    • position integer

      Order of the allocation entry.

    • departmentId integer

      Identifier of the target department.

    • officeId integer

      Identifier of the target office.

    • accountId integer

      Identifier of the target account.

    • percentage number Required

      Percentage value. May be negative, but the sum of all percentage values must equal 100.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • errorCode object
        Hide errorCode attributes Show errorCode attributes object
        • errorCode string

          Values are NO_ERROR, NOT_IMPLEMENTED_YET, CONTACT_NOT_FOUND, FIELD_REQUIRED, VALIDATION_ERROR, DUPLICATION_ERROR, UNIQUE_CONSTRAINT_VIOLATION, WRONG_PASSWORD_FORMAT, WRONG_PASSWORD, ACTION_DENIED, NOT_FOUND, EXPECTED_ONE_FILE, UNIQUE_VIOLATION, CONTENT_EMPTY, INVALID_TYPE, CONVERSION_ERROR, FILE_PARSE_EXCEPTION, or IN_USE.

        • errorDetailValues array[object]
          Hide errorDetailValues attributes Show errorDetailValues attributes object
          • errorCode string
          • fieldName string
          • data string
          • isSevere boolean
      • freshData

        Refreshed domain data

      • freshRow

        Refreshed table row data

      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer(int64)
        • name string
      • error boolean
      • severeError boolean
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

POST /api-v1/allocations/batch
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}]}]'
Request examples
# 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
      }
    ]
  }
]
Response examples (200)
{
  "items": [
    {
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "errorCode": "string",
            "fieldName": "string",
            "data": "string",
            "isSevere": true
          }
        ]
      },
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "error": true,
      "severeError": true
    }
  ]
}