Batch update expenses drafts

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/expenses/draft/batch

Updates multiple expenses drafts. Returns 200 on success, or 400 if any entry fails validation.

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

  • reBill boolean

    Whether this expense should be rebilled to the client

  • description string

    Expense description / memo

  • date string Required

    Expense date (format dd/MM/yyyy)

  • merchant string

    Merchant name. This as a plain string. If a merchant with this name does not exist, one will be created.

  • currencyNetAmount string

    Net amount in the original currency, as string

  • currencyVatAmount string

    VAT amount in the original currency, as string

  • currencyTotalAmount string

    Total amount in the original currency, as string

  • companyCurrencyTotalAmount string

    Total amount in the company's currency, as string

  • paymentType string

    Payment type

    Values are OWN_RESOURCES or COMPANY_RESOURCES.

  • currencyId integer

    Currency ID

  • chartOfAccountsId integer

    Chart of accounts (expense category) ID

  • departmentId integer

    Department ID

  • orderId integer

    Order ID this expense is attributed to

  • orderClientId integer

    Client (contact) ID associated with the order

  • vatRateId integer

    VAT rate ID. Use null for "Manual" type VAT entries.

  • receiptDocumentFileId integer

    Receipt document file ID. Taken from the uploaded document's fileId

  • officeId integer

    Office ID

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/expenses/draft/batch
curl \
 --request POST 'https://wyzio.app/api-v1/expenses/draft/batch' \
 --header "Content-Type: application/json" \
 --data '[{"id":12345678,"reBill":false,"description":"Client lunch","date":"01/06/2026","merchant":"Starbucks","currencyNetAmount":100.0,"currencyVatAmount":20.0,"currencyTotalAmount":120.0,"companyCurrencyTotalAmount":120.0,"paymentType":"CREDIT_CARD","currencyId":12345678,"chartOfAccountsId":12345678,"departmentId":12345678,"orderId":12345678,"orderClientId":12345678,"vatRateId":12345678,"receiptDocumentFileId":12345678,"officeId":12345678}]'
Request examples
# Headers

# Payload
[
  {
    "id": 12345678,
    "reBill": false,
    "description": "Client lunch",
    "date": "01/06/2026",
    "merchant": "Starbucks",
    "currencyNetAmount": 100.0,
    "currencyVatAmount": 20.0,
    "currencyTotalAmount": 120.0,
    "companyCurrencyTotalAmount": 120.0,
    "paymentType": "CREDIT_CARD",
    "currencyId": 12345678,
    "chartOfAccountsId": 12345678,
    "departmentId": 12345678,
    "orderId": 12345678,
    "orderClientId": 12345678,
    "vatRateId": 12345678,
    "receiptDocumentFileId": 12345678,
    "officeId": 12345678
  }
]
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
    }
  ]
}