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

# Get product by ID

> Retrieve a single product by its ID for the authenticated merchant.



## OpenAPI

````yaml /openapi.json get /v1/products/{product_id}
openapi: 3.1.0
info:
  title: YV Business API
  description: >-
    Public API for YaVendio merchants to access orders, product catalog,
    conversations, contacts and company profile, and to send WhatsApp template
    messages.


    ## Authentication


    All endpoints require a valid API key sent via the `X-API-Key` header. API
    keys are created and managed from the [YaVendio Dashboard](https://ya.onl)
    under **Settings → API Keys**.


    Use the **Authorize** button above to set your key for all requests.


    Every endpoint declares the scope it requires (e.g. `orders:read`,
    `products:write`, `conversations:read`, `contacts:read`, `company:read`,
    `outbound:send`, `outbound:read`), listed on its reference page. Keys
    created from the dashboard today carry no scopes and therefore have full
    access; a key that has scopes but lacks the one an endpoint requires gets
    `403 Forbidden`.


    ## Rate Limiting


    Requests are rate-limited per merchant. Every response includes
    `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`
    headers. Check these headers to know your current limit and remaining quota.
    When the limit is exceeded, the API responds with `429 Too Many Requests`
    and adds a `Retry-After` header.


    ## Pagination


    List endpoints support pagination via `page` and `limit` query parameters.
    Responses include a `pagination` object with `total_pages`, `total_items`,
    and `has_more` fields. Maximum `limit` is 100.
  version: 1.14.2
servers:
  - url: https://api.ya.onl
security: []
tags:
  - name: Orders
    description: Retrieve merchant orders and their details.
  - name: Products
    description: CRUD operations on merchant products.
  - name: Product Variants
    description: Manage variants of a product.
  - name: Product Options
    description: Manage product options.
  - name: Product Option Values
    description: Manage individual option values.
  - name: Product Media
    description: Manage media files attached to product variants.
  - name: Categories
    description: CRUD operations on merchant categories (tags).
  - name: Product Categories
    description: Assign and remove categories from products.
  - name: Catalogs
    description: Retrieve merchant catalogs.
  - name: Webhooks
    description: Manage webhook subscriptions for real-time order events.
  - name: Conversations
    description: Read WhatsApp conversations and their messages.
  - name: Contacts
    description: Retrieve campaign contacts.
  - name: Company
    description: Retrieve the merchant's company profile.
  - name: Templates
    description: >-
      List the WhatsApp templates approved for the merchant, with the variables
      each one expects.
  - name: Template Messages
    description: >-
      Send approved WhatsApp templates to customers and follow their delivery
      status.
paths:
  /v1/products/{product_id}:
    get:
      tags:
        - Products
      summary: Get product by ID
      description: Retrieve a single product by its ID for the authenticated merchant.
      operationId: get_product_v1_products__product_id__get
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            description: Unique product identifier
            title: Product Id
          description: Unique product identifier
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
          headers:
            X-RateLimit-Limit:
              description: Maximum number of requests allowed in the current window
              schema:
                type: integer
                example: 100
            X-RateLimit-Remaining:
              description: Number of requests remaining in the current window
              schema:
                type: integer
                example: 87
            X-RateLimit-Reset:
              description: Unix timestamp when the rate limit window resets
              schema:
                type: integer
                example: 1710288000
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '403':
          description: API key lacks the `products:read` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '404':
          description: Product not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              description: Maximum number of requests allowed in the current window
              schema:
                type: integer
                example: 100
            X-RateLimit-Remaining:
              description: Number of requests remaining in the current window
              schema:
                type: integer
                example: 87
            X-RateLimit-Reset:
              description: Unix timestamp when the rate limit window resets
              schema:
                type: integer
                example: 1710288000
            Retry-After:
              description: Seconds to wait before making another request
              schema:
                type: integer
                example: 30
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ProductResponse:
      properties:
        id:
          type: integer
          title: Id
          description: Unique product identifier
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: >-
            Date and time when the product was created (merchant's local
            timezone)
        name:
          type: string
          title: Name
          description: Product name
          examples:
            - Polo Negro
        description:
          type: string
          title: Description
          description: Short product description
        characteristics:
          anyOf:
            - type: string
            - type: 'null'
          title: Characteristics
          description: Detailed product description or specifications
        status:
          type: string
          title: Status
          description: Product status
          examples:
            - available
        categories:
          items:
            $ref: '#/components/schemas/ProductCategory'
          type: array
          title: Categories
          description: Product categories
        options:
          items:
            $ref: '#/components/schemas/ProductOption'
          type: array
          title: Options
          description: Configurable product options (e.g. size, color)
        variants:
          items:
            $ref: '#/components/schemas/ProductVariant'
          type: array
          title: Variants
          description: Product variants with pricing and availability
      type: object
      required:
        - id
        - name
        - description
        - status
        - categories
        - options
        - variants
      title: ProductResponse
      examples:
        - categories:
            - id: 1
              name: Ropa
            - id: 2
              name: Polos
          characteristics: >-
            Material: 100% algodón pima. Peso: 180g/m². Cuello redondo
            reforzado.
          created_at: '2026-01-15T10:00:00Z'
          description: Polo de algodón pima de alta calidad
          id: 9876
          name: Polo Negro
          options:
            - id: 10
              name: Talla
              values:
                - id: 100
                  name: S
                - id: 101
                  name: M
                - id: 102
                  name: L
          status: available
          variants:
            - base_price: 49.9
              currency: PEN
              id: 500
              media:
                - id: 1000
                  title: Front view
                  url: >-
                    https://cdn.yavendio.com/products/9876/polo-negro-m-front.jpg
              name: Polo Negro - Talla M
              status: available
    APIErrorResponse:
      properties:
        type:
          type: string
          title: Type
          description: Error type identifier, e.g. 'UnauthorizedError'
        detail:
          type: string
          title: Detail
          description: Human-readable error message
      type: object
      required:
        - type
        - detail
      title: APIErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProductCategory:
      properties:
        id:
          type: integer
          title: Id
          description: Unique category identifier
        name:
          type: string
          title: Name
          description: Category name
          examples:
            - Ropa
      type: object
      required:
        - id
        - name
      title: ProductCategory
    ProductOption:
      properties:
        id:
          type: integer
          title: Id
          description: Unique option identifier
        name:
          type: string
          title: Name
          description: Option group name
          examples:
            - Color
            - Size
        values:
          items:
            $ref: '#/components/schemas/ProductOptionValue'
          type: array
          title: Values
          description: Available values for this option
      type: object
      required:
        - id
        - name
        - values
      title: ProductOption
    ProductVariant:
      properties:
        id:
          type: integer
          title: Id
          description: Unique variant identifier
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
          description: Product variant SKU code
        name:
          type: string
          title: Name
          description: Variant display name
          examples:
            - Polo Negro - Talla M
        base_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Base Price
          description: Original price before discounts
          examples:
            - 49.9
        currency:
          $ref: '#/components/schemas/SupportedCurrency'
          description: Currency code (ISO 4217)
          examples:
            - PEN
        status:
          $ref: '#/components/schemas/VariantStatus'
          description: Variant availability status
          examples:
            - available
        media:
          items:
            $ref: '#/components/schemas/ProductMedia'
          type: array
          title: Media
          description: Media files for this variant
      type: object
      required:
        - id
        - name
        - base_price
        - currency
        - status
        - media
      title: ProductVariant
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ProductOptionValue:
      properties:
        id:
          type: integer
          title: Id
          description: Unique option value identifier
        name:
          type: string
          title: Name
          description: Option value label
          examples:
            - Red
            - XL
      type: object
      required:
        - id
        - name
      title: ProductOptionValue
    SupportedCurrency:
      type: string
      enum:
        - MXN
        - PEN
        - COP
        - CLP
        - ARS
        - BRL
        - VES
        - BOB
        - USD
        - PYG
        - UYU
        - CRC
        - EUR
        - GTQ
      title: SupportedCurrency
      description: List of supported currencies.
    VariantStatus:
      type: string
      enum:
        - not_available
        - available
      title: VariantStatus
      description: Variant status. Available means the variant has stock.
    ProductMedia:
      properties:
        id:
          type: integer
          title: Id
          description: Unique media identifier
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Media title
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Media URL
      type: object
      required:
        - id
      title: ProductMedia
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Merchant API key for authentication
      in: header
      name: X-API-Key

````

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