POST
/
v1
/
estimates
Simulate Transaction Fees
curl --request POST \
  --url http://127.0.0.1:4002/v1/estimates \
  --header 'Content-Type: <content-type>' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '{
  "packageId": "0196251d-a93a-7c42-9eef-c9f463470e21",
  "ledgerId": "01962515-e02a-7eac-b616-5d0df19c3400",
  "transaction": {
    "chartOfAccountsGroupName": "FEES",
    "description": "Test FEE",
    "send": {
      "asset": "BRL",
      "value": 400000,
      "scale": 2,
      "source": {
        "from": [
          {
            "amount": {
              "scale": 2,
              "asset": "BRL",
              "value": 400000
            },
            "account": "@account",
            "description": "New Transaction",
            "chartOfAccounts": "PIX_DEBIT"
          }
        ]
      },
      "distribute": {
        "to": [
          {
            "amount": {
              "scale": 2,
              "asset": "BRL",
              "value": 400000
            },
            "account": "@account10",
            "chartOfAccounts": "PIX_CREDIT",
            "description": "New Transaction"
          }
        ]
      }
    }
  }
}'
{
  "segmentId": null,
  "ledgerId": "01962515-e02a-7eac-b616-5d0df19c3400",
  "transaction": {
    "chartOfAccountsGroupName": "FEES",
    "description": "Teste FEE",
    "metadata": {
      "packageAppliedID": "0196251d-a93a-7c42-9eef-c9f463470e21"
    },
    "send": {
      "asset": "BRL",
      "value": 204500,
      "scale": 2,
      "source": {
        "from": [
          {
            "account": "@conta2",
            "amount": {
              "asset": "BRL",
              "value": 204500,
              "scale": 2
            },
            "chartOfAccounts": "PIX_DEBIT",
            "metadata": null
          }
        ]
      },
      "distribute": {
        "to": [
          {
            "account": "@conta10",
            "amount": {
              "asset": "BRL",
              "value": 190000,
              "scale": 2
            },
            "chartOfAccounts": "PIX_CREDIT",
            "metadata": null
          },
          {
            "account": "@fee1",
            "amount": {
              "asset": "BRL",
              "value": 4000,
              "scale": 2
            },
            "chartOfAccounts": "PIX_CREDIT",
            "metadata": null
          },
          {
            "account": "@fee2",
            "amount": {
              "asset": "BRL",
              "value": 500,
              "scale": 2
            },
            "chartOfAccounts": "PIX_CREDIT",
            "metadata": null
          },
          {
            "account": "@fee3",
            "amount": {
              "asset": "BRL",
              "value": 10000,
              "scale": 2
            },
            "chartOfAccounts": "PIX_CREDIT",
            "metadata": null
          }
        ]
      }
    }
  }
}

Headers

Authorization
string

The authorization token. </b>This header is required if your environment has the Acces Manager plugin enabled</b>.

Content-Type
string
required

The request content type.

X-Organization-Id
string
required

The unique identifier of the Organization associated with the request.

X-lerian-Id
string

The unique identifier of Lerian's client.

Body

application/json
packageId
string
required

Unique identifier of the Fee Package.

ledgerId
string
required

Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.

transactions
object
required

Response

200 - application/json
segmentId
null
required

Unique identifier of the Segment associated with the request.

ledgerId
string
required

Unique identifier of the Ledger associated with the request.

transaction
object
required