> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Retrieve a Routing

> Returns the current live configuration of a routing, identified by its routing_id.

Returns the routing's current live configuration, in the same shape [Create a Routing](https://docs.y.uno/reference/organizations/routing/create-routing.md) and [Update a Routing](https://docs.y.uno/reference/organizations/routing/update-routing.md) accept, so you can send the result back in a `PATCH`. Compared with a request body, the response also carries:

* `retry` on every output (`false` when not set).
* `group_id`, `group_name` and `decline_types` on `DECLINE_GROUP` and `MAC_CODE_GROUP` outputs; `group_id` and `group_name` on `SUCCEEDED_GROUP` outputs.
* `action` and `action_delay` on action steps, and `output: []` on them.
* `provider_type` and `timeout` on every provider step, `network_token_enable` and `network_token_on` on payment steps, `three_d_secure_exemptions` on 3DS steps, `fraud` on fraud steps and `smart_routing` on smart routing steps.
* The schedule and limit fields of `TIME_PERIOD` and `VOLUME_PAYMENTS_LIMIT` conditions.
* `start_split` when the entry is split and `output[].next_split` when a fallback is split; both are omitted otherwise.
* Fields without a value come back as `null` (`next`, `decline_types`, `key`, `currency`); the examples below leave them out for brevity.

