Saltar al contenido principal
POST
/
v1
/
estimates
Simular tarifas de una transacción
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": "Prueba de tarifa",
    "send": {
      "asset": "BRL",
      "value": 400000,
      "scale": 2,
      "source": {
        "from": [
          {
            "amount": {
              "scale": 2,
              "asset": "BRL",
              "value": 400000
            },
            "account": "@account",
            "description": "Nueva transacción",
            "chartOfAccounts": "PIX_DEBIT"
          }
        ]
      },
      "distribute": {
        "to": [
          {
            "amount": {
              "scale": 2,
              "asset": "BRL",
              "value": 400000
            },
            "account": "@account10",
            "chartOfAccounts": "PIX_CREDIT",
            "description": "Nueva transacción"
          }
        ]
      }
    }
  }
}'
{
  "segmentId": null,
  "ledgerId": "01962515-e02a-7eac-b616-5d0df19c3400",
  "transaction": {
    "chartOfAccountsGroupName": "FEES",
    "description": "Prueba de tarifa",
    "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

El token de autorización. </b>Este encabezado es obligatorio si tu entorno tiene habilitado el plugin Acces Manager</b>.

Content-Type
string
required

El tipo de contenido de la solicitud.

X-Organization-Id
string
required

Identificador único de la organización asociada con la solicitud.

X-lerian-Id
string

Identificador único del cliente de Lerian.

Body

application/json
packageId
string
required

Identificador único del paquete de tarifas.

ledgerId
string
required

Identificador único del libro contable al que está vinculado este paquete de tarifas en el Midaz Ledger.

transactions
object
required

Response

200 - application/json
segmentId
null
required

Identificador único del segmento asociado con la solicitud.

ledgerId
string
required

Identificador único del libro contable asociado con la solicitud.

transaction
object
required