> ## 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.

# Get order detail

> Returns full details of a single order by order number.  Only orders belonging to the authenticated store are accessible — a valid order number from a different store returns 404.



## OpenAPI

````yaml /LeyyowPublicAPI(v2).yaml get /orders/{order_number}
openapi: 3.0.3
info:
  title: Leyyow Public API
  version: 1.0.0 (v2)
  description: >-
    The Leyyow Public API lets you build custom storefronts on top of any Leyyow
    merchant store.


    ## Authentication


    Every request must carry a merchant API key as a Bearer token:


    ```

    Authorization: Bearer lyw_<your-secret-key>

    ```


    Keys are scoped to a single store.  All responses contain only data that
    belongs to the store that issued the key.


    ## Rate limits


    | Throttle group | Limit |

    |---|---|

    | Catalogue endpoints (per key) | 1 000 / hour |

    | Catalogue endpoints (per IP) | 200 / hour |

    | Order creation (per key) | 50 / hour |

    | Shipping quotes (per key) | 100 / hour |


    When a limit is exceeded the API returns HTTP 429 with a `Retry-After`
    header indicating how many seconds to wait.


    ## Store scoping


    The `X-Store-Id` header is ignored.  Store identity is derived entirely from
    the API key — there is no way to access a different store's data using the
    same key.
servers:
  - url: /api/public/v1
    description: Leyyow Public API v1
security: []
paths:
  /orders/{order_number}:
    get:
      tags:
        - Orders
      summary: Get order detail
      description: >-
        Returns full details of a single order by order number.  Only orders
        belonging to the authenticated store are accessible — a valid order
        number from a different store returns 404.
      operationId: orders_retrieve
      parameters:
        - in: path
          name: order_number
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDetail'
              examples:
                OrderDetail:
                  value:
                    uid: 018e1234-0000-7000-a000-000000000100
                    order_number: RB-20250115-0042
                    source: storefront
                    store: 018e1234-0000-7000-a000-000000000001
                    store_name: Remi's Boutique
                    store_email: hello@remisboutique.com
                    store_phone: '+2348012345678'
                    logo: https://cdn.leyyow.com/stores/remis-boutique/logo.png
                    location: 018e1234-0000-7000-a000-000000000200
                    location_name: Lagos HQ
                    customer: 018e1234-0000-7000-a000-000000000300
                    customer_name: John Doe
                    customer_phone: '+2348011111111'
                    customer_email: john@example.com
                    customer_address: 5 Test Street, Victoria Island, Lagos
                    total_amount: '17500.00'
                    subtotal: '15000.00'
                    discount_amount: '0.00'
                    tax_amount: '1125.00'
                    tax_rate_used: '7.50'
                    total_paid: '0.00'
                    outstanding_balance: '17500.00'
                    payment_status: unpaid
                    payment_status_display: Unpaid
                    fulfilment_status: pending
                    fulfilment_status_display: Pending
                    fulfilment_method: delivery
                    delivery_fee: '1375.00'
                    manual_delivery_type: null
                    tracking_number: null
                    order_date: '2025-01-15'
                    has_shipping: false
                    created_at: '2025-01-15T10:30:00Z'
                    shipping_details: null
                    items:
                      - uid: 018e1234-0000-7000-a000-000000000400
                        variant: 018e1234-0000-7000-a000-000000000020
                        variant_name: Classic Ankara Dress — Small / Blue
                        sku: RB-ANKD-S-BLU
                        quantity: '1.00'
                        unit_price: '15000.00'
                        total_price: '15000.00'
                  summary: Order detail
          description: Order detail.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_Error'
              examples:
                InvalidKey:
                  value:
                    detail: Invalid or revoked API key.
                    error_code: AUTHENTICATION_FAILED
                  summary: Invalid key
          description: Authentication failed — key missing, invalid, or revoked.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_Error'
              examples:
                NotFound:
                  value:
                    detail: Not found.
                  summary: Not found
          description: Order not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_Error'
              examples:
                RateLimited:
                  value:
                    detail: Rate limit exceeded. Please retry in 120 seconds.
                    error_code: ENDPOINT_THROTTLED
                  summary: Rate limited
          description: >-
            Rate limit exceeded.  Retry after the number of seconds indicated in
            the `Retry-After` response header.


            | Throttle group | Limit |

            |---|---|

            | Catalogue endpoints — per API key | 1 000 / hour |

            | Catalogue endpoints — per IP address | 200 / hour |

            | Order creation — per API key | 50 / hour |

            | Shipping quotes — per API key | 100 / hour |
      security:
        - MerchantAPIKey: []
