Record that this booking is provisional, naming the document that would settle it
const url = 'https://example.com/v1/entities/example/entries/example/awaiting-document';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"awaiting":"example","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/awaiting-document \ --header 'Content-Type: application/json' \ --data '{ "awaiting": "example", "reason": "example" }'Mark a posted booking as resting on an assumption that an awaited document may overturn.
The booking stands. This is not a draft and not a doubt about the amount: the entry stays posted and counts
in every report, because a cost belongs in the month it happened, at the best figure available. Calling this
again for the same entry restates the expectation. Filing the awaited document against the entry
(POST /entries/{id}/documents) settles it.
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”Record that a booking is provisional: it stands, and a named document is expected that may change it.
awaiting is required because what is expected is the whole content of the state: “this is provisional”
without saying what would settle it helps nobody. Submitting again for an entry already awaiting something
restates the expectation rather than opening a second one.
object
The document that would settle this, in a phrase
Why it was booked this way meanwhile; kept in the record
Example generated
{ "awaiting": "example", "reason": "example"}Responses
Section titled “Responses”Successful Response
object
object
Awaiting | met | withdrawn
Every record about this entry, oldest first
object
Awaiting | met | withdrawn
object
Example generated
{ "entity_id": "example", "legal_name": "example", "base_currency": "example", "snapshot_seq": 1, "expectation": { "id": "example", "entry_id": "example", "state": "example", "awaiting": "example", "reason": "example", "evidence_id": "example", "supersedes_id": "example", "created_at": "example", "created_by": "example" }, "history": [ { "id": "example", "entry_id": "example", "state": "example", "awaiting": "example", "reason": "example", "evidence_id": "example", "supersedes_id": "example", "created_at": "example", "created_by": "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": {} }}