Pular para o conteúdo 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"
}

Autorizações

Authorization
string
header
obrigatório

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

Cabeçalhos

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.

Corpo

application/json

Context creation payload

name
string
obrigatório
Required string length: 1 - 100
Exemplo:

"Bank Reconciliation Q1"

type
enum<string>
obrigatório

Reconciliation topology (cardinality between sources)

Opções disponíveis:
1:1,
1:N,
N:M
Exemplo:

"1:1"

interval
string
obrigatório
Required string length: 1 - 100
Exemplo:

"daily"

feeToleranceAbs
string

Absolute fee tolerance amount

Exemplo:

"0.01"

feeTolerancePct
string

Percentage fee tolerance

Exemplo:

"0.5"

feeNormalization
enum<string>

Fee normalization mode

Opções disponíveis:
NET,
GROSS
Exemplo:

"NET"

autoMatchOnUpload
boolean

Whether to trigger matching automatically after file upload

Exemplo:

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

Resposta

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

Exemplo:

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

tenantId
string

Tenant ID this context belongs to

Exemplo:

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

name
string

Name of the reconciliation context

Exemplo:

"Bank Reconciliation Q1"

type
enum<string>

Reconciliation topology type

Opções disponíveis:
1:1,
1:N,
N:M
Exemplo:

"1:1"

interval
string

Execution interval

Exemplo:

"daily"

status
enum<string>

Current status of the context

Opções disponíveis:
DRAFT,
ACTIVE,
PAUSED,
ARCHIVED
Exemplo:

"ACTIVE"

feeToleranceAbs
string

Absolute fee tolerance amount

Exemplo:

"0.50"

feeTolerancePct
string

Percentage fee tolerance

Exemplo:

"0.01"

feeNormalization
enum<string>

Fee normalization mode

Opções disponíveis:
NET,
GROSS
Exemplo:

"NET"

autoMatchOnUpload
boolean

Whether matching triggers automatically after file upload

Exemplo:

false

createdAt
string

Creation timestamp in RFC3339 format

Exemplo:

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

updatedAt
string

Last update timestamp in RFC3339 format

Exemplo:

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