Saltar al contenido principal
POST
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
operation-routes
Crear una Ruta de Operación
curl --request POST \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/operation-routes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "account": {
    "ruleType": "alias",
    "validIf": "@customer_brl_wallet"
  },
  "code": "EXT-001",
  "title": "Cashin from service charge",
  "description": "This operation route handles cash-in transactions from service charge collections",
  "metadata": {
    "customField1": "value1",
    "customField2": 123
  },
  "operationType": "source"
}
'
{
  "id": "01965ed9-7fa4-75b2-8872-fc9e8509ab0a",
  "organizationId": "01965ed9-7fa4-75b2-8872-fc9e8509ab0a",
  "ledgerId": "01965ed9-7fa4-75b2-8872-fc9e8509ab0a",
  "account": {
    "ruleType": "alias",
    "validIf": [
      "@account1"
    ]
  },
  "code": "EXT-001",
  "description": "This operation route handles cash-in transactions from service charge collections",
  "operationType": "source",
  "title": "Cashin from service charge",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "createdAt": "2021-01-01T00:00:00Z",
  "deletedAt": "2021-01-01T00:00:00Z",
  "updatedAt": "2021-01-01T00:00:00Z"
}

Autorizaciones

Authorization
string
header
requerido

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

Encabezados

Authorization
string

El token de autorización. Este encabezado es requerido si su entorno tiene el Access Manager habilitado.

Content-Type
string
requerido

El tipo de medio del recurso. Debe ser application/json.

X-Request-Id
string<uuid>

Un identificador único utilizado para rastrear y seguir cada solicitud.

Parámetros de ruta

organization_id
string
requerido

The unique identifier of the Organization associated with the Ledger.

ledger_id
string
requerido

The unique identifier of the associated Ledger.

Cuerpo

application/json
title
string
requerido

Short text summarizing the purpose of the operation. Used as an entry note for identification.

Maximum string length: 50
operationType
enum<string>
requerido

The type of the Operation Route.

Opciones disponibles:
source,
destination
account
object

Defines the rule for selecting the account that will participate in the operation (source or destination).

code
string

An external reference used to identify the operation route.

Maximum string length: 100
description
string

Detailed description of the Operation Route purpose and usage.

Maximum string length: 250
metadata
object

An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use 'costCenter': 'BR_11101997'.

Respuesta

Indica que el recurso fue creado exitosamente y la operación se completó como se esperaba.

title
string
requerido

Short text summarizing the purpose of the operation. Used as an entry note for identification.

Maximum string length: 50
operationType
enum<string>
requerido

The type of the Operation Route.

Opciones disponibles:
source,
destination
account
object

Defines the rule for selecting the account that will participate in the operation (source or destination).

code
string

An external reference used to identify the operation route.

Maximum string length: 100
description
string

Detailed description of the Operation Route purpose and usage.

Maximum string length: 250
metadata
object

An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use 'costCenter': 'BR_11101997'.