REST API

Lists API

Create and manage shipping documents and packing lists.

Generated from the Celerp 2.4.0 OpenAPI schema, 16 September 2026.

GET /lists

List Lists

Parameters

NameInRequiredTypeDescription
list_typequery--string, optional--
statusquery--string, optional--
exclude_statusquery--string, optional--
date_fromquery--string, optional--
date_toquery--string, optional--
qquery--string, optional--
limitquery--integer, optional--
offsetquery--integer--
all_issuedquery--boolean--
converted_to_typequery--string, optional--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/lists \
  -H "Authorization: Bearer $TOKEN"

POST /lists

Create List

Request body

FieldTypeRequiredDescription
list_typestring, optional--List Type
ref_idstring, optional--Ref Id
customer_idstring, optional--Customer Id
customer_namestring, optional--Customer Name
contact_idstring, optional--Contact Id
contact_namestring, optional--Contact Name
line_itemsarray of object--Line Items
subtotalnumber--Subtotal
discountnumber--Discount
discount_typestring--Discount Type
taxnumber--Tax
totalnumber--Total
currencystring, optional--Currency
notesstring, optional--Notes
statusstring--Status
share_tokenstring, optional--Share Token
contact_shipping_addressstring, optional--Contact Shipping Address
shipping_attnstring, optional--Shipping Attn
carrierstring, optional--Carrier
trackingstring, optional--Tracking
incotermsstring, optional--Incoterms
package_countinteger, optional--Package Count
gross_weightstring, optional--Gross Weight
reason_for_exportstring, optional--Reason For Export
country_of_exportstring, optional--Country Of Export
country_of_destinationstring, optional--Country Of Destination
importerstring, optional--Importer
source_docsarray of string, optional--Source Docs
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/audit

Create Audit List

Create a location-bound audit as a DRAFT manifest pre-seeded with the location's physical items. The manifest is reviewed/extended in draft (scan adds more); Finalize freezes each line's on-hand snapshot, then counting happens in the finalized stage.

Request body

FieldTypeRequiredDescription
location_idstringyesLocation Id
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/audit \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /lists/export/csv

Export Lists Csv

Parameters

NameInRequiredTypeDescription
qquery--string, optional--
list_typequery--string, optional--
statusquery--string, optional--

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/lists/export/csv \
  -H "Authorization: Bearer $TOKEN"

POST /lists/import

Import List

Request body

FieldTypeRequiredDescription
entity_idstringyesEntity Id
event_typestringyesEvent Type
dataobjectyesData
sourcestringyesSource
idempotency_keystringyesIdempotency Key
source_tsstring, optional--Source Ts

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/import \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/import/batch

Batch Import Lists

Request body

FieldTypeRequiredDescription
recordsarray of DocImportRecordyesRecords
upsertboolean--Upsert

Responses

StatusDescriptionBody
200Successful Responsecelerp_docs__routes__BatchImportResult
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /lists/summary

Get List Summary

Responses

StatusDescriptionBody
200Successful Responseobject

Example

curl -X GET http://localhost:8000/lists/summary \
  -H "Authorization: Bearer $TOKEN"

POST /lists/writeoff

Create Writeoff List

Create a write-off list as a DRAFT seeded from the selected inventory items - the entry point for the inventory Write off bulk action. Each seeded line carries the item's on-hand quantity and blank qty_out/account/comment for on-page entry; Finalize locks it, then the Write off stock terminal removes the stock and posts one JE. Mirrors create_audit_list, but the seed source is the selection, not a location scan.

Request body

FieldTypeRequiredDescription
entity_idsarray of string--Entity Ids
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/writeoff \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /lists/{entity_id}

Get List

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/lists/:entity_id \
  -H "Authorization: Bearer $TOKEN"

PATCH /lists/{entity_id}

Patch List

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
fields_changedobject--Fields Changed
idempotency_keystring, optional--Idempotency Key
expected_versioninteger, optional--Expected Version

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X PATCH http://localhost:8000/lists/:entity_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /lists/{entity_id}

