Skip to main content
Create a transaction

Authorizations

Authorization
string
header
required

Personal API token created in Visor Settings

Headers

Idempotency-Key
string
required

A value you choose for this create, 1 to 128 letters, digits, or - _ . :. Send the same value when you retry. A UUID per create works well.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_\-.:]+$

Path Parameters

space_id
string<uuid>
required

A space id from GET /v1/spaces

Body

application/json

The transaction to record

account_id
string<uuid>
required

An account of the space. Its currency is the transaction's.

amount
string<decimal>
required

Positive decimal string with up to 2 decimal places. type gives the direction.

Pattern: ^\d{1,13}(\.\d{1,2})?$
Example:

"42.90"

category_id
string<uuid>
required

A category of the space

description
string
required
Required string length: 1 - 255
transacted_at
string<date-time>
required

RFC 3339 date and time, with an offset such as -03:00 or Z. A future time records a pending transaction.

type
enum<string>
required
Available options:
debit,
credit
ignored
boolean
default:false
merchant_name
string
Maximum string length: 255
notes
string
Maximum string length: 500
tag_ids
string<uuid>[]
Maximum array length: 20

Response

The created transaction, or the one already recorded with the same key

data
Transaction · object | null
required