API reference
Bill inbox
The address vendors send their bills to, and the emails sent there with what became of each.
- GET
/v1/bill_inboxGet the address vendors send bills to - GET
/v1/bill_inbox/emailsList the emails sent to the bills address - POST
/v1/bill_inbox/rotateReplace the bills address
Guides: Enter and approve vendor bills
Get the address vendors send bills to
GET/v1/bill_inbox
client.billInbox.get()
The address vendors send their bills to. Each PDF or photo attached to an email sent there, by anyone, becomes a vendor's invoice waiting to be entered as a bill.
Response
200BillInboxOut
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/bill_inbox" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"List the emails sent to the bills address
GET/v1/bill_inbox/emails
client.billInbox.listEmails()
Emails sent to the bills address, newest first, with what became of each: kept, with how many bills it brought, or refused because nothing attached was a PDF or a photo.
Parameters
| Name | Type | Description |
|---|---|---|
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/bill_inbox/emails" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Replace the bills address
POST/v1/bill_inbox/rotate· Idempotent
client.billInbox.rotate()
Replace the bills address with a new one. The old one reaches nothing from now on: for an address that draws mail it should not.
Response
200BillInboxOut
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/bill_inbox/rotate" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"Objects
The objects these operations take and return.
BillInboxOut
| Name | Type | Description |
|---|---|---|
addressRequired | string or null | Where vendors send their bills. Null where this deployment does not receive email. |
ReceiptEmailPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of ReceiptEmailOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
ReceiptEmailOut
One email forwarded to the books' address, and what became of it.
| Name | Type | Description |
|---|---|---|
documents_keptRequired | integer | Receipts kept from it, once taken. |
idRequired | string | An id that starts with |
received_atRequired | string (date-time) | |
refusalRequired | string or null | Why nothing was kept: |
senderRequired | string | Who sent it, as the email says. |
statusRequired | string |
|
subjectRequired | string or null | |
taken_atRequired | string (date-time) or null |