Skip to content

REST API Endpoints

All REST API endpoints are accessible through the API Gateway at http://localhost:4000/api/v1. Unless noted otherwise, all endpoints require a valid JWT Bearer token in the Authorization header.

Authentication

MethodPathDescriptionAuth
POST/auth/loginAuthenticate and receive JWT tokenNo
POST/auth/refreshRefresh an expired access tokenNo
POST/auth/revokeRevoke a tokenYes
POST/auth/mfa/setupInitialize MFA for current userYes
POST/auth/mfa/verifyVerify MFA codeYes
GET/auth/meGet current user profileYes

Transactions

STR (Real-Time Gross Settlement)

MethodPathDescriptionPermission
GET/str/balanceQuery STR reserve balancestr:balance:read
GET/str/statementQuery STR statementstr:statement:read
POST/transactions/strCreate STR transfertransactions:create

TED (Same-Day Electronic Transfer)

MethodPathDescriptionPermission
POST/transactions/tedCreate TED transfertransactions:create

DOC (Next-Day Credit Transfer)

MethodPathDescriptionPermission
POST/transactions/docCreate DOC transfertransactions:create

General Transaction Operations

MethodPathDescriptionPermission
GET/transactionsList transactions with filterstransactions:read
GET/transactions/:idGet transaction detailstransactions:read
POST/transactions/:id/cancelCancel a pending transactiontransactions:cancel

Query parameters for GET /transactions:

ParameterTypeDescription
typestringFilter by type: STR, TED, DOC, LPI
statusstringFilter by status: created, submitted, settled, failed
date_fromdateStart date (ISO 8601)
date_todateEnd date (ISO 8601)
sender_ispbstringFilter by sender ISPB
receiver_ispbstringFilter by receiver ISPB
min_amountdecimalMinimum amount
max_amountdecimalMaximum amount
pageintegerPage number (default: 1)
page_sizeintegerItems per page (default: 20, max: 100)

Securities

MethodPathDescriptionPermission
GET/securities/positionsList securities positionssecurities:read
GET/securities/positions/:idGet position detailssecurities:read
POST/securities/transferTransfer securities (SEL)securities:transfer
POST/securities/pledgePledge securities as collateralsecurities:pledge
POST/securities/releaseRelease pledged securitiessecurities:release
GET/securities/tradesList CTP tradessecurities:read
POST/securities/tradesRegister CTP tradesecurities:trade

Settlements

MethodPathDescriptionPermission
GET/settlements/windowsList settlement windows and statussettlements:read
GET/settlements/net-positionQuery net position for current windowsettlements:read
POST/settlements/batchSubmit LDL batchsettlements:create
GET/settlements/batchesList submitted batchessettlements:read
GET/settlements/batches/:idGet batch details and statussettlements:read

Forex

MethodPathDescriptionPermission
GET/forex/ptaxGet current PTAX rateforex:read
GET/forex/ptax/historyGet historical PTAX ratesforex:read
POST/forex/contractRegister FX contract (CAM)forex:create
GET/forex/contractsList FX contractsforex:read
GET/forex/contracts/:idGet FX contract detailsforex:read
GET/forex/positionGet FX position reportforex:read

Query parameters for GET /forex/ptax:

ParameterTypeDescription
currencystringCurrency code (e.g., USD, EUR, GBP)
datedateRate date (default: today)

Cash Operations

MethodPathDescriptionPermission
POST/cash/orderCreate cash order (CIR)cash:create
GET/cash/ordersList cash orderscash:read
GET/cash/balanceGet cash balancecash:read
POST/cash/depositRegister cash depositcash:create

Data Extracts

MethodPathDescriptionPermission
POST/extractsRequest a data extractextracts:create
GET/extractsList extract requestsextracts:read
GET/extracts/:idGet extract statusextracts:read
GET/extracts/:id/downloadDownload extract fileextracts:download

Extract request body:

json
{
  "type": "transactions",
  "format": "csv",
  "filters": {
    "date_from": "2026-01-01",
    "date_to": "2026-01-31",
    "transaction_types": ["STR", "TED"],
    "status": ["settled"]
  }
}

Supported formats: csv, xlsx, json, xml

User Management

MethodPathDescriptionPermission
GET/usersList users in tenantusers:read
POST/usersCreate new userusers:create
GET/users/:idGet user detailsusers:read
PUT/users/:idUpdate userusers:update
DELETE/users/:idDeactivate userusers:delete
GET/users/:id/rolesGet user rolesusers:read
PUT/users/:id/rolesAssign roles to userusers:roles:assign
GET/rolesList available rolesroles:read
GET/tenants/currentGet current tenant infotenants:read

Common Response Format

All endpoints return responses in a consistent format:

Success Response

json
{
  "data": { },
  "meta": {
    "request_id": "req_01HQXYZ",
    "timestamp": "2026-01-15T10:30:00Z"
  }
}

Paginated Response

json
{
  "data": [],
  "meta": {
    "request_id": "req_01HQXYZ",
    "timestamp": "2026-01-15T10:30:00Z"
  },
  "pagination": {
    "page": 1,
    "page_size": 20,
    "total_entries": 245,
    "total_pages": 13
  }
}

Error Response

json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Amount must be greater than zero",
    "details": [
      {
        "field": "amount",
        "message": "must be greater than 0"
      }
    ]
  },
  "meta": {
    "request_id": "req_01HQXYZ",
    "timestamp": "2026-01-15T10:30:00Z"
  }
}

HTTP Status Codes

CodeMeaning
200Success
201Created
400Bad Request (validation error)
401Unauthorized (missing or invalid token)
403Forbidden (insufficient permissions)
404Not Found
409Conflict (duplicate or state conflict)
422Unprocessable Entity (business rule violation)
429Too Many Requests (rate limited)
500Internal Server Error
503Service Unavailable (downstream service down)

Plataforma de Integracao BACEN/SPB