Skip to main content
Use GET /api/v1/settlements to reconcile normalized order-level marketplace finance and POST /api/v1/settlements to apply settlement lines to existing orders. This is not the Orders API. POST / PATCH /api/v1/orders still own selling prices, COGS, and returns. Settlements write financial evidence, project settled rows into the finance ledger, and recompute Payment received when a marketplace formula exists. Do not send paymentReceived. Omni computes it from settled ledger fee types.

Authentication

Session-authenticated calls must include organizationId in the JSON body.

Read normalized settlements

List the latest order-and-currency snapshots produced by finance ingestion:
Filter by marketplace, exact accountId, Omni orderId, marketplace externalOrderId, or updatedSince. Follow the opaque cursor until hasMore is false. Fetch one stable settlement ID with:
Money remains partitioned by currency. These reads expose snapshots created by the settlement event pipeline; run the finance backfill before expecting historical orders that predate that pipeline. For live updates, subscribe to settlement.created, settlement.updated, and settlement.status.changed. See Settlement webhooks.

Apply settlement evidence

lines is always an array, even for one target. Maximum 200 lines.

Request fields

What Omni writes

  1. Upserts marketplace_financial_evidence (source_kind=developer_api).
  2. Projects settled rows to order_financial_events using the order’s platform and account_id (exact join, including NULL).
  3. Un-projects a previous developer-API ledger row when the same sourceEventKey is later sent as pending / reversed / voided.
  4. Recomputes Payment received only when a formula exists for that marketplace (Zalora today: Item Price − ZAP − Commission).
Selling prices (paidPrice / unitPrice) are not rewritten. Use the Orders API for those.

Matching

Organization-scoped, exact:
  • marketplace → order platform (zalora → agentic; other slugs match orders.platform)
  • externalOrderId
  • externalOrderItemId when more than one line exists
  • accountId if provided
A missing accountId never matches every store that reuses an external id.

Response

Top-level success is true only when every requested line succeeds. Partial failures stay in data.results in request order.

Zalora vs the assistant tool

This API replaces update_zalora_orders_from_transaction_file for structured settlement writes. Do not apply both for the same fee lines — that would double-count Payment received. Continue to use the Orders API for identity, USD COGS, and returns. Continue to use the Item Transaction Report tool only when you want Omni to parse the spreadsheet.