POST
/
v0
/
ledgers
/
{ledger_id}
/
transactions
curl --request POST \
  --url https://api.sandbox.teal.dev/v0/ledgers/{ledger_id}/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'teal-instance-id: <teal-instance-id>' \
  --data '[
  {
    "id": "t_9237232",
    "amount": 132629.38,
    "datetime": "2024-03-15T15:28:53Z",
    "description": "Payroll March 15 2024",
    "metadata": {},
    "tag_ids": [
      "<string>"
    ]
  }
]'
{
  "id": "UjL3BQnEaJtecuC7CUeDk",
  "status": "pending",
  "created_datetime": "2024-01-01T00:00:00Z",
  "updated_datetime": [
    "2024-01-01T00:00:00Z"
  ],
  "error": {
    "error_type": "API_ERROR",
    "error_code": "INTERNAL_SERVER_ERROR",
    "error_message": "An unexpected error occurred.",
    "display_message": "Something went wrong.",
    "request_id": "KipL51BWnPIpOmi",
    "causes": [
      {
        "error_type": "API_ERROR",
        "error_code": "INTERNAL_SERVER_ERROR",
        "error_message": "An unexpected error occurred.",
        "display_message": "Something went wrong.",
        "request_id": "KipL51BWnPIpOmi",
        "causes": [
          {
            "error_type": "API_ERROR",
            "error_code": "INTERNAL_SERVER_ERROR",
            "error_message": "An unexpected error occurred.",
            "display_message": "Something went wrong.",
            "request_id": "KipL51BWnPIpOmi",
            "causes": [
              {
                "error_type": "API_ERROR",
                "error_code": "INTERNAL_SERVER_ERROR",
                "error_message": "An unexpected error occurred.",
                "display_message": "Something went wrong.",
                "request_id": "KipL51BWnPIpOmi",
                "causes": [
                  {
                    "error_type": "API_ERROR",
                    "error_code": "INTERNAL_SERVER_ERROR",
                    "error_message": "An unexpected error occurred.",
                    "display_message": "Something went wrong.",
                    "request_id": "KipL51BWnPIpOmi",
                    "causes": [
                      {
                        "error_type": "API_ERROR",
                        "error_code": "INTERNAL_SERVER_ERROR",
                        "error_message": "An unexpected error occurred.",
                        "display_message": "Something went wrong.",
                        "request_id": "KipL51BWnPIpOmi",
                        "causes": [
                          "<any>"
                        ],
                        "status": 500,
                        "documentation_url": "https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error",
                        "suggested_action": "<string>"
                      }
                    ],
                    "status": 500,
                    "documentation_url": "https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error",
                    "suggested_action": "<string>"
                  }
                ],
                "status": 500,
                "documentation_url": "https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error",
                "suggested_action": "<string>"
              }
            ],
            "status": 500,
            "documentation_url": "https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error",
            "suggested_action": "<string>"
          }
        ],
        "status": 500,
        "documentation_url": "https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error",
        "suggested_action": "<string>"
      }
    ],
    "status": 500,
    "documentation_url": "https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error",
    "suggested_action": "<string>"
  },
  "source_account_id": "<string>",
  "ledger_id": "7JRNsKwy2Lw66caxVU7WGC",
  "created_transaction_ids": [
    "<string>"
  ],
  "removed_transaction_ids": [
    "<string>"
  ],
  "modified_transaction_ids": [
    "<string>"
  ],
  "skipped_transaction_ids": [
    "<string>"
  ]
}

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[]
id
string
required

The unique ID of the object. This is used as an idempotency key to prevent duplicates. This is manually set as part of the create transactions request. If the transaction is created via a data integration, Plaid for example, it will be set to the transaction_id to enforce idempotency with the data source.

amount
required

The value of the transaction in decimal dollar cents.

datetime
string
required

The UTC datetime that the Transaction was created. This will never be before an Instance's entries_start date. When importing transactions, transactions whose datetime is before the Instance’s entries_start date will be skipped. Other transactions will be processed as normal.

description
string
required

An arbitrary string on the object, useful for displaying information to the user.

metadata
object | null

Arbitrary structured information about the transaction. This could be location of the transaction to display to the user or vendor information to use as part of a Platform or Instance categorization rule. Teal does not use metadata for any accounting purposes.

tag_ids
string[] | null

An array of IDs of the Tag objects associated with the Transaction.

Note that Tags are not transitive and the tags on a Transaction can be different than those on its line entry or entires.

Response

202 - application/json
id
string
required
status
enum<string>
required

Indicates the status of the task.

Available options:
pending,
failed,
complete
created_datetime
string
required

Indicates the datetime in UTC when the task was created.

updated_datetime
string | null
required

Indicates the datetime in UTC when the task was last updated.

error
object | null
required

The Error object if any errors were encountered in the processing. If the processing task was created by a Plaid import, the Plaid errors will be passed through there. See Plaid's documentation for more information on their error messages.

source_account_id
string
required

The source account containing the transactions

ledger_id
string | null
required

The ID of the ledger that the transactions are being created for.

created_transaction_ids
string[] | null

The IDs of Transactions successfully processed by this task.

removed_transaction_ids
string[] | null

The IDs of Transactions that were removed by this task.

modified_transaction_ids
string[] | null

The IDs of Transactions that were modified by this task.

skipped_transaction_ids
string[] | null

The IDs of Transactions that were skipped by this task.