Delete List

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X DELETE http://localhost:8000/lists/:entity_id \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/adjust

Adjust Audit

Audit terminal action: overwrite each counted line's item qty to its count (finalized -> closed). The magnitude and the shrinkage/overage JE are computed against the LIVE item qty at adjust time (decision 5.2) - `new_qty = counted`, `delta = counted - live`. Uncounted (blank) lines are skipped and reported. Reversible via undo-adjust.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/adjust \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/change-type

Change List Type

Change a list's type while it is a draft OR issued (finalized). The change is just another event in history, so everything the list did under its old type stays recorded; terminal/ financial actions are gated by status, so re-typing can't undo or fabricate past work. Type fields persist (nothing is zeroed). Switching a FINALIZED list to audit re-freezes the on-hand baseline that the audit's own finalize would have captured, so variance/Adjust stay correct. Closed/void lists are terminal - duplicate instead.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
list_typestringyesList Type

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/change-type \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/convert

Convert List

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
target_typestringyesTarget Type

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/convert \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/duplicate

Duplicate List

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/duplicate \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/finalize

Finalize List

Lock a draft list (draft -> finalized). The single draft->open transition for every type. Type-specific on-finalize (from the behaviour registry): a quotation records `sent_at`, a transfer `issued_at`, an audit freezes each line's on-hand snapshot (for variance + a stable On-hand column while counting). Counting / terminal actions happen in the finalized stage.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/finalize \
  -H "Authorization: Bearer $TOKEN"

PATCH /lists/{entity_id}/line-page

Patch List Line Page

Save one page of a list's lines without scraping or re-sending the whole array. Under the same row lock and optimistic-version guard as a full save, the submitted page REPLACES the stored window [offset:offset+original_count] the client originally loaded. Relative to that window a shorter page truncates (deletes) tail rows and a longer one inserts; off-window rows are left byte-identical and totals are recomputed from the full merged array. Omitting original_count means the window is exactly the submitted page's own length (a pure in-place replace that never drops off-window rows), so a delete or insert must carry the loaded window length, which the editor always sends.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
line_itemsarray of object--Line Items
offsetinteger--Offset
original_countinteger, optional--Original Count
expected_versioninteger, optional--Expected Version

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X PATCH http://localhost:8000/lists/:entity_id/line-page \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

PATCH /lists/{entity_id}/line/{item_id}

Set Audit Count

Set a line's physical count. Editable only while the audit is finalized (counting stage).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--
item_idpathyesstring--

Request body

FieldTypeRequiredDescription
counted_qtynumber, optional--Counted Qty

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X PATCH http://localhost:8000/lists/:entity_id/line/:item_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/move

Move Transfer

Transfer action: relocate every item on a finalized transfer to one location, by emitting the inventory `item.transferred` event per line (stock is owned by inventory; docs only emits the event). Repeatable - the transfer stays finalized so it can be moved again.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
to_location_idstringyesTo Location Id

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/move \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /lists/{entity_id}/notes

List List Notes

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responsearray of object
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/lists/:entity_id/notes \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/notes

Add List Note

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
notestringyesNote
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/notes \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

PATCH /lists/{entity_id}/notes/{note_id}

Update List Note

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--
note_idpathyesstring--

Request body

FieldTypeRequiredDescription
notestringyesNote
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X PATCH http://localhost:8000/lists/:entity_id/notes/:note_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /lists/{entity_id}/notes/{note_id}

Delete List Note

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--
note_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X DELETE http://localhost:8000/lists/:entity_id/notes/:note_id \
  -H "Authorization: Bearer $TOKEN"

GET /lists/{entity_id}/page

Get List Page

The list header (stored state without line_items), one bounded page of line_items, the total, and enriched item metadata for exactly the page's ids. Everything is read in bounded SQL: the header is `state - line_items` (never the whole document row), the total is json_array_length, the window is a positional json subscript over generate_series, and item_meta joins the page's catalog items only. The detail view renders the page and enriches it from this one call, so a large list is never expanded into Python and no follow-up metadata round-trip is needed.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--
offsetquery--string--
limitquery--string--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/lists/:entity_id/page \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/reserve-lines

