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

# Get a listing

> One listing, on its one network, by id, published or quarantined, with its `state`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /discovery/resources/{id}
openapi: 3.1.0
info:
  title: Rail402
  version: 0.0.0
  summary: x402 facilitator and Bazaar discovery layer for Stellar.
  description: >
    The Rail402 HTTP service. `/supported`, `/verify` and `/settle` follow the
    x402 version 2 facilitator

    interface; `/discovery/*` serves the Bazaar catalog and search.


    Every endpoint except `/health`, `/ready` and `/metrics` is rate-limited per
    client address. A limited

    request gets HTTP 429 with a `Retry-After` header and the code
    `rate_limited`.
  license:
    name: Apache-2.0
    identifier: Apache-2.0
servers:
  - url: https://testnet.rail402.dev
    description: Hosted testnet facilitator (stellar:testnet only, no API key)
security: []
tags:
  - name: Facilitator
    description: x402 facilitator interface.
  - name: Discovery
    description: Bazaar catalog and natural-language search.
  - name: Operations
    description: Health, readiness, metrics and usage.
paths:
  /discovery/resources/{id}:
    get:
      tags:
        - Discovery
      summary: Get a listing
      description: >-
        One listing, on its one network, by id, published or quarantined, with
        its `state`.
      operationId: getResource
      parameters:
        - $ref: '#/components/parameters/ListingId'
      responses:
        '200':
          description: The listing.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DiscoveryItem'
                  - type: object
                    required:
                      - state
                    properties:
                      state:
                        type: string
                        enum:
                          - pending
                          - published
                          - quarantined
        '404':
          $ref: '#/components/responses/ListingNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ListingId:
      name: id
      in: path
      required: true
      description: A listing's id (`rail402.listings[].id`).
      schema:
        type: string
        format: uuid
  schemas:
    DiscoveryItem:
      type: object
      required:
        - resource
        - type
        - x402Version
        - accepts
        - lastUpdated
        - extensions
        - rail402
      properties:
        resource:
          type: string
        type:
          type: string
          enum:
            - http
            - mcp
        x402Version:
          type: integer
          const: 2
        accepts:
          type: array
          items:
            $ref: '#/components/schemas/PaymentRequirements'
        lastUpdated:
          type: string
          format: date-time
        description:
          type: string
        mimeType:
          type: string
        serviceName:
          type: string
        tags:
          type: array
          items:
            type: string
        iconUrl:
          type: string
        extensions:
          type: object
          required:
            - bazaar
          description: >-
            `bazaar`, and an empty object for every other extension the resource
            declares in its 402 response.
          properties:
            bazaar:
              type: object
              description: >-
                The validated `info`, `schema` and, if accepted,
                `routeTemplate`.
              additionalProperties: true
          additionalProperties:
            type: object
            maxProperties: 0
        rail402:
          type: object
          description: >-
            The catalog listings behind the resource. A resource sold on several
            networks is one item with one listing per network.
          required:
            - trust
            - settlements
            - listings
            - options
          properties:
            method:
              type: string
            toolName:
              type: string
            trust:
              type: string
              enum:
                - settled
                - origin_verified
                - domain_verified
              description: The strongest trust among the resource's listings.
            settlements:
              type: integer
              description: Settlements across the resource's listings.
            listings:
              type: array
              minItems: 1
              items:
                type: object
                required:
                  - id
                  - network
                  - version
                  - trust
                  - owner
                  - settlements
                  - firstCataloged
                  - lastSettled
                properties:
                  id:
                    type: string
                    format: uuid
                  network:
                    type: string
                  version:
                    type: integer
                  trust:
                    type: string
                    enum:
                      - settled
                      - origin_verified
                      - domain_verified
                  owner:
                    type: string
                  settlements:
                    type: integer
                  firstCataloged:
                    type: string
                    format: date-time
                  lastSettled:
                    type: string
                    format: date-time
                  stellar:
                    type: object
                    description: >-
                      When the listing's Stellar facts were read; absent until
                      first checked.
                    required:
                      - checkedAt
                    properties:
                      checkedAt:
                        type: string
                        format: date-time
                      domain:
                        type: object
                        required:
                          - host
                          - claimsOwner
                        properties:
                          host:
                            type: string
                          claimsOwner:
                            type: boolean
                            description: >-
                              Whether the host's SEP-1 stellar.toml lists the
                              owner in ACCOUNTS.
            options:
              type: array
              description: One entry per `accepts` option, in the same order.
              items:
                type: object
                required:
                  - listing
                properties:
                  listing:
                    type: string
                    format: uuid
                    description: The listing the option belongs to.
                  symbol:
                    type: string
                  name:
                    type: string
                  decimals:
                    type: integer
                  receivable:
                    type: boolean
                    description: Whether payTo can receive the token now.
    PaymentRequirements:
      type: object
      description: An x402 version 2 payment option.
      required:
        - scheme
        - network
      properties:
        scheme:
          type: string
          examples:
            - exact
        network:
          type: string
          examples:
            - stellar:testnet
        asset:
          type: string
          description: The SEP-41 token's contract address (`C…`).
        payTo:
          type: string
          description: The recipient, a `G…`, `C…` or `M…` address.
        amount:
          type: string
          description: The amount in the asset's base units.
        maxTimeoutSeconds:
          type: integer
        extra:
          type: object
          additionalProperties: true
          properties:
            areFeesSponsored:
              type: boolean
      additionalProperties: true
    ErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - reason
            - retryable
          properties:
            code:
              type: string
            reason:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
  responses:
    ListingNotFound:
      description: No listing has this id (`discovery_listing_not_found`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error:
              code: discovery_listing_not_found
              reason: No listing has this identifier.
              retryable: false
    RateLimited:
      description: Rate limited (`rate_limited`).
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  headers:
    RetryAfter:
      description: Seconds until a retry can succeed.
      schema:
        type: integer

````

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