Saltar al contenido principal
POST
/
v1
/
contexts
Create a reconciliation context
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/contexts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Bank Reconciliation Q1",
  "type": "1:1",
  "interval": "daily",
  "feeToleranceAbs": "0.01",
  "feeTolerancePct": "0.5",
  "feeNormalization": "NET",
  "autoMatchOnUpload": false,
  "sources": [
    {
      "name": "Primary Bank Account",
      "type": "BANK",
      "side": "LEFT",
      "config": {},
      "mapping": {}
    }
  ],
  "rules": [
    {
      "priority": 1,
      "type": "EXACT",
      "config": {}
    }
  ]
}
'
{
  "id": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
  "tenantId": "019c96a0-0a98-7287-9a31-786e0809c769",
  "name": "Bank Reconciliation Q1",
  "type": "1:1",
  "interval": "daily",
  "status": "ACTIVE",
  "feeToleranceAbs": "0.50",
  "feeTolerancePct": "0.01",
  "feeNormalization": "NET",
  "autoMatchOnUpload": false,
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt

Use this file to discover all available pages before exploring further.

Autorizaciones

Authorization
string
header
requerido

Bearer token authentication (format: "Bearer {token}")

Encabezados

X-Request-Id
string

A unique identifier for tracing the request across services.

X-Idempotency-Key
string

Optional idempotency key for safe retries. Also accepts Idempotency-Key as an alternative header name. If the same key is sent again and the original request was already processed, the cached response is returned with X-Idempotency-Replayed: true.

See Retries and idempotency for details.

Cuerpo

application/json

Context creation payload

name
string
requerido
Required string length: 1 - 100
Ejemplo:

"Bank Reconciliation Q1"

type
enum<string>
requerido

Reconciliation topology (cardinality between sources)

Opciones disponibles:
1:1,
1:N,
N:M
Ejemplo:

"1:1"

interval
string
requerido
Required string length: 1 - 100
Ejemplo:

"daily"

feeToleranceAbs
string

Absolute fee tolerance amount

Ejemplo:

"0.01"

feeTolerancePct
string

Percentage fee tolerance

Ejemplo:

"0.5"

feeNormalization
enum<string>

Fee normalization mode

Opciones disponibles:
NET,
GROSS
Ejemplo:

"NET"

autoMatchOnUpload
boolean

Whether to trigger matching automatically after file upload

Ejemplo:

false

sources
object[]

Optional list of sources to create inline with the context

Maximum array length: 10
rules
object[]

Optional list of match rules to create inline with the context

Maximum array length: 50

Respuesta

Successfully created context.

The response includes the X-Idempotency-Replayed header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See Retries and idempotency for more details.

Configuration context for matching rules

id
string

Unique identifier for the context

Ejemplo:

"019c96a0-10a0-72d2-9fb0-2b7de8093182"

tenantId
string

Tenant ID this context belongs to

Ejemplo:

"019c96a0-0a98-7287-9a31-786e0809c769"

name
string

Name of the reconciliation context

Ejemplo:

"Bank Reconciliation Q1"

type
enum<string>

Reconciliation topology type

Opciones disponibles:
1:1,
1:N,
N:M
Ejemplo:

"1:1"

interval
string

Execution interval

Ejemplo:

"daily"

status
enum<string>

Current status of the context

Opciones disponibles:
DRAFT,
ACTIVE,
PAUSED,
ARCHIVED
Ejemplo:

"ACTIVE"

feeToleranceAbs
string

Absolute fee tolerance amount

Ejemplo:

"0.50"

feeTolerancePct
string

Percentage fee tolerance

Ejemplo:

"0.01"

feeNormalization
enum<string>

Fee normalization mode

Opciones disponibles:
NET,
GROSS
Ejemplo:

"NET"

autoMatchOnUpload
boolean

Whether matching triggers automatically after file upload

Ejemplo:

false

createdAt
string

Creation timestamp in RFC3339 format

Ejemplo:

"2025-01-15T10:30:00.000Z"

updatedAt
string

Last update timestamp in RFC3339 format

Ejemplo:

"2025-01-15T10:30:00.000Z"