POST
/
v0
/
ledgers
/
{ledger_id}
/
transactions
Authorization
Header
Path
Body
curl --request POST \
  --url https://api.sandbox.teal.dev/v0/ledgers/{ledger_id}/transactions \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'teal-instance-id: <teal-instance-id>' \
  --data '[
  {
    "amount": 100,
    "datetime": "2022-01-01T00:00:00Z",
    "description": "Shell Gas Bar 4124",
    "id": "t_9237232",
    "metadata": {
      "location": "TX, USA",
      "vendor_type": "Gas station"
    }
  }
]'
{
  "created_datetime": "2022-01-01T00:00:00Z",
  "error": {},
  "id": "UjL3BQnEaJtecuC7CUeDk",
  "ledger_id": "9jXyj7EpZNizehSd9wJN3G",
  "status": "pending",
  "updated_datetime": "2022-01-01T00:00:00Z"
}

Authorizations

Authorization
string
headerrequired

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

Headers

teal-instance-id
string
required

The Teal instance ID

Path Parameters

ledger_id
string
required

The ledger ID

Body

application/json · object[]
amount
required
datetime
string
required

Datetime of the transaction.

description
string
required
id
string
required

The ID of the transaction. The ID is unique per ledger.

metadata
object | null

Any metadata that you would like to associate with the transaction. This metadata will be available to the auto-categorization pipeline for assistance in properly categorizing the transaction automatically. This metadata is entirely configurable by you; this parameter will accept any key-value pairs you care to submit with the transaction for later use.

Response

202 - application/json
created_datetime
string
required

The date the transaction processing task object was created.

error
object | null
required

Any error that was encountered while processing transactions.

id
string
required
ledger_id
string | null
required

The ledger ID.

status
enum<string>
required
Available options:
pending,
failed,
complete
updated_datetime
string | null
required

The date the transaction processing task task was last updated.