POST
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
accounts
/
{account_id}
/
balances
Create a Balance
curl --request POST \
  --url https://transaction.sandbox.midaz.io/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/balances \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "key": "string",
  "allowSending": true,
  "allowReceiving": true
}'
{
  "id": "string",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "ledgerId": "a2873d47-59a8-4daf-a325-cb2c04557dd7",
  "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
  "alias": "string",
  "key": "string",
  "assetCode": "string",
  "available": "1000.00",
  "onHold": "50.00",
  "version": 0,
  "accountType": "string",
  "allowSending": true,
  "allowReceiving": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string
required

The type of media of the resource. Must be application/json.

X-Request-Id
string

A unique identifier used to trace and track each request.

Path Parameters

organization_id
string
required

The unique identifier of the Organization associated with the Ledger.

ledger_id
string
required

The unique identifier of the associated Ledger.

account_id
string
required

The unique identifier of the account of which you want to retrieve the balances.

Body

application/json
key
string
required

The unique identifier for the balance in the context of the account.

allowSending
boolean

If true, indicates that the balance can be used to send transactions.

allowReceiving
boolean

If true, indicates that the balance can be used to receive transactions.

Response

Indicates that the request was successful and the response contains the expected data.

id
string

The unique identifier of the Balance.

organizationId
string<uuid>

The unique identifier of the Organization.

ledgerId
string<uuid>

The unique identifier of the Ledger.

accountId
string<uuid>

The unique identifier of the Account.

alias
string

The alias for the account used in the operation.

key
string

The unique identifier for the balance in the context of the account.

assetCode
string

The name of the asset used in the operation.

available
string

Previous available balance.

onHold
string

Amount on hold/reserved.

version
integer

Balance version, which is updated with each transaction.

accountType
string

The type of account.

allowSending
boolean

If true, indicates that the balance can be used to send transactions.

allowReceiving
boolean

If true, indicates that the balance can be used to receive transactions.

createdAt
string<date-time>

Timestamp of creation (UTC).

updatedAt
string<date-time>

Timestamp of last update (UTC).

deletedAt
string<date-time> | null

Timestamp of soft deletion, if applicable (UTC).