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

# Retrieve product

> Returns a single product with its variants, attributes, and images.

Returns `404` if the product is inactive, hidden from the storefront,
missing, or belongs to another store.




## OpenAPI

````yaml /openapi.yaml get /api/public/v1/products/{uid}
openapi: 3.1.0
info:
  title: Leyyow Public Commerce API
  version: 1.0.0
  summary: Build a custom storefront on top of a Leyyow store.
  description: >
    The Public Commerce API lets a merchant's own website or application read
    their

    Leyyow catalog, calculate delivery, create an order, and receive a Paystack

    payment link.


    ## Authentication


    Every request requires an API key created in the Leyyow suite under

    **Settings → Public API**, sent as a bearer token:


    ```

    Authorization: Bearer lyw_live_xxxxxxxxxxxxxxxx

    ```


    The key identifies exactly one store. Any product, variant, delivery option,

    shipping quote, or order that does not belong to that store returns `404`,

    regardless of whether the identifier exists elsewhere in Leyyow.


    Keys used in browser code are visible to anyone who opens the network

    inspector. Keep the key server-side where possible, and rotate it from the

    suite if it is abused.


    ## Response envelope


    Every response — success or failure — uses the same envelope:


    ```json

    { "error": null, "message": "Products retrieved.", "data": {} }

    ```


    On success `error` is `null` and `data` carries the payload. On failure

    `error` holds a human-readable reason, `data` is `null`, and the HTTP status

    carries the machine-readable meaning.


    ## Server-calculated amounts


    Prices, taxes, delivery fees, and totals are calculated by Leyyow. Order

    requests carry the customer's *choices* — variants, quantities, fulfilment

    method — never amounts. Any amount submitted in a request body is ignored.


    ## Rate limits


    Order creation and shipping quotes are rate limited more strictly than

    catalog reads. Exceeding a limit returns `429`.
  contact:
    name: Leyyow API support
    email: support@leyyow.com
servers:
  - url: https://sandbox.api.leyyow.com
    description: Sandbox — test keys, seeded data, no real orders
  - url: https://api.leyyow.com
    description: Production — live merchant data
security:
  - bearerAuth: []
tags:
  - name: Store
    description: Store profile, theme, categories, and fulfilment configuration.
  - name: Products
    description: Customer-facing catalog.
  - name: Delivery
    description: Fulfilment options and managed-delivery quotes.
  - name: Orders
    description: Order creation and status.
paths:
  /api/public/v1/products/{uid}:
    get:
      tags:
        - Products
      summary: Retrieve product
      description: |
        Returns a single product with its variants, attributes, and images.

        Returns `404` if the product is inactive, hidden from the storefront,
        missing, or belongs to another store.
      operationId: getProduct
      parameters:
        - name: uid
          in: path
          required: true
          description: Product `uid`.
          schema:
            type: string
            format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Product retrieved.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Envelope:
      type: object
      required:
        - error
        - message
        - data
      properties:
        error:
          type:
            - string
            - 'null'
          description: Human-readable failure reason, or `null` on success.
          examples:
            - null
        message:
          type: string
          description: Short status message.
          examples:
            - Request successful.
        data:
          description: Response payload. `null` on failure.
    Product:
      type: object
      properties:
        uid:
          type: string
          format: uuid
        name:
          type: string
          examples:
            - Ankara wrap dress
        description:
          type: string
        story:
          type: string
        category:
          type: string
          format: uuid
        category_name:
          type: string
          examples:
            - Dresses
        brand:
          type: string
        is_active:
          type: boolean
        is_hidden_from_storefront:
          type: boolean
        is_variable:
          type: boolean
          description: |
            `true` when the product has multiple selectable variants. When
            `false`, use the variant flagged `is_default`.
        variants:
          type: array
          items:
            $ref: '#/components/schemas/Variant'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ProductImage'
        total_stock:
          type: integer
          examples:
            - 24
        created_at:
          type: string
          format: date-time
    Variant:
      type: object
      properties:
        uid:
          type: string
          format: uuid
        name:
          type: string
          examples:
            - Medium / Blue
        sku:
          type: string
        price:
          $ref: '#/components/schemas/Money'
        promo_price:
          oneOf:
            - $ref: '#/components/schemas/Money'
            - type: 'null'
          description: Discounted price, or `null` when no promo is running.
        promo_expiry:
          type:
            - string
            - 'null'
          format: date-time
        weight:
          type: string
          description: Kilograms.
          examples:
            - '0.50'
        length:
          type: string
          description: Centimetres.
        width:
          type: string
        height:
          type: string
        is_active:
          type: boolean
        image:
          type:
            - string
            - 'null'
          format: uri
        is_default:
          type: boolean
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Attribute'
        available_stock:
          type: integer
          description: Physical stock on hand.
        sellable_stock:
          type: integer
          description: |
            Stock available to sell after reservations. This is the number to
            validate quantity against.
    ProductImage:
      type: object
      properties:
        uid:
          type: string
          format: uuid
        image:
          type: string
          format: uri
        alt_text:
          type: string
        is_primary:
          type: boolean
        order:
          type: integer
        sort_order:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - data
      properties:
        error:
          type: string
          description: Human-readable failure reason.
        message:
          type: string
        data:
          type: 'null'
    Money:
      type: string
      description: |
        Decimal amount as a string, in the store's currency (NGN). Kept as a
        string to avoid floating-point rounding. Example — `"45000.00"`.
      examples:
        - '45000.00'
    Attribute:
      type: object
      properties:
        uid:
          type: string
          format: uuid
        attribute:
          type: string
          format: uuid
        value:
          type: string
          format: uuid
        attribute_name:
          type: string
          examples:
            - Size
        attribute_value:
          type: string
          examples:
            - Medium
  responses:
    Unauthorized:
      description: API key missing, malformed, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid or revoked API key.
            message: Authentication failed.
            data: null
    NotFound:
      description: |
        Record not found, or not owned by the store linked to this API key.
        Identifiers from another store return `404` rather than `403`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Product not found.
            message: The requested resource does not exist.
            data: null
    RateLimited:
      description: Too many requests. Retry after the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded.
            message: Too many requests.
            data: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Store API key created in the Leyyow suite under Settings → Public API.
        Sent as `Authorization: Bearer <key>`.

````