Operations API
Use the Operations API to list and update statements from transactions.
Last updated
Use the Operations API to list and update statements from transactions.
Last updated
GET
/v1/organizations/{{id}}/ledgers/{{id}}/accounts/{{id}}/operations
Use this endpoint to retrieve the information for all operations of one account.
Headers
Name | Value |
---|---|
Query parameters
Name | Type | Description |
---|---|---|
Response codes
[
{
"id": "d4cd4bee-9097-4f07-a8a4-144ee5eee4db",
"transactionId": "20e19dab-ce0c-43d6-aee3-0333c42d8a8c",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Purchase @ Apple",
"type": "DEBIT",
"assetCode": "BRL",
"chartOfAccounts": "card_purchase",
"amount": {
"amount": 5000,
"scale": 0
},
"balance": {
"available": 9500,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 4500,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": null,
"createdAt": "2024-03-27T15:50:13+0300",
"updatedAt": "2024-03-27T15:50:13+0300"
},
{
"id": "efe41323-3431-446c-a954-9a756fdea70b",
"transactionId": "78a0bf1e-a2e9-453f-8671-ea1766db2d0c",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Sending money to Satoshi",
"type": "DEBIT",
"assetCode": "BRL",
"chartOfAccounts": "BTC_TRANSFER_DEBIT_AMOUNT",
"amount": {
"amount": 500,
"scale": 0
},
"balance": {
"available": 10000,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 9500,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"blockName": "genesis"
},
"createdAt": "2024-02-12T11:13:21+0300",
"updatedAt": "2024-02-12T12:49:03+0300"
},
{
"id": "f4f22017-9fca-4742-a0f3-a7607017428f",
"transactionId": "3f60bad0-592e-4403-8f73-1ed53b2a67b2",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "My first transaction using Midaz!",
"type": "CREDIT",
"assetCode": "BRL",
"chartOfAccounts": "PIX_IN_CREDIT_AMOUNT",
"amount": {
"amount": 10000,
"scale": 0
},
"balance": {
"available": 0,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 10000,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"anyKey": "anyValue",
"anotherKey": "anotherValue"
},
"createdAt": "2024-01-29T00:12:00+0300",
"updatedAt": "2024-01-29T00:12:00+0300"
}
]
[ ]
GET
/v1/organizations/{{id}}/ledgers/{{id}}/accounts/{{id}}/operations/{{id}}
Use this endpoint to retrieve the information of a specific operation for a specific account using the identifier (id
).
Headers
Response codes
{
"id": "efe41323-3431-446c-a954-9a756fdea70b",
"transactionId": "78a0bf1e-a2e9-453f-8671-ea1766db2d0c",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Sending money to Satoshi",
"type": "DEBIT",
"asseetCode": "BRL",
"chartOfAccounts": "BTC_TRANSFER_DEBIT_AMOUNT",
"amount": {
"amount": 500,
"scale": 0
},
"balance": {
"available": 10000,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 9500,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"blockName": "genesis"
},
"createdAt": "2024-02-12T11:13:21+0300",
"updatedAt": "2024-02-12T12:49:03+0300"
}
{
"code": "0007",
"title": "Entity not found",
"description": "Entity not found for the ID informed. Check if you are sending the correct ID for the entity that you are managing."
}
GET
/v1/organizations/{{id}}/ledgers/{{id}}/portfolios/{{id}}/operations
Use this endpoint to retrieve all operations for a specific portfolio.
[
{
"id": "d4cd4bee-9097-4f07-a8a4-144ee5eee4db",
"transactionId": "20e19dab-ce0c-43d6-aee3-0333c42d8a8c",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Purchase @ Apple",
"type": "DEBIT",
"assetCode": "BRL",
"chartOfAccounts": "card_purchase",
"amount": {
"amount": 5000,
"scale": 0
},
"balance": {
"available": 9500,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 4500,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": null,
"createdAt": "2024-03-27T15:50:13+0300",
"updatedAt": "2024-03-27T15:50:13+0300"
},
{
"id": "d4cd4bee-9097-4f07-a8a4-144ee5eee4db",
"transactionId": "01c66ffd-10ae-4050-9a70-2124c0e7d811",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Purchase @ H&M",
"chartOfAccounts": "card_purchase",
"type": "DEBIT",
"assetCode": "USD",
"amount": {
"amount": 2999,
"scale": 2
},
"balance": {
"available": 130,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 10001,
"onHold": 0,
"scale": 2
},
"accountId": "3993d35b-f00c-46c8-8c51-1be010e8e2b9",
"accountAlias": "@johndoe/USD",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": null,
"createdAt": "2024-03-27T15:50:13+0300",
"updatedAt": "2024-03-27T15:50:13+0300"
},
{
"id": "efe41323-3431-446c-a954-9a756fdea70b",
"transactionId": "20e19dab-ce0c-43d6-aee3-0333c42d8a8c",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "ACH Transfer",
"type": "DEBIT",
"assetCode": "USD",
"chartOfAccounts": "ACH_transfer_debit_amount",
"amount": {
"amount": 500,
"scale": 0
},
"balance": {
"available": 630,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 130,
"onHold": 0,
"scale": 0
},
"accountId": "3993d35b-f00c-46c8-8c51-1be010e8e2b9",
"accountAlias": "@johndoe/USD",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"bank": "JP Morgan"
},
"createdAt": "2024-02-12T11:13:21+0300",
"updatedAt": "2024-02-12T12:49:03+0300"
},
{
"id": "bce8335f-f912-4ded-af8c-5a198d24b95f",
"transactionId": "0d67be49-6046-4475-9ca8-9f0e47fcf197",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "USD Wire transfer received from Stripe",
"type": "CREDIT",
"assetCode": "USD",
"chartOfAccounts": "wire_transfer_int_credit_amount",
"amount": {
"amount": 630,
"scale": 0
},
"balance": {
"available": 0,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 630,
"onHold": 0,
"scale": 0
},
"accountId": "3993d35b-f00c-46c8-8c51-1be010e8e2b9",
"accountAlias": "@johndoe/USD",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"stripeId": "GABS123123138721831",
"stripeFee": 399
},
"createdAt": "2024-01-29T00:12:00+0300",
"updatedAt": "2024-01-29T00:12:00+0300"
},
{
"id": "efe41323-3431-446c-a954-9a756fdea70b",
"transactionId": "78a0bf1e-a2e9-453f-8671-ea1766db2d0c",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Sending money to Satoshi",
"type": "DEBIT",
"assetCode": "BRL",
"chartOfAccounts": "BTC_TRANSFER_DEBIT_AMOUNT",
"amount": {
"amount": 500,
"scale": 0
},
"balance": {
"available": 10000,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 9500,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"blockName": "genesis"
},
"createdAt": "2024-02-12T11:13:21+0300",
"updatedAt": "2024-02-12T12:49:03+0300"
},
{
"id": "f4f22017-9fca-4742-a0f3-a7607017428f",
"transactionId": "3f60bad0-592e-4403-8f73-1ed53b2a67b2",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "My first transaction using Midaz!",
"type": "CREDIT",
"assetCode": "BRL",
"chartOfAccounts": null,
"amount": {
"amount": 10000,
"scale": 0
},
"balance": {
"available": 0,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 10000,
"onHold": 0,
"scale": 0
},
"accountId": "ab7e7eee-92fc-4f82-82ff-71efa1a9a7ac",
"accountAlias": "@johndoe",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"anyKey": "anyValue",
"anotherKey": "anotherValue"
},
"createdAt": "2024-01-29T00:12:00+0300",
"updatedAt": "2024-01-29T00:12:00+0300"
}
]
[ ]
GET
/v1/organizations/{{id}}/ledgers/{{id}}/portfolio/{{id}}/operations/{{id}}
Use this endpoint to retrieve a specific operation for a specific portfolio.
{
"id": "bce8335f-f912-4ded-af8c-5a198d24b95f",
"transactionId": "0d67be49-6046-4475-9ca8-9f0e47fcf197",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "USD Wire transfer received from Stripe",
"type": "CREDIT",
"assetCode": "USD",
"chartOfAccounts": "wire_received_credit_amount",
"amount": {
"amount": 630,
"scale": 0
},
"balance": {
"available": 0,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 630,
"onHold": 0,
"scale": 0
},
"accountId": "3993d35b-f00c-46c8-8c51-1be010e8e2b9",
"accountAlias": "@johndoe/USD",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"stripeId": "GABS123123138721831",
"stripeFee": 399
},
"createdAt": "2024-01-29T00:12:00+0300",
"updatedAt": "2024-01-29T00:12:00+0300"
}
{
"code": "0007",
"title": "Entity not found",
"description": "Entity not found for the ID informed. Check if you are sending the correct ID for the entity that you are managing."
}
PATCH
/v1/organizations/{{id}}/ledgers/{{id}}/transactions/{{id}}/operations/{{id}}
Use this endpoint to edit and update the information of a specific Operation. When you update a Product, the following fields can be edited:
metadata
description
Headers
{
"metadata": {
"whoAmI": "John Doe"
},
"description": "Operation made at 2024-01-29T00:12:00+0300 by John Doe"
}
Response codes
{
"id": "bce8335f-f912-4ded-af8c-5a198d24b95f",
"transactionId": "0d67be49-6046-4475-9ca8-9f0e47fcf197",
"ledgerId": "77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
"organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
"description": "Operation made at 2024-01-29T00:12:00+0300 by Jhon Doe",
"type": "CREDIT",
"assetCode": "USD",
"chartOfAccounts": "wire_received_credit_amount",
"amount": {
"amount": 630,
"scale": 0
},
"balance": {
"available": 0,
"onHold": 0,
"scale": 0
},
"balanceAfter": {
"available": 630,
"onHold": 0,
"scale": 0
},
"accountId": "3993d35b-f00c-46c8-8c51-1be010e8e2b9",
"accountAlias": "@gabriel/USD",
"portfolioId": "a03d22a4-5afc-4b6f-86f4-ba341b34b152",
"metadata": {
"whoAmI": "John Doe"
},
"createdAt": "2024-01-29T00:12:00+0300",
"updatedAt": "2024-01-29T00:12:00+0300"
}
{
"code": "0007",
"title": "Entity not found",
"description": "Entity not found for the ID informed. Check if you are sending the correct ID for the entity that you are managing."
}
Name | Value |
---|---|
Value | |
---|---|
Name | Type | Description |
---|---|---|
Value | |
---|---|
Name | Value |
---|---|
Authorization
Bearer <token>
beginDate
endDate
metadata.{{key}}={{value}}
assetCode
type
transactionId
sort
Authorization
Bearer <token>
Authorization
Bearer <token>
beginDate
endDate
metadata.{{key}}={{value}}
assetCode
type
transactionId
sort
Authorization
Bearer <token>
Content-Type
application/json
Authorization
Bearer <token>