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

# List customer orders

> Returns only the orders belonging to the given customer.



## OpenAPI

````yaml /openapi.yaml get /v1/customers/{id}/orders
openapi: 3.1.0
info:
  title: Lojou API
  version: 1.0.0
  description: |
    Official reference for the Lojou `/v1` API — everything a developer needs
    to create products, process orders, manage plans, and receive webhooks
    from a Lojou store.
servers:
  - url: https://api.lojou.app
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Health
  - name: OAuth
  - name: User
  - name: Products
  - name: Plans
  - name: Orders
  - name: Customers
  - name: Files
  - name: Webhooks
  - name: Discounts
  - name: Affiliates
paths:
  /v1/customers/{id}/orders:
    get:
      tags:
        - Customers
      summary: List customer orders
      description: Returns only the orders belonging to the given customer.
      operationId: getV1CustomerOrders
      parameters:
        - $ref: '#/components/parameters/IdParam'
        - $ref: '#/components/parameters/StatusCustomerOrderParam'
        - $ref: '#/components/parameters/PageParam'
        - $ref: '#/components/parameters/PerPageParam'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                status: success
                page: 1
                per_page: 20
                last_page: 1
                total: 3
                orders:
                  - id: 5537
                    order_number: '95423218'
                    amount: 197
                    currency: MZN
                    status: approved
                    created_at: '2026-08-28T20:16:33.000000Z'
                    updated_at: '2026-08-28T20:26:56.000000Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: No orders found for this customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: No orders found for this customer.
components:
  parameters:
    IdParam:
      name: id
      in: path
      required: true
      description: Resource identifier.
      schema:
        type: string
    StatusCustomerOrderParam:
      name: status
      in: query
      required: false
      schema:
        type: string
        enum:
          - approved
          - pending
          - cancelled
    PageParam:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
    PerPageParam:
      name: per_page
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Unauthorized user.
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Permission denied for this endpoint.
            error_code: insufficient_scope
            required_scopes:
              - orders.read
            missing_scopes:
              - orders.read
            granted_scopes:
              - products.read
              - products.write
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Send an API key or an OAuth access token in the `Authorization` header
        as a Bearer token. See [Authentication](/authentication) for details.

````