Skip to main content
POST
/
v0
/
ledgers
/
{ar_ledger_id}
/
receivables
Create Receivable
curl --request POST \
  --url https://api.sandbox.teal.dev/v0/ledgers/{ar_ledger_id}/receivables \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'teal-instance-id: <teal-instance-id>' \
  --data '
{
  "id": "<string>",
  "datetime": "2023-11-07T05:31:56Z",
  "due_datetime": "2023-11-07T05:31:56Z",
  "lines": [
    {
      "ledger_id": "<string>",
      "description": "<string>",
      "amount": 10237.23,
      "tag_ids": [
        "<string>"
      ]
    }
  ],
  "metadata": {}
}
'
{
  "id": "<string>",
  "ledger_id": "<string>",
  "datetime": "2023-11-07T05:31:56Z",
  "due_datetime": "2023-11-07T05:31:56Z",
  "lines": [
    {
      "id": "<string>",
      "ledger_id": "<string>",
      "description": "<string>",
      "amount": 123,
      "adjusted_amount": 123,
      "adjustments": [
        {
          "id": "<string>",
          "receivable_line_id": "<string>",
          "description": "<string>",
          "datetime": "2023-11-07T05:31:56Z",
          "amount": 123,
          "metadata": {},
          "files": [
            {
              "id": "<string>",
              "file_name": "credit.pdf"
            }
          ]
        }
      ],
      "tags": [
        {
          "id": "<string>",
          "name": "<string>",
          "tag_group_id": "<string>"
        }
      ]
    }
  ],
  "metadata": {},
  "files": [
    {
      "id": "<string>",
      "file_name": "invoice.pdf"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

teal-instance-id
string
required

The Teal instance ID

modified-by
string | null

An optional identifier for audit logging.

Path Parameters

ar_ledger_id
string
required

The AR ledger ID

Body

application/json
id
string
required

The ID of the receivable. Must be unique per ledger.

Minimum string length: 1
datetime
string<date-time>
required

The datetime that the receivable was created.

due_datetime
string<date-time>
required

The datetime that the receivable is due.

lines
ReceivableLineCreate · object[]
required

The line items of the receivable.

metadata
Metadata · object

Any metadata that you would like to associate with the receivable.

Response

Successful Response

id
string
required
ledger_id
string
required
datetime
string<date-time>
required

The datetime that the invoice was created.

due_datetime
string<date-time>
required

The datetime that the invoice is due.

lines
ReceivableLine · object[] | null
required

Expandable. The line items of the receivable.

metadata
Metadata · object

Metadata associated with the receivable.

files
ReceivableFile · object[] | null

The files associated with this receivable.