API reference
Refund requests
Refunds asked by email of vendors that charged after you cancelled them, each with what it asked back and where it went.
- GET
/v1/refund_requestsList the refunds asked of vendors - POST
/v1/refund_requestsAsk a vendor that charged after it stopped for a refund - GET
/v1/refund_requests/{request_id}Get a refund asked of a vendor
Guides: Close the month, Work the inbox
List the refunds asked of vendors
GET/v1/refund_requests
client.refundRequests.list()
The refunds asked of vendors, the newest first: each person's ask, and LedgerIt's one reminder of it two weeks on when nothing came back.
Parameters
| Name | Type | Description |
|---|---|---|
counterparty_idQuery | string or null | An id that starts with |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/refund_requests" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Ask a vendor that charged after it stopped for a refund
POST/v1/refund_requests· Idempotent
client.refundRequests.create()
Ask a vendor that charged after it stopped billing for the money back. One email, in the company's name, naming the month the vendor was to stop billing from and what it has charged since and not refunded, with its reply going to the company's email (else the caller's). The refund, when it lands on the bank or card, closes the Inbox items about the charges itself. Recorded only once the mail service took the email; a vendor is asked at most once a day. In demo books the ask is recorded and no email goes.
Request body
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X POST "https://api.ledgerit.ai/v1/refund_requests" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"counterparty_id":"…"}'Get a refund asked of a vendor
GET/v1/refund_requests/{request_id}
client.refundRequests.get()
One refund asked of a vendor.
Parameters
| Name | Type | Description |
|---|---|---|
request_idPath · Required | string | An id that starts with |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/refund_requests/{request_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
RefundRequestPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of RefundRequestOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
RefundRequestCreate
| Name | Type | Description |
|---|---|---|
counterparty_idRequired | string | The vendor to ask: one a person said stopped billing ( |
email | string or null | Where to send it. Left out, the vendor's own email, else the address its last emailed bill came from. |
RefundRequestOut
One email asking a vendor that charged after it stopped billing for the money back.
| Name | Type | Description |
|---|---|---|
amountRequired | string | What the email asked back, in |
chargesRequired | integer | How many charges since the vendor stopped the email counted. |
counterparty_idRequired | string | The vendor it was asked of. |
currencyRequired | string | The books' currency. |
idRequired | string | An id that starts with |
remindsRequired | string or null | An id that starts with |
reply_toRequired | string | Where the vendor's reply goes: the company's email, else the address of the person who asked. |
requested_byRequired | string or null | An id that starts with |
sent_atRequired | string (date-time) | When the mail service took the email. |
sent_toRequired | string | The address the email went to. |
stopped_billing_inRequired | string (date) | The first day of the month the vendor was said to stop billing from, as it stood when asked: the charges since then are what the email asked back. |