Modify batch of purchase invoice scans

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
PUT /api-v1/purchase-invoice-scan/batch

Updates the specified purchase invoice scans.

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

Query parameters

  • suppressDuplicateWarning boolean
application/json

Body Required

  • id integer

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

  • organizationId integer

    Organization ID

  • date string

    Invoice date (format dd/MM/yyyy)

  • supplierId integer

    Supplier contact ID

  • currencyId integer

    Currency ID

  • reference string

    Supplier invoice reference

  • description string

    Invoice description

  • comment string

    Internal comment

  • validated boolean

    Whether validated

  • vatType string

    VAT type

    Values are NO_VAT, NATIVE, or IMPORT_OF_SERVICE.

  • vatTypeCodeId integer

    VAT type code ID

  • status string

    Scan processing status

    Values are NEW, PROCESS, CONVERT, or RECOGNIZING.

  • paymentChartId integer

    Payment chart of accounts ID

  • isOrganizationNameIncluded boolean

    Whether the organization name is included in the scan

  • isTreatedByManagingOrganization boolean

    Whether treated by the managing organization

  • payableTo integer

    Payable-to contact ID

  • document object

    Attached document (scanned receipt)

    Hide document attributes Show document attributes object
    • id integer

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

    • entityId integer

      ID of the entity this document is attached to

    • name string

      Document name

    • fileId integer Required

      Uploaded document file ID

    • date string

      Document date (format dd/MM/yyyy)

    • tags array[object]

      Document tag reference. Only id is required

      Hide tags attribute Show tags attribute object

      Document tag reference. Only id is required

      • id integer Required

        Tag ID

    • contact object

      Contact this document is associated with. Only id is required

      Hide contact attribute Show contact attribute object
      • id integer Required

        Contact ID

    • module string

      Module this document belongs to

      Value is PURCHASE_INVOICES_SCAN.

    • comments string

      Comments

    • isSystem boolean

      Whether the document is system-generated

    • self boolean

      Whether the document is self-uploaded by the current user

  • amounts array[object]

    Invoice amount lines (VAT breakdown)

    Hide amounts attributes Show amounts attributes object
    • id integer

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

    • vatRateId integer

      VAT rate ID

    • amountType string

      Purchase amount type

      Values are NO_VAT, VAT_RATE, or MANUAL.

    • net string

      Net amount as string

    • vat string

      VAT amount as string

    • vatType string

      VAT type. Auto-filled from the invoice's vatType when not provided and this is a new line

      Values are NO_VAT, NATIVE, or IMPORT_OF_SERVICE.

    • vatTypeCodeId integer

      VAT type code ID. Auto-filled from the invoice's vatTypeCodeId when not provided and this is a new line

  • attributions array[object]

    Cost attributions

    Hide attributions attributes Show attributions attributes object
    • id integer

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

    • chartOfAccountsId integer

      Chart of accounts (expense category) ID

    • dateFrom string

      Accrual start date (format dd/MM/yyyy)

    • dateTo string

      Accrual end date (format dd/MM/yyyy)

    • net string

      Net amount as string

    • percent string

      Percentage of the total invoice amount as string

    • departmentId integer

      Department ID

    • orderId integer

      Order ID this attribution is charged to

    • reBill boolean

      Whether this attribution should be rebilled to the client

    • articleId integer

      Article ID

    • quantity string

      Quantity as string

    • shipments array[object]

      Shipment records for this attribution

      Hide shipments attributes Show shipments attributes object
      • id integer

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

      • shipmentDate string

        Shipment date (format dd/MM/yyyy)

      • articleId integer

        Article ID

      • quantity string

        Quantity as string

      • totalCost number

        Total cost

      • generatedStockMovementId integer

        ID of the stock movement generated for this shipment

      • officeId integer

        Office ID

      • attributionId integer

        ID of the scan attribution this shipment belongs to

    • appliedAllocationRules array[string]

      Applied allocation rule identifiers

    • officeId integer

      Office ID

  • payments array[object]

    Payment records

    Hide payments attributes Show payments attributes object
    • id integer

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

    • requestedDate string

      Requested payment date (format dd/MM/yyyy)

    • plannedDate string

      Planned payment date (format dd/MM/yyyy)

    • sentDate string

      Date the payment was sent (format dd/MM/yyyy)

    • valueDate string

      Value date of the payment (format dd/MM/yyyy)

    • requestedAmount string

      Requested amount as string

    • paidAmount string

      Paid amount as string

    • bankCharges string

      Bank charges as string. Defaults to 0

    • payableByAccountId integer

      Chart of accounts ID used as the payable-by account

    • paymentType string

      Payment type

      Values are BANK_TRANSFER, BVR, or QR_BILL.

    • payableToBankId integer

      Bank ID to pay to

    • lineCode string

      Payment line code

    • accountNumber string

      Account number

    • referenceNumber string

      Payment reference number

    • qrBillData string

      QR-bill data

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

