Modify batch of purchase invoices

POST /api-v1/purchase-invoice/batch

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

application/json

Body Required

purchaseInvoices

  • accrualEntriesAmount integer(int32)
  • amounts array[object]
    Hide amounts attributes Show amounts attributes object
    • amountType string

      Values are NO_VAT, VAT_RATE, or MANUAL.

    • id integer
    • net string
    • vat string
    • vatRateId integer
    • vatType string

      Values are NO_VAT, NATIVE, or IMPORT_OF_SERVICE.

    • vatTypeCodeId integer
  • attributions array[object]
    Hide attributions attributes Show attributions attributes object
    • appliedAllocationRules array[string]
    • articleId integer
    • articleName object
      Hide articleName attributes Show articleName attributes object
      • de string
      • en string
      • fr string
      • it string
    • chartOfAccountsId integer
    • chartOfAccountsName object
      Hide chartOfAccountsName attributes Show chartOfAccountsName attributes object
      • de string
      • en string
      • fr string
      • it string
    • dateFrom string
    • dateTo string
    • departmentId integer
    • departmentName string
    • endDate string
    • fixedAssetId integer
    • fixedAssetName string
    • id integer
    • net string
    • officeId integer
    • officeName string
    • orderClientId integer
    • orderId integer
    • orderIdToDisplay string
    • percent string
    • quantity string
    • reBill boolean
    • reBillDate string(date-time)
    • readOnly boolean
    • shipments array[object]
      Hide shipments attributes Show shipments attributes object
      • articleId integer
      • articleIdSku string
      • articleName object
        Hide articleName attributes Show articleName attributes object
        • de string
        • en string
        • fr string
        • it string
      • attributionId integer
      • currencyCode string
      • departmentId integer
      • generatedStockMovementId integer
      • id integer
      • officeId integer
      • quantity string
      • shipmentDate string
      • totalCost number
    • startDate string
  • 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]
    Hide payments attributes Show payments attributes object
    • accountNumber string
    • bankCharges string
    • id integer
    • isFromLockedAccountingPeriod boolean
    • lineCode string
    • paidAmount string
    • payableByAccountId integer
    • payableByAccountName object
      Hide payableByAccountName attributes Show payableByAccountName attributes object
      • de string
      • en string
      • fr string
      • it string
    • payableToBankId integer
    • paymentPurposeCodeId integer
    • paymentType string

      Values are BANK_TRANSFER, BVR, or QR_BILL.

    • plannedDate string
    • qrBillData string
    • referenceNumber string
    • requestedAmount string
    • requestedDate string
    • sentDate string
    • valueDate string
  • realValidated boolean
  • reference string
  • supplierId integer
  • systemValidated boolean
  • validated boolean
  • validatorUserIds array[integer(int32)]
  • validatorUserIdsSize integer
  • vatType string

    Values are NO_VAT, NATIVE, or IMPORT_OF_SERVICE.

  • vatTypeCodeId integer
  • warnings string

Responses

  • 200 */*

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • error boolean
      • 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
          • data string
          • errorCode string
          • fieldName string
          • isSevere boolean
      • freshData object
      • freshRow object
      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer
        • name string
      • 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/purchase-invoice/batch
curl \
 --request POST 'https://wyzio.app/api-v1/purchase-invoice/batch' \
 --header "Content-Type: application/json" \
 --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
    }
  ]
}