File a document against an entry: what this booking rests on, and where in the file it says so
const url = 'https://example.com/v1/entities/example/entries/example/documents';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"document_id":"example","locator":"example","caption":"example","page":1,"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/entities/example/entries/example/documents \ --header 'Content-Type: application/json' \ --data '{ "document_id": "example", "locator": "example", "caption": "example", "page": 1, "reason": "example" }'File a registered document against an entry, so “treatment follows the document” can be checked.
An entry booked gross because no deductible document existed, and one booked net because a full invoice
did, differ by the document, so the document has to be reachable from the entry. It is linked through the
same evidence_links chain the statement loader uses, and GET /provenance?entry_id= reads it back.
A closed period does not refuse this. A late invoice for a closed month is ordinary, and filing it changes nothing that month reports (migration 0004).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The entity this path is relative to
The entity this path is relative to
Request Bodyrequired
Section titled “Request Bodyrequired”File an already-registered document against an entry.
locator is where in the document the relevant part is; caption is what it is. A closed period does
not refuse this: an evidence link has no amount and no date of its own, so filing a late invoice against a
closed month’s entry changes nothing that month reports.
object
A document from POST /documents
Where in the document the relevant part is
What this document is, in a sentence
Why it belongs on this entry; kept in the record
Example generated
{ "document_id": "example", "locator": "example", "caption": "example", "page": 1, "reason": "example"}Responses
Section titled “Responses”Successful Response
object
object
object
object
Example generated
{ "entity_id": "example", "legal_name": "example", "base_currency": "example", "snapshot_seq": 1, "filing": { "id": "example", "entry_id": "example", "document_id": "example", "page": 1, "locator": "example", "caption": "example", "document": {}, "created_at": "example", "created_by": "example", "met_expectation_id": "example" }, "links": { "additionalProperty": "example" }}Bad Request
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Unauthorized
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Forbidden
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Not Found
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Conflict
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Precondition Failed
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Unprocessable Content
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Internal Server Error
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Service Unavailable
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}