Optima REST API icon

Optima REST API

Interact with Comarch Optima ERP via REST API

Document → Create Invoice Correction

AI-generated

Summary

Creates a sales, purchase, or margin invoice correction in Comarch Optima by sending the supplied document data to the matching REST API endpoint.

Inputs

  • Document Type (required) — Selects Sale, Purchase, or Margin and determines the original document type for the correction.
  • Margin Procedure — Optional margin procedure; when provided, it is added to the document data as ProceduraMarzy.
  • Document Data (required) — JSON for the correction. Include OryginalDocumentId and PrzyczynaKorekty, along with the document fields required by the API.

Output shape

A single n8n item per input item, with the API response in its json field.

The node POSTs to /api/Documents/Invoice-Correction/{Document Type}. If the input item contains binary data, it is copied to the output. Errors stop execution unless Continue On Fail is enabled; then an item with an error field is returned.

Examples

Example 1: Create a sales correction

Choose Sales Invoice / Sale Correction and provide Document Data JSON containing OryginalDocumentId and PrzyczynaKorekty.

Links

Discussion