components:
  schemas:
    OrderDetail:
      type: object
      description: Serializer for public order details
      properties:
        uid:
          type: string
          format: uuid
          readOnly: true
        order_number:
          type: string
          description: Unique order number
          maxLength: 50
        source:
          allOf:
            - $ref: '#/components/schemas/SourceEnum'
          description: |-
            How the order was created

            * `internal` - Internal
            * `storefront` - Storefront
            * `popup_storefront` - Popup Storefront
            * `popup_internal` - Popup Internal
        store:
          type: string
          format: uuid
          description: Store where this order was placed
        store_name:
          type: string
          readOnly: true
        store_email:
          type: string
          format: email
          readOnly: true
        store_phone:
          type: string
          readOnly: true
        logo:
          type: string
          readOnly: true
        location:
          type: string
          format: uuid
          nullable: true
          description: Location where this order was placed
        location_name:
          type: string
          readOnly: true
        customer:
          type: string
          format: uuid
          nullable: true
          description: Customer who placed this order
        customer_name:
          type: string
          readOnly: true
        customer_phone:
          type: string
          readOnly: true
        customer_email:
          type: string
          format: email
          readOnly: true
        customer_address:
          type: string
          readOnly: true
        total_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          nullable: true
        subtotal:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          description: Order total before discount and delivery fee
        discount_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          description: Total discount amount applied
        tax_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          description: Tax amount applied to this order
        tax_rate_used:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,4})?$
          nullable: true
          description: Tax rate used when this order was created (e.g. 0.075 for 7.5%)
        total_paid:
          type: string
          readOnly: true
        outstanding_balance:
          type: string
          readOnly: true
        payment_status:
          $ref: '#/components/schemas/PaymentStatusEnum'
        payment_status_display:
          type: string
          readOnly: true
        fulfilment_status:
          $ref: '#/components/schemas/OrderDetailFulfilmentStatusEnum'
        fulfilment_status_display:
          type: string
          readOnly: true
        fulfilment_method:
          allOf:
            - $ref: '#/components/schemas/FulfilmentMethodEnum'
          description: |-
            How the order will be fulfilled

            * `pickup` - Pickup
            * `delivery` - Delivery
        delivery_fee:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          description: Delivery fee for this order
        manual_delivery_type:
          type: string
          readOnly: true
        tracking_number:
          type: string
          maxLength: 100
        order_date:
          type: string
          format: date
          nullable: true
          description: >-
            Date when the order was placed (for recording past orders). Defaults
            to current date if not provided.
        has_shipping:
          type: boolean
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        shipping_details:
          type: string
          readOnly: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
          readOnly: true
      required:
        - created_at
        - customer_address
        - customer_email
        - customer_name
        - customer_phone
        - fulfilment_status_display
        - has_shipping
        - items
        - location_name
        - logo
        - manual_delivery_type
        - order_number
        - outstanding_balance
        - payment_status_display
        - shipping_details
        - store
        - store_email
        - store_name
        - store_phone
        - total_paid
        - uid
    _Error:
      type: object
      properties:
        detail:
          type: string
        error_code:
          type: string
      required:
        - detail
    SourceEnum:
      enum:
        - internal
        - storefront
        - popup_storefront
        - popup_internal
      type: string
      description: |-
        * `internal` - Internal
        * `storefront` - Storefront
        * `popup_storefront` - Popup Storefront
        * `popup_internal` - Popup Internal
    PaymentStatusEnum:
      enum:
        - unpaid
        - partially_paid
        - paid
        - refunded
      type: string
      description: |-
        * `unpaid` - Unpaid
        * `partially_paid` - Partially Paid
        * `paid` - Paid
        * `refunded` - Refunded
    OrderDetailFulfilmentStatusEnum:
      enum:
        - unfulfilled
        - fulfilled
        - returned
        - partially_fulfilled
        - voided
        - cancelled
      type: string
      description: |-
        * `unfulfilled` - Unfulfilled
        * `fulfilled` - Fulfilled
        * `returned` - Returned
        * `partially_fulfilled` - Partially Fulfilled
        * `voided` - Voided
        * `cancelled` - Cancelled
    FulfilmentMethodEnum:
      enum:
        - pickup
        - delivery
      type: string
      description: |-
        * `pickup` - Pickup
        * `delivery` - Delivery
    OrderItem:
      type: object
      description: Serializer for order items
      properties:
        uid:
          type: string
          format: uuid
          readOnly: true
        variant:
          type: string
          format: uuid
          nullable: true
        variant_name:
          type: string
          readOnly: true
        variant_sku:
          type: string
          readOnly: true
        product_name:
          type: string
          readOnly: true
        popup_inventory:
          type: string
          format: uuid
          nullable: true
          description: Popup event inventory item this order item is associated with
        quantity:
          type: integer
          maximum: 2147483647
          minimum: 0
        original_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Variant's regular price at time of order creation
        unit_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
        total_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
          description: >-
            Total price of the item; it could also be the discounted or
            promotional price
        discount_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
          description: >-
            Coupon discount applied to this item (only set for
            product/category-scoped coupons)
        total_cost:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          description: Total inventory cost captured at reservation time
        fulfilment_status:
          allOf:
            - $ref: '#/components/schemas/FulfilmentStatusE48Enum'
          description: |-
            Fulfilment status of this item

            * `unfulfilled` - Unfulfilled
            * `fulfilled` - Fulfilled
            * `returned` - Returned
            * `partially_fulfilled` - Partially Fulfilled
        qty_fulfilled:
          type: integer
          maximum: 2147483647
          minimum: 0
        notes:
          type: string
          description: Customer notes for this item (e.g., 'No onions', 'Extra sauce')
        attributes:
          type: string
          readOnly: true
        product_images:
          type: string
          readOnly: true
      required:
        - attributes
        - discount_amount
        - original_price
        - product_images
        - product_name
        - total_price
        - uid
        - unit_price
        - variant_name
        - variant_sku
    FulfilmentStatusE48Enum:
      enum:
        - unfulfilled
        - fulfilled
        - returned
        - partially_fulfilled
      type: string
      description: |-
        * `unfulfilled` - Unfulfilled
        * `fulfilled` - Fulfilled
        * `returned` - Returned
        * `partially_fulfilled` - Partially Fulfilled
  securitySchemes:
    MerchantAPIKey:
      type: http
      scheme: bearer
      bearerFormat: lyw_<secret>
      description: >-
        Authenticate using a Leyyow merchant API key.


        Include the key in every request as a Bearer token:


        ```

        Authorization: Bearer lyw_<your-secret-key>

        ```


        Keys are scoped to a single store. All endpoints return data belonging
        to the store that issued the key — there is no `X-Store-Id` override.


        Keys are created in the Leyyow merchant dashboard under **Settings →
        Developer → API Keys**.

````