REST API

Received API

Received documents API for documents other Celerp users shared with you: list and review them, book one as your own draft, and bring a booked draft up to date with the sender's latest revision.

Generated from the Celerp 2.5.0 OpenAPI schema, 21 September 2026.

GET /docs/received

List Received Documents

List the documents other Celerp users shared with you, newest first. Each entry shows the sender, their document number and total, when it last arrived, and the draft it was booked as, if any.

Responses

StatusDescriptionBody
200Returns the received documents.object

Example

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

GET /docs/received/{rid}

Get Received Document

Return a received document as the sender last sent it, with every revision received so far, newest first, and the status of the draft it was booked as, if any. Received documents are not part of your books.

Parameters

NameInRequiredTypeDescription
ridpathyesstringIdentifier of the received document.

Responses

StatusDescriptionBody
200Returns the received document.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

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

POST /docs/received/{rid}/book

Book Received Document

Create your own draft from a received document: an invoice you received becomes a bill, a quotation becomes a purchase order. A document is booked at most once; booking it again returns the same draft. A purchase order can only be booked as a quotation when the quotation can hold its currency and total exactly; one with shipping or compound tax is rejected, with the reason.

Parameters

NameInRequiredTypeDescription
ridpathyesstringIdentifier of the received document.

Responses

StatusDescriptionBody
200Returns the identifier and kind of the draft.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/docs/received/:rid/book \
  -H "Authorization: Bearer $TOKEN"

POST /docs/received/{rid}/mark-reconciled

Mark Received Document Reconciled

Record that the draft booked from this received document was brought in line with the sender's latest revision by hand. The draft itself is not changed; later revisions can be applied with Update draft again.

Parameters

NameInRequiredTypeDescription
ridpathyesstringIdentifier of the received document.

Responses

StatusDescriptionBody
200Returns the identifier and kind of the draft.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/docs/received/:rid/mark-reconciled \
  -H "Authorization: Bearer $TOKEN"

POST /docs/received/{rid}/update-draft

Update Draft From Received Document

Apply the sender's latest revision to the draft booked from this document. Only a draft that has not been changed since booking or its last update can be updated this way, and only while the revision keeps the same document type and currency; otherwise the call is rejected and the draft is left as it is.

Parameters

NameInRequiredTypeDescription
ridpathyesstringIdentifier of the received document.

Responses

StatusDescriptionBody
200Returns the identifier and kind of the updated draft.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/docs/received/:rid/update-draft \
  -H "Authorization: Bearer $TOKEN"