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

# List orders

> Returns the orders attributed to your affiliates, newest first. Requires a brand key with scope `whitelabel:orders:read`.

Returns the orders attributed to your affiliates, newest first. Requires scope `whitelabel:orders:read`.


## OpenAPI

````yaml api-reference/brand/openapi.json GET /brand/whitelabel/orders
openapi: 3.1.0
info:
  title: Lomadee Brand API
  version: 1.0.0
  description: >-
    Read-only REST API for brands. Network and white-label programs have
    separate paths and separate keys.
servers:
  - url: https://api.lomadee.com.br
    description: Production
security:
  - x-api-key: []
tags:
  - name: Network
    description: >-
      Your affiliate program on the Lomadee network. Affiliates are never
      identified; only their channels are.
  - name: White label
    description: Your own white-label affiliate program.
paths:
  /brand/whitelabel/orders:
    get:
      tags:
        - White label
      summary: List orders
      description: >-
        Returns the orders attributed to your affiliates, newest first. Requires
        a brand key with scope `whitelabel:orders:read`.
      parameters:
        - name: page
          in: query
          required: false
          description: Page number.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          description: Items per page. Values above 100 return `400`.
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: from
          in: query
          required: false
          description: 'Start of the period (ISO 8601). Default: 30 days ago.'
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: false
          description: >-
            End of the period (ISO 8601). Default: now. At most 90 days after
            `from`.
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          required: false
          description: Filter by order status.
          schema:
            type: string
            enum:
              - pending
              - approved
              - canceled
              - reproved
        - name: commissionStatus
          in: query
          required: false
          description: Filter by commission status, for example `pending`.
          schema:
            type: string
        - name: affiliateId
          in: query
          required: false
          description: Only orders attributed to this affiliate.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Paginated orders
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WhitelabelOrder'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  headers:
    X-RateLimit-Limit:
      description: Requests allowed in the window.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left in the window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp when the window resets.
      schema:
        type: integer
  schemas:
    WhitelabelOrder:
      type: object
      properties:
        id:
          type: string
          description: Lomadee order id.
        orderId:
          type: string
          description: Order id in your store.
        status:
          type: string
          description: Order status in Lomadee.
          enum:
            - pending
            - approved
            - canceled
            - reproved
        commissionStatus:
          type: string
          description: Commission status.
          example: pending
        value:
          type: number
          description: Order total, in `currency`.
        currency:
          type: string
          description: ISO 4217 currency code.
          example: BRL
        commission:
          type: object
          properties:
            amount:
              type: number
              description: Total commission generated by the order, in `currency`.
        coupon:
          type:
            - string
            - 'null'
          description: Coupon code used in the order, when there is one.
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Product id in your store.
              name:
                type: string
                description: Product name.
              price:
                type: number
                description: Unit price, in `currency`.
              quantity:
                type: integer
                description: Units sold.
        createdAt:
          type: string
          description: When the order was created.
          format: date-time
        updatedAt:
          type: string
          description: Last change to the order.
          format: date-time
        utm:
          type: object
          properties:
            source:
              type:
                - string
                - 'null'
              description: '`utm_source` captured at the click.'
            medium:
              type:
                - string
                - 'null'
              description: '`utm_medium` captured at the click.'
            campaign:
              type:
                - string
                - 'null'
              description: >-
                `utm_campaign` captured at the click. It starts with the
                affiliate `utm`.
        affiliate:
          $ref: '#/components/schemas/AffiliateRef'
          description: >-
            Affiliate the order is credited to. `null` when the order has no
            affiliate.
    Meta:
      type: object
      properties:
        total:
          type: integer
          description: Total items for the filter.
        page:
          type: integer
          description: Current page.
        limit:
          type: integer
          description: Items per page.
        totalPages:
          type: integer
          description: Total pages.
    AffiliateRef:
      type: object
      properties:
        id:
          type: string
          description: Affiliate id in your program.
          format: uuid
        name:
          type: string
          description: Affiliate name.
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
          description: Human-readable description.
        code:
          type: string
          description: Error code.
          example: FORBIDDEN
      required:
        - success
        - message
        - code
  responses:
    BadRequest:
      description: Invalid parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: limit must not be greater than 100
            code: BAD_REQUEST
    Unauthorized:
      description: >-
        Missing, invalid, expired or revoked key, or a key that is not a brand
        key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Invalid API key
            code: UNAUTHORIZED
    Forbidden:
      description: The key belongs to the other vertical or lacks the scope of the route.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Insufficient scope
            code: FORBIDDEN
    TooManyRequests:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Too many requests
            code: TOO_MANY_REQUESTS
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Brand key created in the dashboard.

````

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