Business document API for invoices, bills, purchase orders, quotations, credit notes, shipping documents, payments, fulfillment, PDF output, and document lifecycle operations.
Generated from the Celerp 2.9.0 OpenAPI schema, .
GET/docs
List Business Documents
Return business documents matching the documented filters and pagination options.
Parameters
Name
In
Required
Type
Description
limit
query
--
integer, optional
Maximum number of records to return.
offset
query
--
integer
Number of matching records to skip before returning results.
doc_type
query
--
string, optional
Business document type used to filter or select documents, such as invoices, bills, purchase orders, quotations, or credit notes.
status
query
--
string, optional
Record or workflow status used to filter results or select the requested lifecycle state.
status_in
query
--
string, optional
Set of status values to include in the result.
exclude_status
query
--
string, optional
Status value to exclude from the result.
date_from
query
--
string, optional
Start date for the requested reporting or search period.
date_to
query
--
string, optional
End date for the requested reporting or search period.
due_from
query
--
string, optional
Earliest due date to include in the result.
due_to
query
--
string, optional
Latest due date to include in the result.
q
query
--
string, optional
Search text used to filter matching records.
contact_id
query
--
string, optional
Identifier of the customer, supplier, or other CRM contact.
currency
query
--
string, optional
Currency code; only documents stored in exactly this currency are returned.
overdue_only
query
--
boolean
Whether to return only overdue business documents.
awaiting_only
query
--
boolean
Whether to return only issued documents still awaiting payment, by the statuses of each document type.
paid_only
query
--
boolean
Whether to return only documents of a type that awaits payment that are paid in full.
all_issued
query
--
boolean
Whether to include all issued documents regardless of other open-state filters.
unfulfilled_only
query
--
boolean
Whether to return only documents with quantities still awaiting fulfillment.
not_restocked
query
--
boolean
Whether to return only documents whose returned inventory has not been restocked.
not_stocked
query
--
boolean
Whether to return only documents whose expected inventory has not been stocked.
converted_to_type
query
--
string, optional
Document type used to filter records that were converted to the specified target type.
accounting_sync
query
--
string, optional
Optional accounting synchronization status used to filter documents.
ids
query
--
string, optional
Identifiers of the specific records to include.
sort
query
--
string, optional
Field or supported sort key used to order the result.
dir
query
--
string
Sort direction, typically ascending or descending.
Responses
Status
Description
Body
200
Returns the requested business documents.
object
422
The request failed validation. The response lists each invalid field and why.
HTTPValidationError
Example
curl -X GET http://localhost:8000/docs \
-H "Authorization: Bearer $TOKEN"
POST/docs
Create Business Document
Create a business document from the supplied request data.
Request body
Field
Type
Required
Description
doc_type
string
yes
Celerp business document type, such as invoice, purchase order, quotation, bill, or credit note when supported.
ref_id
string, optional
--
Human-readable document or list reference number.
contact_id
string, optional
--
Identifier of the customer, supplier, or CRM contact associated with the record.
contact_name
string, optional
--
Display name of the customer, supplier, or CRM contact.
purchase_kind
string, optional
--
Purchasing classification applied to the document when supported.
line_items
array of LineItem
--
Line items included in the document or inventory list.
subtotal
number
--
Subtotal before tax, discounts, and other document adjustments as applicable.
tax
number
--
Tax amount for the document or list.
doc_taxes
array of TaxApplication
--
Document-level tax entries applied in addition to line-level tax calculations.
discount
number
--
Discount amount or value applied to the document or list.
shipping
number
--
Shipping amount or shipping details associated with the document.
total
number
--
Final total amount for the document or list.
payment_terms
string, optional
--
Payment terms assigned to the document.
due_date
string, optional
--
Due date for payment, delivery, or scheduled completion as applicable.
currency
string, optional
--
Currency code used for amounts in this record.
conversion_rate
number, optional
--
Exchange rate used to convert the document currency to the company's base currency.
notes
string, optional
--
Optional notes associated with the record or operation.
reference
string, optional
--
Reference
terms_template
string, optional
--
Terms Template
terms_text
string, optional
--
Terms Text
customer_note
string, optional
--
Customer Note
expected_delivery
string, optional
--
Expected delivery date recorded on the business document.
valid_until
string, optional
--
Expiration or validity date for the quotation or document.
carrier
string, optional
--
Shipping carrier name.
tracking
string, optional
--
Shipment tracking number or reference.
from_location_id
string, optional
--
Identifier of the source inventory location.
to_address
object, optional
--
Destination or shipping address for the document.
original_doc_id
string, optional
--
Identifier of the original document related to this document.
reason
string, optional
--
Human-readable reason for the lifecycle change, cancellation, void, or other operation.
status
string
--
Always draft. Documents are created as drafts and move through finalize, send, and payment actions; number, payment amounts, and lifecycle dates are set by the server.
idempotency_key
string, optional
--
Client-supplied idempotency key identifying this operation so the same request can be retried safely.
Responses
Status
Description
Body
200
Returns the created business document or creation result.
object
422
The request failed validation. The response lists each invalid field and why.
Send chosen lines of a draft invoice back to the memos they were invoiced from: their
goods go back on their memo lines, the lines leave the invoice, and the fixed amounts of a
memo none of whose lines stay come off the invoice's header (released_header_money). A
chosen line of the invoice's own did not come from a memo, so it stays on the invoice and
is named in ``skipped``; a choice of only such lines is refused.
The answer: ``removed``: the line ids it takes off the invoice; ``reopened_memos``: the memos the lines go back to; ``acted``: the line ids of the chosen lines it acts on; ``skipped``: the chosen lines it leaves as they are, each with its number (``line``), name, ``kind`` and ``line_id``; ``skipped_notice``: the messages saying why it leaves those lines; ``binding``: this answer as one digest; send it back with the action to have the action refused (409 ``lines.preview_differs``), changing nothing, if it would now do anything else.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Request body
Field
Type
Required
Description
line_ids
array of string
--
The chosen lines, each by its line id.
line_entity_ids
array of string
--
Identifiers of the document or list lines included in the operation.
idempotency_key
string, optional
--
Names one submission: sending it again returns the first result.
dry_run
boolean
--
Answer what the action would do, as the action itself decides it, and change nothing: the lines it would act on, leave and take back, or the refusal it would give, with its binding.
binding
string, optional
--
The binding of the preview the user confirmed. The action is refused (409 lines.preview_differs), changing nothing, when it would now act on, leave or take back other lines than that preview said.
Finalize a draft document. It gets its number and posts to the ledger, and can no longer be edited freely.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Responses
Status
Description
Body
200
Returns the event ID and the document's assigned number.
object
422
The request failed validation. The response lists each invalid field and why.
HTTPValidationError
Example
curl -X POST http://localhost:8000/docs/:entity_id/finalize \
-H "Authorization: Bearer $TOKEN"
POST/docs/{entity_id}/fulfill-lines
Fulfill Document Lines
Mark selected lines as fulfilled, taking their items out of stock.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Request body
Field
Type
Required
Description
line_ids
array of string
--
The chosen lines, each by its line id.
line_entity_ids
array of string
--
Identifiers of the document or list lines included in the operation.
idempotency_key
string, optional
--
Names one submission: sending it again returns the first result.
dry_run
boolean
--
Answer what the action would do, as the action itself decides it, and change nothing: the lines it would act on, leave and take back, or the refusal it would give, with its binding.
binding
string, optional
--
The binding of the preview the user confirmed. The action is refused (409 lines.preview_differs), changing nothing, when it would now act on, leave or take back other lines than that preview said.
Responses
Status
Description
Body
200
Returns the event ID and the document's new fulfillment status.
object
422
The request failed validation. The response lists each invalid field and why.
Invoice chosen goods out on a memo onto a new invoice or a draft invoice of the same
customer (Invoice selected). With ``dry_run``, what it would do, writing nothing.
The answer: ``target_doc_id``: the invoice the goods are billed on; ``draw_id``: the draw's id on the memo; ``event_id``: the id of the event that records the draw; ``invoiced``: how many memo lines it bills; ``memo_ref``: the memo's number; ``acted``: the line ids of the chosen lines it acts on; ``skipped``: the chosen lines it leaves as they are, each with its number (``line``), name, ``kind`` and ``line_id``; ``skipped_notice``: the messages saying why it leaves those lines.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Request body
Field
Type
Required
Description
line_ids
array of string
--
The chosen lines, each by its line id.
line_entity_ids
array of string
--
The chosen lines, each by the item it binds; each item must be on exactly one line.
idempotency_key
string, optional
--
Names one submission: sending it again returns the first result.
dry_run
boolean
--
Answer what the draw would bill and leave on the memo, with its binding, and write nothing.
binding
string, optional
--
The binding of the preview the user confirmed: the draw is refused unless it is exactly that draw.
quantities
object, optional
--
The quantity coming back per chosen line, by its line id (or its item id when lines are chosen by item). Omitted, or the whole quantity out: it all comes back. A smaller quantity is a partial return.
weights
object, optional
--
The returned lot's weight per line, for a parcel whose quantity does not imply it. Not stated for a part-returned parcel: unknown on both sides, never guessed.
pieces
object, optional
--
The returned lot's pieces per line, for a parcel whose quantity does not imply them. Not stated for a part-returned parcel: unknown on both sides, never guessed.
target_doc_id
string, optional
--
A draft invoice of the same customer to add the goods to; without it a new invoice is made.
Delete a payment entered by mistake. Unlike voiding, which posts a reversal that shows in the bank ledger, deleting removes the payment and its journal entry from all reports.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
payment_index
path
yes
integer
Zero-based or API-defined index identifying the payment entry on the document.
Request body
Field
Type
Required
Description
delete_reason
string, optional
--
Reason the recorded payment is being deleted as a data-entry correction.
idempotency_key
string, optional
--
Client-supplied idempotency key identifying this operation so the same request can be retried safely.
Responses
Status
Description
Body
200
Returns the ID of the recorded event.
object
422
The request failed validation. The response lists each invalid field and why.
Set selected lines reserved/available on an invoice or memo (ledger-neutral).
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Request body
Field
Type
Required
Description
line_ids
array of string
--
The chosen lines, each by its line id.
line_entity_ids
array of string
--
Identifiers of the document or list lines included in the operation.
idempotency_key
string, optional
--
Names one submission: sending it again returns the first result.
dry_run
boolean
--
Answer what the action would do, as the action itself decides it, and change nothing: the lines it would act on, leave and take back, or the refusal it would give, with its binding.
binding
string, optional
--
The binding of the preview the user confirmed. The action is refused (409 lines.preview_differs), changing nothing, when it would now act on, leave or take back other lines than that preview said.
new_status
string
yes
Reservation state to assign to the selected document or list lines.
Responses
Status
Description
Body
200
Returns the updated reservation state of each selected line.
object
422
The request failed validation. The response lists each invalid field and why.
Undo fulfillment on selected lines of a memo or invoice, putting the items back in stock. For bills, use undo receipt instead.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Request body
Field
Type
Required
Description
line_ids
array of string
--
The chosen lines, each by its line id.
line_entity_ids
array of string
--
Identifiers of the document or list lines included in the operation.
idempotency_key
string, optional
--
Names one submission: sending it again returns the first result.
dry_run
boolean
--
Answer what the action would do, as the action itself decides it, and change nothing: the lines it would act on, leave and take back, or the refusal it would give, with its binding.
binding
string, optional
--
The binding of the preview the user confirmed. The action is refused (409 lines.preview_differs), changing nothing, when it would now act on, leave or take back other lines than that preview said.
quantities
object, optional
--
Quantities to revert for the selected lines.
weights
object, optional
--
Weights to revert for the selected lines when weight-based inventory is used.
pieces
object, optional
--
Piece counts to revert for the selected lines when piece-based inventory is used.
Responses
Status
Description
Body
200
Returns the document's new fulfillment status, the lines reverted, and whether it is now partially returned.
object
422
The request failed validation. The response lists each invalid field and why.
Add a scanned run of codes to a document as new lines. `barcode` holds the codes separated by commas. A code the document cannot take, such as an unknown code, an unavailable lot or a held quantity, is reported on its own and does not stop the rest. The lines that pass are written together. A repeated `run_key` returns the first answer without adding again.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the document the scanned items are added to.
Request body
Field
Type
Required
Description
barcode
string
yes
Codes scanned, separated by commas.
price_list
string, optional
--
Price list to price the added lines from. Defaults to Retail.
run_key
string, optional
--
Client operation key identifying the scan run. A retry with the same key and codes returns the first answer.
Responses
Status
Description
Body
200
Returns the number scanned, the result for each code, the codes that failed, and the document version.
object
422
The request failed validation. The response lists each invalid field and why.
Set chosen lines of an invoice or memo as available in one request: holds are given
back and shipped goods are taken back, and the lines it acts on change together or not
at all.
Lines with no inventory item, service lines and lines with nothing held or out are left
as they are and listed in the answer's ``skipped`` (each line's number, name, kind and
line id), with ``skipped_notice`` saying why. A choice in which no line has anything held
or out is refused (422), naming the lines.
The answer: ``fulfillment_status``: the record's shipping status after the action; ``reverted``: the items it takes back whole; ``partially_returned``: for each line returned in part, the new in-stock item split off, with its ``item_id``, ``sku`` and ``quantity``; ``released``: the items whose hold it gives back; ``taken_back``: the shipped lines whose shipment it reverses, taking their goods back into stock, each with its number (``line``), name and ``line_id``; ``taken_back_notice``: the message naming those lines; ``acted``: the line ids of the chosen lines it acts on; ``skipped``: the chosen lines it leaves as they are, each with its number (``line``), name, ``kind`` and ``line_id``; ``skipped_notice``: the messages saying why it leaves those lines; ``binding``: this answer as one digest; send it back with the action to have the action refused (409 ``lines.preview_differs``), changing nothing, if it would now do anything else.
Parameters
Name
In
Required
Type
Description
entity_id
path
yes
string
Identifier of the requested Celerp record.
Request body
Field
Type
Required
Description
line_ids
array of string
--
The chosen lines, each by its line id.
line_entity_ids
array of string
--
The chosen lines, each by the item it binds; each item must be on exactly one line.
idempotency_key
string, optional
--
Names one submission: sending it again returns the first result.
dry_run
boolean
--
Answer what the action would do, as the action itself decides it, and change nothing: the lines it would act on, leave and take back, or the refusal it would give, with its binding.
binding
string, optional
--
The binding of the preview the user confirmed. The action is refused (409 lines.preview_differs), changing nothing, when it would now act on, leave or take back other lines than that preview said.
quantities
object, optional
--
The quantity coming back per chosen line, by its line id (or its item id when lines are chosen by item). Omitted, or the whole quantity out: it all comes back. A smaller quantity is a partial return.
weights
object, optional
--
The returned lot's weight per line, for a parcel whose quantity does not imply it. Not stated for a part-returned parcel: unknown on both sides, never guessed.
pieces
object, optional
--
The returned lot's pieces per line, for a parcel whose quantity does not imply them. Not stated for a part-returned parcel: unknown on both sides, never guessed.
Work out the tax of an issued memo, entered as an amount with no rate, at a rate instead
(memo_tax_rate_money), so part of the memo can be invoiced. With ``dry_run``, the figures it
would store and their binding, writing nothing and holding no lock. A memo whose rate cannot
be set is refused for that alone (its preview was refused too, so there is no binding to
compare); otherwise the write stores only the preview whose binding it sends.