Skip to main content

Order item financial operations

Get the financial history of one order item with GET /api/orders/{orderId}/items/{orderItemId}/operations. See the API reference and full response example.

curl "$API_BASE_URL/api/orders/$ORDER_ID/items/$ITEM_ID/operations" \
-H "Authorization: PrivateToken $PRIVATE_TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID"

The response contains the complete history without pagination, ordered by occurred_at, created_at and id ascending. Empty history returns data: []. Operations appear asynchronously after item changes.

Operation types​

  • charge: an accrual.
  • cancel: compensation of a charge not linked to an invoice at the time of compensation.
  • return: compensation of a charge linked to an invoice at the time of compensation.

Amounts are non-negative and use EUR, including compensations. A compensation does not by itself confirm a money refund or invoice payment.

ArticleMeaning
goodsProduct purchase cost
purchase_servicePurchase service fee
purchase_service_vatVAT on the purchase service
purchase_deliveryPurchase delivery cost
handling_and_packagingHandling and packaging fee
handling_and_packaging_vatVAT on handling and packaging

Reading the response​

Use amount as the operation total. calculation contains the saved historical basis, without recalculation using current settings. Its fields depend on the operation article and saved calculation version (version). Decimal values inside the calculation are strings.

Different articles have different calculation bases:

  • goods: unit purchase price and quantity.
  • purchase_service: purchase cost and the applied fee rule.
  • purchase_service_vat: taxable service amount and VAT rate.
  • purchase_delivery: source delivery amount and currency conversion details.
  • handling_and_packaging: quantity and the applied handling and packaging rule.
  • handling_and_packaging_vat: taxable handling and packaging amount and VAT rate.

Calculations saved after an item split also contain allocation details.

For cancel and return, own calculation is null. charge_operation_id identifies the compensated charge; source_charge contains its id and calculation. It is null for a charge or a missing source.

The exporter belongs to the operation. Its name and IBAN are current directory values; saved calculation values remain historical. A missing reference returns exporter: null while preserving exporter_id.