Parts of a routing the API cannot express are left out of the response and kept untouched on update. See [What the API does not show](https://docs.y.uno/reference/organizations/routing/routing-resource-shape.md#what-the-api-does-not-show).

### Path Parameters

**routing\_id** `string` *required*

The id returned by [Create a Routing](https://docs.y.uno/reference/organizations/routing/create-routing.md). Must belong to the account your API key is scoped to.

### Response

**id** `string`

Unique identifier for the routing.

**account\_id** `string`

Unique identifier for the account.

**payment\_method** `enum`

The payment method this routing applies to (e.g., `CARD`).

**name** `string`

Label for the routing.

**default\_route** `object`

The default routing logic. See [Routing Resource Shape](https://docs.y.uno/reference/organizations/routing/routing-resource-shape.md) for every field of `steps[]` and `output[]`.

**condition\_sets** `object[]`

Optional conditional logic.

**created\_at** `string`

ISO 8601 timestamp.

**updated\_at** `string`

ISO 8601 timestamp.

**warnings** `string[]`

Optional list of non-blocking orchestration warnings (e.g., `MONITOR_REDISTRIBUTION_DEFERRED`).

```bash cURL theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
curl -X GET 'https://api.y.uno/v1/routing/8f2c1d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>'
```

```json 200 OK theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "id": "8f2c1d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "account_id": "7825fc5e-e50a-4248-9ae8-5d3786afb0be",
  "payment_method": "CARD",
  "name": "Card routing — Stripe primary, Adyen fallback",
  "default_route": {
    "steps": [
      {
        "index": 1,
        "provider_id": "STRIPE",
        "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
        "output": [
          { "status": "APPROVED",       "next": 3, "retry": false },
          { "status": "DECLINE_GROUP",  "group_id": 1044, "group_name": "Soft declines",
            "decline_types": ["DECLINED_BY_BANK", "RESTRICTED_BY_BANK"], "next": 2, "retry": true },
          { "status": "MAC_CODE_GROUP", "group_id": 4542, "group_name": "Do not retry",
            "decline_types": ["NO_RETRY_POLICY", "NO_RETRY_SECURITY"], "retry": false },
          { "status": "DECLINED",       "next": 2, "retry": false },
          { "status": "INTERNAL_ERROR", "next": 2, "retry": false }
        ]
      },
      {
        "index": 2,
        "provider_id": "ADYEN",
        "connection_id": "b2c4d5e6-1a2b-3c4d-5e6f-7a8b9c0d1e2f",
        "output": [
          { "status": "APPROVED",        "next": 3, "retry": false },
          { "status": "SUCCEEDED_GROUP", "group_id": 430, "group_name": "Pending review", "next": 4, "retry": false }
        ]
      },
      { "index": 3, "action": "CAPTURE", "action_delay": "PT5M", "output": [] },
      { "index": 4, "action": "HOLD_FOR_REVIEW", "output": [] }
    ]
  },
  "condition_sets": [
    {
      "sort_number": 1,
      "name": "Business hours via Adyen",
      "conditions": [
        { "condition_type": "TIME_PERIOD", "conditional": "EQUAL", "values": ["2026-10-01T00:00:00-03:00"],
          "time_period_repeat_amount": 1, "time_period_repeat_frequency": "WEEKLY",
          "time_period_repetition_days": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
          "time_period_start_time": "09:00:00", "time_period_end_time": "18:00:00", "timezone": "-03:00" }
      ],
      "route": { "steps": [ { "index": 1, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-...", "output": [{ "status": "APPROVED", "next": null, "decline_types": null, "retry": false }, { "status": "INTERNAL_ERROR", "next": null, "decline_types": null, "retry": false }] } ] }
    }
  ],
  "created_at": "2026-05-12T14:30:00Z",
  "updated_at": "2026-05-12T14:30:00Z"
}
```

```json 404 Not Found theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "code": "ROUTING_NOT_FOUND",
  "messages": ["Routing '...' was not found"]
}
```

### Errors

| HTTP | `code` | When |
| - | - | - |
| `404` | `ROUTING_NOT_FOUND` | Unknown `routing_id`, or id belongs to a different account. |
| `401` | `NOT_AUTHENTICATED` | Missing `public-api-key` or `private-secret-key` header. |
| `401` | `INVALID_CREDENTIALS` | Wrong key pair, or a Dashboard **Customized API key** was used. Use an account key or organization key instead. |


## OpenAPI

````yaml openapi/organizations/routing/retrieve-routing.json GET /routing/{routing_id}
openapi: 3.1.0
info:
  title: Routing API - Retrieve
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /routing/{routing_id}:
    get:
      summary: Retrieve a Routing
      description: Returns the routing's current live configuration.
      operationId: retrieve-routing
      parameters:
        - name: routing_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 8f2c1d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f
                  account_id:
                    type: string
                    example: acc-uuid
                  payment_method:
                    type: string
                    example: CARD
                  name:
                    type: string
                    example: Card routing — Stripe primary, Adyen fallback
                  default_route:
                    type: object
                    properties:
                      start_split:
                        type: array
                        description: >-
                          Splits the entry of the route across several steps by
                          percentage. Omit to start every payment on step 1.
                          Entries must sum to 100; returned only when the route
                          has a split entry.
                        items:
                          type: object
                          required:
                            - index
                            - percentage
                          properties:
                            index:
                              type: integer
                              example: 1
                            percentage:
                              type: integer
                              example: 45
                      steps:
                        type: array
                        items:
                          type: object
                          properties:
                            index:
                              type: integer
                              example: 1
                            provider_id:
                              type: string
                              example: STRIPE
                              description: >-
                                Required on provider steps; absent on action
                                steps. Must match the provider of the
                                connection.
                            connection_id:
                              type: string
                              example: f1a3c4d5-...
                              description: >-
                                Required on provider steps; absent on action and
                                smart routing steps. Must be ACTIVE and support
                                the payment_method.
                            provider_type:
                              type: string
                              enum:
                                - PAYMENT
                                - FRAUD
                                - THREE_D_SECURE
                                - AUTHENTICATION
                              description: >-
                                The kind the provider resolves to. Response
                                only.
                            timeout:
                              type: integer
                              example: 60
                              description: >-
                                Provider steps. Timeout in seconds of the
                                provider, from the provider catalog. Response
                                only.
                            network_token_enable:
                              type: boolean
                              description: >-
                                Payment steps. Whether network_token_on can be
                                true on this step: the organization is onboarded
                                to network tokens and the provider supports
                                them. Response only.
                            network_token_on:
                              type: boolean
                              description: >-
                                Payment steps. Whether the step pays with the
                                network token of the card when one is available.
                            three_d_secure_exemptions:
                              type: array
                              items:
                                type: string
                                enum:
                                  - LOW_VALUE
                                  - TRANSACTION_RISK_ANALYSIS
                                  - SECURE_CORPORATE
                                  - TRUSTED_BENEFICIARY
                                  - RECURRING_PAYMENT
                                  - STRONG_CUSTOMER_AUTHENTICATION
                                  - OUT_OF_SCOPE
                              description: >-
                                3DS steps. The SCA exemptions the step may
                                apply; an empty array when none.
                            action:
                              type: string
                              enum:
                                - CANCEL
                                - CAPTURE
                                - HOLD_FOR_REVIEW
                                - REVERT
                              description: >-
                                Makes the step an action step that ends the
                                route: CANCEL rejects the payment, CAPTURE
                                captures the authorization after action_delay,
                                HOLD_FOR_REVIEW leaves it pending manual review,
                                REVERT reverts it after a post-payment fraud
                                screening. CAPTURE and HOLD_FOR_REVIEW follow an
                                APPROVED or SUCCEEDED_GROUP output of a payment
                                or smart routing step, REVERT the outputs of a
                                fraud step that runs after the payment, CANCEL
                                never an approval. An action step has no
                                provider_id, connection_id or output.
                            action_delay:
                              type: string
                              example: PT5M
                              description: >-
                                Only with action = CAPTURE. ISO-8601 duration
                                between the approval and the capture, at least
                                PT1M and at most P7D. Omit to capture as soon as
                                the approval is processed.
                            output:
                              type: array
                              items:
                                type: object
                                required:
                                  - status
                                properties:
                                  status:
                                    type: string
                                    example: DECLINED
                                    description: >-
                                      APPROVED, DECLINED, DECLINE_GROUP,
                                      MAC_CODE_GROUP, SUCCEEDED_GROUP, PENDING
                                      (fraud, 3DS and authentication steps only)
                                      or INTERNAL_ERROR.
                                  decline_types:
                                    type: array
                                    items:
                                      type: string
                                    description: >-
                                      Members of the group on DECLINE_GROUP
                                      (decline sub-statuses) and MAC_CODE_GROUP
                                      (Merchant Advice Codes) outputs.
                                  group_id:
                                    type: integer
                                    example: 1044
                                    description: >-
                                      Id of the group behind a DECLINE_GROUP,
                                      MAC_CODE_GROUP or SUCCEEDED_GROUP output.
                                  group_name:
                                    type: string
                                    example: Soft declines
                                    description: >-
                                      Name of the group behind group_id. Ignored
                                      on write.
                                  retry:
                                    type: boolean
                                    example: false
                                    description: >-
                                      Whether this output retries the same
                                      provider once before following next.
                                      Always returned.
                                  next:
                                    type: integer
                                    example: 2
                                  next_split:
                                    type: array
                                    description: >-
                                      Splits the fallback across several steps
                                      by percentage: at least 2 entries whose
                                      percentages sum to 100. Returned alongside
                                      next = first entry.
                                    items:
                                      type: object
                                      required:
                                        - index
                                        - percentage
                                      properties:
                                        index:
                                          type: integer
                                          example: 2
                                        percentage:
                                          type: integer
                                          example: 70
                              description: >-
                                Per-outcome handlers. Returned as an empty array
                                on action steps.
                            fraud:
                              type: object
                              description: >-
                                Configuration of a fraud provider step, returned
                                on FRAUD steps.
                              properties:
                                rules:
                                  type: string
                                  example: rule-a,rule-b
                                blocklists:
                                  type: string
                                allowlists:
                                  type: string
                                reviewlists:
                                  type: string
                                preset:
                                  type: string
                                report_only:
                                  type: boolean
                                  description: >-
                                    Score without acting on the result. Only on
                                    a fraud step reached from declined outputs
                                    of a payment step.
                            smart_routing:
                              type: object
                              description: Returned on smart routing steps.
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - COSTS
                                    - LATENCY
                                  example: LATENCY
                                providers:
                                  type: array
                                  minItems: 2
                                  maxItems: 4
                                  items:
                                    type: object
                                    required:
                                      - provider_id
                                      - connection_id
                                    properties:
                                      provider_id:
                                        type: string
                                        example: ADYEN
                                      connection_id:
                                        type: string
                                        format: uuid
                                      network_token_on:
                                        type: boolean
                                no_retry_decline_types:
                                  type: array
                                  items:
                                    type: string
                                  description: >-
                                    Decline sub-statuses after which the next
                                    provider of the set is not tried.
                                no_retry_failure_causes:
                                  type: array
                                  items:
                                    type: string
                                  description: >-
                                    Failure causes (for example
                                    PROVIDER_TIMEOUT) after which the next
                                    provider of the set is not tried.
                  condition_sets:
                    type: array
                    items:
                      type: object
                      properties:
                        sort_number:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: High Value US
                        description:
                          type: string
                        conditions:
                          type: array
                          items:
                            type: object
                            properties:
                              condition_type:
                                type: string
                                example: COUNTRY
                                description: >-
                                  See Routing Conditions for the catalog:
                                  COUNTRY, CARD_ISSUER_COUNTRY, AMOUNT,
                                  CURRENCY, CARD_TYPE, CARD_BRAND, CARD_BIN,
                                  TRANSACTION_TYPE, METADATA, ADDITIONAL_FIELD,
                                  ORDER_ITEMS_AMOUNT, TIME_PERIOD,
                                  VOLUME_PAYMENTS_LIMIT, SUBSCRIPTION_RETRY,
                                  SUBSCRIPTION_RETRY_COUNT.
                              conditional:
                                type: string
                                example: ONE_OF
                              values:
                                type: array
                                items:
                                  type: string
                                example:
                                  - US
                                  - CA
                                description: >-
                                  On CURRENCY, uppercase ISO 4217 codes (not
                                  XXX, no repeats): exactly 1 with EQUAL or
                                  NOT_EQUAL, 1 or more with ONE_OF or
                                  NOT_ONE_OF. Empty only on an AMOUNT condition
                                  with currency, which then matches any amount
                                  in that currency. On ORDER_ITEMS_AMOUNT, the
                                  numeric threshold for the summed items: 1
                                  value, 2 with BETWEEN.
                              key:
                                type: string
                                description: >-
                                  METADATA: the metadata key. ADDITIONAL_FIELD:
                                  the supported field name. ORDER_ITEMS_AMOUNT:
                                  the order item field item_values is matched
                                  against, sku_code (default), category or
                                  brand.
                              item_values:
                                type: array
                                items:
                                  type: string
                                example:
                                  - GC-50
                                  - GC-100
                                  - GC-200
                                description: >-
                                  ORDER_ITEMS_AMOUNT only, and required on it:
                                  non-empty list of order item values (exact,
                                  case-sensitive) whose quantity × unit_amount
                                  is added up. Rejected on any other
                                  condition_type.
                              currency:
                                type: string
                                example: USD
                                description: >-
                                  ISO 4217. Required on AMOUNT, on
                                  ORDER_ITEMS_AMOUNT and on
                                  VOLUME_PAYMENTS_LIMIT with limit_by = VOLUME.
                                  Not sent on CURRENCY, whose currencies go in
                                  values.
                              time_period_repeat_amount:
                                type: integer
                                example: 1
                                description: >-
                                  TIME_PERIOD and VOLUME_PAYMENTS_LIMIT: every
                                  how many units of time_period_repeat_frequency
                                  (schedule), or the length of a DAILY window in
                                  days, 1 to 90 (limit).
                              time_period_repeat_frequency:
                                type: string
                                enum:
                                  - DAILY
                                  - WEEKLY
                                  - MONTHLY
                                  - QUARTERLY
                                  - YEARLY
                                description: >-
                                  TIME_PERIOD: recurrence unit.
                                  VOLUME_PAYMENTS_LIMIT: period of the limit,
                                  DAILY, MONTHLY or QUARTERLY.
                              time_period_repetition_days:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - MONDAY
                                    - TUESDAY
                                    - WEDNESDAY
                                    - THURSDAY
                                    - FRIDAY
                                    - SATURDAY
                                    - SUNDAY
                                description: >-
                                  TIME_PERIOD only. Days of the week the
                                  schedule applies to; needs a frequency.
                              time_period_start_time:
                                type: string
                                example: '09:00:00'
                                description: >-
                                  TIME_PERIOD only. Start of the daily time
                                  window (HH:mm:ss), together with
                                  time_period_end_time.
                              time_period_end_time:
                                type: string
                                example: '18:00:00'
                                description: >-
                                  TIME_PERIOD only. End of the daily time window
                                  (HH:mm:ss), inclusive.
                              timezone:
                                type: string
                                example: '-03:00'
                                description: >-
                                  UTC offset. TIME_PERIOD: offset the schedule
                                  is read in (defaults to the offset of
                                  values[0]). VOLUME_PAYMENTS_LIMIT: whole-hour
                                  offset where periods start (defaults to
                                  +00:00).
                              limit_by:
                                type: string
                                enum:
                                  - PAYMENTS
                                  - VOLUME
                                description: >-
                                  VOLUME_PAYMENTS_LIMIT only. Count payments
                                  (default) or sum amounts in currency.
                              payments_count:
                                type: string
                                enum:
                                  - ALL
                                  - SUCCEEDED
                                description: >-
                                  VOLUME_PAYMENTS_LIMIT only. Which payments
                                  count toward the limit. Default ALL.
                          description: >-
                            Conditions combined with logical AND. See Routing
                            Conditions.
                        route:
                          type: object
                          description: >-
                            Same shape as default_route, including start_split,
                            output[].next_split and action steps.
                  created_at:
                    type: string
                    format: date-time
                    example: '2026-05-12T14:30:00Z'
                  updated_at:
                    type: string
                    format: date-time
                    example: '2026-05-12T14:30:00Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_AUTHENTICATED
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - Not authenticated
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ROUTING_NOT_FOUND
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - Routing '...' was not found
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.