Reserve List Lines

Set selected lines reserved/available on a draft or finalized list of any type (ledger-neutral).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
line_entity_idsarray of stringyesLine Entity Ids
new_statusstringyesNew Status

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/reserve-lines \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/revert-to-draft

Revert List To Draft

Go back from finalized to draft, allowed only before a terminal action has run (GDR 2c).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
reasonstring, optional--Reason
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/revert-to-draft \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/scan

Scan List

One scan endpoint for every list type, dispatching on (list_type, status): - DRAFT (all types): always ADD a line (audit dedups its manifest + moves to top; money lists price the new line). No status change (GDR 2d) - building the list never finalizes it. - FINALIZED audit: record presence (audited_at), add + audit if not yet on the manifest. - FINALIZED transfer: scan-to-receive (records receipt on the line; the stock move is the Phase 4 seam). - FINALIZED quotation / any closed|void list: scanning is disabled (clear 409).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
barcodestringyesBarcode
price_liststring, optional--Price List
run_keystring, optional--Run Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/scan \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/send

Send List

Record a finalized list as sent (sets the `sent_at` milestone; status stays finalized) and, if a recipient is given, fire the relay email - the same Send / Mark-as-sent mechanism documents use. `sent_via="manual"` (no recipient) is the Mark-as-sent path.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
sent_viastring, optional--Sent Via
sent_tostring, optional--Sent To
ccstring, optional--Cc
bccstring, optional--Bcc
subjectstring, optional--Subject
messagestring, optional--Message
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/send \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/set-scanned

Set Scanned

Toggle the scanned/accounted-for highlight (audited_at) on audit lines. scanned=True marks the rows as scanned (stamps audited_at), scanned=False clears it. Pass item_ids to target specific rows, or none for every line. The highlight otherwise persists indefinitely.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
item_idsarray of string--Item Ids
scannedboolean--Scanned

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/set-scanned \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/undo-adjust

Undo Audit Adjust

Reverse the last stock adjustment (manager/owner): restore each item's prior quantity and void the audit JE. Reopens the audit (closed -> finalized) so it can be re-counted or re-adjusted.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/undo-adjust \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/undo-write-off

Undo Write Off

Reverse a write-off (manager): void its JE and restore each disposed lot to `available`. A carved child lot is NOT re-merged into its parent - it returns as its own available lot, so quantity is conserved (parent remainder + restored child = the original). Reopens the list (closed -> finalized) so it can be re-run.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/undo-write-off \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/unmark-sent

Unmark List Sent

Clear the sent milestone (the list stays finalized).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/unmark-sent \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/void

Void List

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
reasonstring, optional--Reason
idempotency_keystring, optional--Idempotency Key

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/void \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /lists/{entity_id}/write-off

Write Off Stock

Write-off terminal (manager): in one step, validate every intended line, remove each line's qty_out from stock and post one balanced JE (one debit per destination account against a single Inventory credit). Runs from a draft (finalized inline after validation) or a finalized list. A full-quantity line disposes the whole item row; a partial line carves a child lot via the shared split primitive and disposes that. Every disposed portion ends as a hidden `disposed` item - the permanent disposal record. Lines with no quantity entered are skipped and reported; a line with a quantity but an invalid account/item/quantity rejects the whole action. Reversible via undo-write-off.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/write-off \
  -H "Authorization: Bearer $TOKEN"

POST /lists/{entity_id}/writeoff-line

Set Writeoff Line

Set (or append) a write-off line's quantity-out, destination account and comment, on-page while the list is a draft. Pass line_id to edit a seeded line, or item_id (no line_id) to add another line for an item already selectable on the list - the SAME item can be written off to two accounts (spoiled -> wastage, sampled -> marketing). qty_out and account are validated at the function level.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

FieldTypeRequiredDescription
line_idstring, optional--Line Id
item_idstring, optional--Item Id
qty_outnumber, optional--Qty Out
accountstring, optional--Account
commentstring, optional--Comment

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/lists/:entity_id/writeoff-line \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'