Transactions
Create Transactions
Creates transactions into a ledger. Returns transaction processing task.
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
headerrequiredThe access token received from the authorization server in the OAuth 2.0 flow.
Headers
teal-instance-id
string
requiredThe Teal instance ID
Path Parameters
ledger_id
string
requiredThe ledger ID
Body
application/json · object[]
amount
required
datetime
string
requiredDatetime of the transaction.
description
string
requiredid
string
requiredThe 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
requiredThe date the transaction processing task object was created.
error
object | null
requiredAny error that was encountered while processing transactions.
id
string
requiredledger_id
string | null
requiredThe ledger ID.
status
enum<string>
requiredAvailable options:
pending
, failed
, complete
updated_datetime
string | null
requiredThe date the transaction processing task task was last updated.
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"
}