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

# Describe a Device Code

> Read what the approval page shows for a user code: who is asking, from what runtime, and whether it is still pending.

What the approval screen renders for a `user_code`. Public on purpose — the page needs it before the human has signed in, and it holds only what the agent said about itself.

```bash theme={null}
curl https://api.zinc.com/device/codes/XZSW-99RL
```

| Field                  | Meaning                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------- |
| `name`                 | What the agent called itself when it started the code.                                |
| `source`               | Runtime guessed from the requesting `User-Agent` (`claude-code`, `codex`, `curl`, …). |
| `sandbox_attached`     | Approval will also claim the agent's sandbox into the approving account.              |
| `starter_credit_cents` | Wallet credit approval would add, or `null` when none applies.                        |
| `status`               | `pending`, `approved`, or `denied`.                                                   |

<Info>
  This is for rendering an approval screen, not for polling. An agent waiting on a decision should poll [`POST /device/token`](/docs/v2/api-reference/device/redeem-device-code) at its `interval` instead.
</Info>


## OpenAPI

````yaml versions/latest.json GET /device/codes/{user_code}
openapi: 3.1.0
info:
  title: Zinc
  summary: >-
    Zinc lets you search, buy, and return items from top online retailers with a
    single API.
  description: >-
    Search, buy, and return items from top online retailers with a single API.
    Supports AI agent ordering via MPP (HTTP 402) — no account required.
    Supported retailers include 1-800-Flowers, Ace Hardware, Amazon, Amazon DE,
    Barnes & Noble, Best Buy, Chewy, Gap, IBS, Lowe's, Macys, Partstown, and 12
    more. Ships to the US and 2 other countries (DE, IT).
  version: '2026-08-21'
  x-logo:
    url: https://mintlify.s3.us-west-1.amazonaws.com/zinc/logo/light.png
  contact:
    name: Zinc API Support
    email: support@zinc.com
    url: https://zinc.com/docs
  x-guidance: >-
    Zinc lets AI agents buy products from online retailers via a single API. Use
    POST /agent/orders to place an order — no Zinc account needed, payment is
    handled via MPP (HTTP 402 flow). Provide a product URL from a supported
    retailer, a shipping address, and max_price in cents. The API charges
    max_price + $1 API fee upfront and refunds the difference on completion. To
    find products first, the /agent/* data endpoints (search, products/search,
    products/offers, products/details) are MPP-paid at $0.01 per call;
    /agent/search returns orderable URLs to feed straight into /agent/orders.
    GET /retailers lists supported retailers for free (no payment or account).
    Authenticated equivalents (orders, products, managed-accounts) require a
    Bearer token (API key prefixed zn_); those orders are paid from a prefunded
    wallet — GET /wallet/me returns the spendable balance and per-order fee, so
    check it before POST /orders to avoid a 402. Docs: https://zinc.com/docs
    Supported retailers include 1-800-Flowers, Ace Hardware, Amazon, Amazon DE,
    Barnes & Noble, Best Buy, Chewy, Gap, IBS, Lowe's, Macys, Partstown, and 12
    more, shipping to the US and 2 other countries (DE, IT).
  x-supported-retailers:
    - 1-800-Flowers
    - Ace Hardware
    - Amazon
    - Amazon DE
    - Barnes & Noble
    - Best Buy
    - Chewy
    - Gap
    - IBS
    - Lowe's
    - Macys
    - Partstown
    - Pokémon Center
    - Sephora
    - Target
    - The Home Depot
    - TikTok
    - Uniqlo
    - Walmart
    - Wayfair
    - Zinc
    - eBay
    - libraccio
    - zazzle
  x-supported-countries:
    - US
    - DE
    - IT
servers:
  - url: https://api.zinc.com
    description: Production
security:
  - BearerAuth: []
paths:
  /device/codes/{user_code}:
    get:
      tags:
        - device
      summary: What an approval page shows for a user code
      description: |-
        Public on purpose: it holds only what the agent said about itself, and
        the approval page needs it before the human has signed in.
      operationId: describe_device_code_device_codes__user_code__get
      parameters:
        - name: user_code
          in: path
          required: true
          schema:
            type: string
            title: User Code
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceCodeInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DeviceCodeInfo:
      properties:
        user_code:
          type: string
          title: User Code
        name:
          type: string
          title: Name
        source:
          type: string
          title: Source
          description: >-
            Runtime guessed from the requesting User-Agent (claude-code, codex,
            curl, …).
        sandbox_attached:
          type: boolean
          title: Sandbox Attached
          description: >-
            Approval will also claim the agent's sandbox into the approving
            account.
        starter_credit_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Starter Credit Cents
          description: >-
            Wallet credit approval would add, when the attached sandbox has
            placed an order and the account has not had one; null otherwise.
        status:
          type: string
          title: Status
          description: pending | approved | denied
      type: object
      required:
        - user_code
        - name
        - source
        - sandbox_attached
        - status
      title: DeviceCodeInfo
      description: |-
        What the approval page shows before the human decides. Public: it holds
        only what the agent chose to say about itself.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Zinc API key (Bearer zn_...)

````