Say which existing posting(s) this line is, and for how much; posts nothing
const url = 'https://example.com/v1/entities/example/lines/example/link';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"parts":[{"posting_id":"example","amount":"-12.00"}],"reason":"example","id":"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/lines/example/link \ --header 'Content-Type: application/json' \ --data '{ "parts": [ { "posting_id": "example", "amount": "-12.00" } ], "reason": "example", "id": "example" }'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”Say which existing posting(s) this line is, and for how much. This posts nothing.
Several parts make a split: one line explained by two or more postings. A sum short of the line’s amount is a partial allocation, a real state that the line reports and the close refuses until it is completed.
object
One part of a split: an existing posting, and how much of the line it is.
A posting is named by id: it has no path, and naming its account would not say which leg. The amount is in the line’s own commodity, the only commodity a part can be in.
object
Signed decimal amount in whole commodity units, as a string; never a JSON number. Converted by the commodity’s declared precision, so more decimal places than the currency has is refused rather than rounded.
Responses
Section titled “Responses”Successful Response
object
What has become of one statement line.
status is derived from the live explanation, never stored, so there is exactly one answer.
unexplained_micros is the remainder, reported in every state including a fully explained line, where it
is "0". history is every explanation ever written for this line, oldest first.
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Unexplained | partly_explained | booked | linked | ignored | superseded_input
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
One thing somebody said about a line. The chain of these is the line’s history.
object
Booked | linked | ignored
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
One thing somebody said about a line. The chain of these is the line’s history.
object
Booked | linked | ignored
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
The entries this line is booked or linked to, oldest first
An entry a statement line is explained by, with the mirror that already reverses it, if any.
object
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
object
object
Example
{ "line": { "amount_micros": "-12000000", "allocated_micros": "-12000000", "unexplained_micros": "-12000000", "explanation": { "allocations": [ { "amount_micros": "-12000000" } ], "allocated_micros": "-12000000" }, "history": [ { "allocations": [ { "amount_micros": "-12000000" } ], "allocated_micros": "-12000000" } ], "entries": [ { "postings": [ { "amount_micros": "-12000000" } ] } ] }}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": {} }}