Organization routing

View smart-routing across the organization's merchants from the Dashboard.

These endpoints give the organization a cross-merchant view of routing profiles — the rule sets that decide which connector attempts each charge. Use them to review how routing is configured across merchants from one place.

A routing profile still belongs to a single merchant; edit its nodes in that merchant's routing screen. See How Tokeflow works for the orchestration model.

These endpoints power the Tokeflow Dashboard UI at the organization level. They are session-authenticated (JWT bearer) — the token comes from signing in to the Dashboard, not from an sk_/pk_ API key. Requests also carry the x-organization-id header, and the signed-in user must be a member of that organization.

The routing profile object

Returned by the list and retrieve endpoints on this page.

FieldTypeDescription
idstringRouting profile ID.
merchant_idstringMerchant ID.
namestringRouting profile name.
created_atstringRouting profile creation timestamp. (ISO 8601 UTC).
updated_atstringRouting profile last update timestamp. (ISO 8601 UTC).
is_activebooleanWhether the routing profile is active.
versionnumberRouting profile version.
payment_methodstringPayment method scope.
default_merchant_connector_idstring | nullDefault connector ID used when no rule node matches.

Endpoints

GET/api/v1/org/routing/profiles

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

List routing profiles for merchant.

Query parameters

FieldTypeRequiredDescription
pagenumberNoPage number (1-indexed). Default 1, min 1.
limitnumberNoNumber of items per page. Default 20, min 1, max 100.

Example request

curl -G https://api.tokeflow.com/api/v1/org/routing/profiles \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3" \
  --data-urlencode "page=1" \
  --data-urlencode "limit=20"

Example response200

{
  "data": [
    {
      "id": "rp_123abc...",
      "merchant_id": "mrc_123",
      "name": "Primary Routing Profile",
      "created_at": "2025-11-20T10:00:00Z",
      "updated_at": "2025-11-21T10:00:00Z",
      "is_active": true,
      "version": 1,
      "payment_method": "*",
      "default_merchant_connector_id": "string"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 42,
    "total_pages": 3,
    "has_next": true,
    "has_prev": false
  }
}

POST/api/v1/org/routing/profiles

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Create a new routing profile.

Request fields

FieldTypeRequiredDescription
namestringYesRouting profile name.
is_activebooleanNoWhether the routing profile is active.
payment_methodstringNoPayment method scope. * = catch-all. One of credit_card, debit_card, pix, boleto, wallet, *.
default_merchant_connector_idstringYesDefault connector used when no rule node matches. Cannot be null.

Example request

curl -X POST https://api.tokeflow.com/api/v1/org/routing/profiles \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Default Card Profile",
    "is_active": true,
    "payment_method": "*",
    "default_merchant_connector_id": "mc_6d7b9a0e1f2c3d4e5f6a7b8c9d0e1f2a"
  }'

Example response201

{
  "id": "rp_123abc...",
  "merchant_id": "mrc_123",
  "name": "Primary Routing Profile",
  "created_at": "2025-11-20T10:00:00Z",
  "updated_at": "2025-11-21T10:00:00Z",
  "is_active": true,
  "version": 1,
  "payment_method": "*",
  "default_merchant_connector_id": "string"
}

DELETE/api/v1/org/routing/profiles/:profile_id

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Delete a routing profile.

Path parameters

FieldTypeRequiredDescription
profile_idstringYes

Example request

curl -X DELETE https://api.tokeflow.com/api/v1/org/routing/profiles/rpf_5f6a7b8c \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3"

Example response204 No Content

An empty body is returned on success.


GET/api/v1/org/routing/profiles/:profile_id

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Get routing profile by ID.

Path parameters

FieldTypeRequiredDescription
profile_idstringYes

Example request

curl https://api.tokeflow.com/api/v1/org/routing/profiles/rpf_5f6a7b8c \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3"

Example response200

{
  "id": "rp_123abc...",
  "merchant_id": "mrc_123",
  "name": "Primary Routing Profile",
  "created_at": "2025-11-20T10:00:00Z",
  "updated_at": "2025-11-21T10:00:00Z",
  "is_active": true,
  "version": 1,
  "payment_method": "*",
  "default_merchant_connector_id": "string"
}

Errors

Errors use the standard envelope. The most common cases here:

HTTPMeaning
400Invalid parameters or a state that does not allow this operation.
401Missing, expired, or invalid Dashboard session token.
403Authenticated, but the signed-in user lacks access to this entity.
404The record does not exist or is not visible to this entity.

On this page