PUT /api-v1/purchase-invoice-scan/batch
curl \
 --request PUT 'https://wyzio.app/api-v1/purchase-invoice-scan/batch' \
 --header "Content-Type: application/json" \
 --data '[{"id":12345678,"organizationId":12345678,"date":"01/06/2026","supplierId":12345678,"currencyId":12345678,"reference":"INV-2026-001","description":"Office supplies","comment":"Scanned from paper","validated":false,"vatType":"NO_VAT","vatTypeCodeId":12345678,"status":"NEW","paymentChartId":12345678,"isOrganizationNameIncluded":true,"isTreatedByManagingOrganization":false,"payableTo":12345678,"document":{"id":12345678,"entityId":12345678,"name":"invoice_scan.pdf","fileId":12345678,"date":"01/06/2026","tags":[{"id":12345678}],"contact":{"id":12345678},"module":"PURCHASE_INVOICES_SCAN","comments":"Scanned from email attachment","isSystem":false,"self":true},"amounts":[{"id":12345678,"vatRateId":12345678,"amountType":"NO_VAT","net":100.0,"vat":7.7,"vatType":"NO_VAT","vatTypeCodeId":12345678}],"attributions":[{"id":12345678,"chartOfAccountsId":12345678,"dateFrom":"01/01/2026","dateTo":"31/03/2026","net":100.0,"percent":100.0,"departmentId":12345678,"orderId":12345678,"reBill":false,"articleId":12345678,"quantity":1.0,"shipments":[{"id":12345678,"shipmentDate":"01/06/2026","articleId":12345678,"quantity":10.0,"totalCost":250.0,"generatedStockMovementId":12345678,"officeId":12345678,"attributionId":12345678}],"appliedAllocationRules":["string"],"officeId":12345678}],"payments":[{"id":12345678,"requestedDate":"01/06/2026","plannedDate":"05/06/2026","sentDate":"05/06/2026","valueDate":"05/06/2026","requestedAmount":1200.0,"paidAmount":1200.0,"bankCharges":0.0,"payableByAccountId":12345678,"paymentType":"BANK_TRANSFER","payableToBankId":12345678,"lineCode":"L001","accountNumber":"CH56 0483 5012 3456 7800 9","referenceNumber":210000000003139471430009017,"qrBillData":"SPC..."}]}]'
Request examples
# Headers

# Payload
[
  {
    "id": 12345678,
    "organizationId": 12345678,
    "date": "01/06/2026",
    "supplierId": 12345678,
    "currencyId": 12345678,
    "reference": "INV-2026-001",
    "description": "Office supplies",
    "comment": "Scanned from paper",
    "validated": false,
    "vatType": "NO_VAT",
    "vatTypeCodeId": 12345678,
    "status": "NEW",
    "paymentChartId": 12345678,
    "isOrganizationNameIncluded": true,
    "isTreatedByManagingOrganization": false,
    "payableTo": 12345678,
    "document": {
      "id": 12345678,
      "entityId": 12345678,
      "name": "invoice_scan.pdf",
      "fileId": 12345678,
      "date": "01/06/2026",
      "tags": [
        {
          "id": 12345678
        }
      ],
      "contact": {
        "id": 12345678
      },
      "module": "PURCHASE_INVOICES_SCAN",
      "comments": "Scanned from email attachment",
      "isSystem": false,
      "self": true
    },
    "amounts": [
      {
        "id": 12345678,
        "vatRateId": 12345678,
        "amountType": "NO_VAT",
        "net": 100.0,
        "vat": 7.7,
        "vatType": "NO_VAT",
        "vatTypeCodeId": 12345678
      }
    ],
    "attributions": [
      {
        "id": 12345678,
        "chartOfAccountsId": 12345678,
        "dateFrom": "01/01/2026",
        "dateTo": "31/03/2026",
        "net": 100.0,
        "percent": 100.0,
        "departmentId": 12345678,
        "orderId": 12345678,
        "reBill": false,
        "articleId": 12345678,
        "quantity": 1.0,
        "shipments": [
          {
            "id": 12345678,
            "shipmentDate": "01/06/2026",
            "articleId": 12345678,
            "quantity": 10.0,
            "totalCost": 250.0,
            "generatedStockMovementId": 12345678,
            "officeId": 12345678,
            "attributionId": 12345678
          }
        ],
        "appliedAllocationRules": [
          "string"
        ],
        "officeId": 12345678
      }
    ],
    "payments": [
      {
        "id": 12345678,
        "requestedDate": "01/06/2026",
        "plannedDate": "05/06/2026",
        "sentDate": "05/06/2026",
        "valueDate": "05/06/2026",
        "requestedAmount": 1200.0,
        "paidAmount": 1200.0,
        "bankCharges": 0.0,
        "payableByAccountId": 12345678,
        "paymentType": "BANK_TRANSFER",
        "payableToBankId": 12345678,
        "lineCode": "L001",
        "accountNumber": "CH56 0483 5012 3456 7800 9",
        "referenceNumber": 210000000003139471430009017,
        "qrBillData": "SPC..."
      }
    ]
  }
]
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
    }
  ]
}