Skip to content

File a document against an entry: what this booking rests on, and where in the file it says so

POST
/v1/entities/{entity_id}/entries/{entry_id}/documents
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).

entry_id
required
Entry Id
string
entity_id
required
Entity Id

The entity this path is relative to

string

The entity this path is relative to

Media typeapplication/json
DocumentFilingSubmission

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
document_id
required
Document Id

A document from POST /documents

string
>= 1 characters <= 255 characters
locator
required
Locator

Where in the document the relevant part is

string
>= 1 characters <= 512 characters
caption
required
Caption

What this document is, in a sentence

string
>= 1 characters <= 1024 characters
page
Any of:
integer
>= 1
reason
required
Reason

Why it belongs on this entry; kept in the record

string
>= 1 characters

Example generated

{
"document_id": "example",
"locator": "example",
"caption": "example",
"page": 1,
"reason": "example"
}

Successful Response

Media typeapplication/json
EntryFilingResponse
object
entity_id
required
Entity Id
string
legal_name
required
Legal Name
string
base_currency
required
Base Currency
string
snapshot_seq
required
Snapshot Seq
integer
filing
required
EntryFiling
object
id
required
Id
string
entry_id
required
Entry Id
string
document_id
required
Document Id
string
page
required
Any of:
integer
locator
required
Locator
string
caption
required
Caption
string
document
required
Document
object
key
additional properties
any
created_at
required
Created At
string
created_by
required
Created By
string
met_expectation_id
Any of:
string
links
required
Links
object
key
additional properties
string

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

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Unauthorized

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Forbidden

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Not Found

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Conflict

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Precondition Failed

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Unprocessable Content

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Internal Server Error

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Service Unavailable

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}