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

# Listar pedidos

> Histórico de pedidos do produtor, paginado. Escopo: `orders:read`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/orders/history
openapi: 3.0.3
info:
  title: Ticto API v2
  version: 2.0.0
  description: >-
    API pública da Ticto para criar produtos e ofertas e ler pedidos,
    assinaturas e saques. Autenticação por token Bearer com escopos granulares.
    Todo acesso é isolado ao produtor dono do token — por construção, não por
    checagem por endpoint.
servers:
  - url: https://api.ticto.cloud
    description: Produção (tokens ticto_live_)
  - url: https://sandbox.ticto.cloud
    description: Sandbox (tokens ticto_test_)
security:
  - bearerAuth: []
tags:
  - name: Produtos
    description: Criação e leitura de produtos.
  - name: Ofertas
    description: Criação e leitura de ofertas de um produto.
  - name: Pedidos
    description: Leitura de pedidos (paridade com a API v1).
  - name: Assinaturas
    description: Leitura de assinaturas (paridade com a API v1).
  - name: Saques
    description: Leitura de saques/cashouts (paridade com a API v1).
paths:
  /api/v2/orders/history:
    get:
      tags:
        - Pedidos
      summary: Listar pedidos
      description: 'Histórico de pedidos do produtor, paginado. Escopo: `orders:read`.'
      operationId: listOrders
      parameters:
        - name: paginate
          in: query
          schema:
            type: integer
            default: 100
            maximum: 1000
          description: Itens por página.
      responses:
        '200':
          description: Histórico de pedidos.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - bearerAuth:
            - orders:read
components:
  schemas:
    OrderList:
      type: object
      description: >-
        Histórico de pedidos, paginado (paridade 1:1 com o relatório de
        comissões da v1). Envelope do paginador: `data` + `links` + `meta`.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CommissionItem'
        links:
          $ref: '#/components/schemas/PaginatorLinks'
        meta:
          $ref: '#/components/schemas/PaginatorMeta'
    CommissionItem:
      type: object
      description: >-
        Um item do histórico de pedidos (uma comissão). Espelha o relatório de
        comissões da v1.
      properties:
        id:
          type: integer
        type:
          type: string
          description: Tipo do item (main, bump, upsell).
          example: main
        commissioned_id:
          type: integer
        commissioned_name:
          type: string
        commission:
          type: integer
          description: Valor da comissão em centavos.
        producer_id:
          type: integer
        producer_name:
          type: string
        producer_email:
          type: string
        producer_document:
          type: string
        value:
          type: integer
          description: Valor do item em centavos.
        order_id:
          type: integer
        affiliates:
          type: array
          items:
            type: object
        query_params:
          type: object
          nullable: true
          description: >-
            Parâmetros da URL do checkout no momento da compra (UTMs, código da
            oferta, evento do pixel). `null` quando a venda não carregou
            parâmetros.
          example:
            utm_source: google
            utm_medium: cpc
            utm_campaign: black_friday
            code: O709D4B48
            event: InitiateCheckout
        tracking:
          allOf:
            - $ref: '#/components/schemas/Tracking'
          description: >-
            Atribuição de campanha normalizada. Paridade 1:1 com o webhook v2 —
            campos ausentes vêm como `"Não Informado"` (nunca faltam).
        checkout_url:
          type: string
          nullable: true
          description: >-
            Link do checkout da oferta desta venda (base do checkout + código da
            oferta). `null` quando a oferta não tem código.
          example: https://checkout.ticto.app/O709D4B48
        transaction:
          type: object
          description: Dados da transação (status, método, histórico).
        offer:
          type: object
          properties:
            id:
              type: integer
            code:
              type: string
            name:
              type: string
            description:
              type: string
              nullable: true
            price:
              type: integer
              description: Em centavos.
            is_subscription:
              type: boolean
            interval:
              type: integer
              nullable: true
            trial_days:
              type: integer
              nullable: true
            first_charge_price:
              type: integer
              nullable: true
        product:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            is_subscription:
              type: boolean
            type:
              type: string
            refund_deadline:
              type: integer
            has_invoice_integration:
              type: boolean
        customer:
          type: object
          description: >-
            Dados do comprador (anonimizados quando o afiliado não tem acesso
            aos dados do cliente).
        order:
          type: object
          properties:
            id:
              type: integer
            hash:
              type: string
            has_bump:
              type: boolean
            from_mozart:
              type: boolean
            is_upsell:
              type: boolean
            type:
              type: string
        order_item:
          type: object
          properties:
            id:
              type: integer
            amount:
              type: integer
            status:
              type: string
            quantity:
              type: integer
        has_two_cards:
          type: boolean
        bounced_email:
          type: boolean
          nullable: true
        subscription_id:
          type: integer
          nullable: true
        is_smart_installment:
          type: boolean
        approved_date:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      example:
        id: 54321
        type: main
        commissioned_id: 8801
        commissioned_name: João Produtor
        commission: 19900
        producer_id: 8801
        producer_name: João Produtor
        producer_email: joao@exemplo.com
        producer_document: 123.456.789-00
        value: 19900
        order_id: 90715
        affiliates: []
        query_params:
          utm_source: google
          utm_medium: cpc
          utm_campaign: black_friday
          code: O709D4B48
          event: InitiateCheckout
        tracking:
          event: InitiateCheckout
          utm_source: google
          utm_medium: cpc
          utm_campaign: black_friday
          utm_content: Não Informado
          utm_term: Não Informado
          src: facebook
          sck: facebook
          manychat_user_id: Não Informado
        checkout_url: https://checkout.ticto.app/O709D4B48
        transaction:
          id: 123456
          hash: TRX7K2P9QW
          status: authorized
          payment_method: credit_card
          paid_amount: 19900
          created_at: 01/06/2026 14:32:10
        offer:
          id: 11
          code: O709D4B48
          name: Plano Anual
          description: Acesso por 12 meses
          price: 19900
          is_subscription: false
          interval: null
          trial_days: null
          first_charge_price: null
        product:
          id: 305
          name: Curso de Copywriting
          is_subscription: false
          type: course
          refund_deadline: 7
          has_invoice_integration: false
        customer:
          name: Maria Souza
          email: maria@exemplo.com
          cpf: 987.654.321-00
        order:
          id: 90715
          hash: TOP0106WOC15DK
          has_bump: false
          from_mozart: false
          is_upsell: false
          type: main
        order_item:
          id: 77120
          amount: 19900
          status: authorized
          quantity: 1
        has_two_cards: false
        bounced_email: false
        subscription_id: null
        is_smart_installment: false
        approved_date: 01/06/2026 14:32:12
        created_at: 01/06/2026 14:32:10
        updated_at: 01/06/2026 14:32:12
    PaginatorLinks:
      type: object
      properties:
        first:
          type: string
          nullable: true
        last:
          type: string
          nullable: true
        prev:
          type: string
          nullable: true
        next:
          type: string
          nullable: true
    PaginatorMeta:
      type: object
      description: >-
        Metadados de paginação dos endpoints de leitura (paginador do Laravel,
        paridade com a v1).
      properties:
        current_page:
          type: integer
        from:
          type: integer
          nullable: true
        to:
          type: integer
          nullable: true
        per_page:
          type: integer
        last_page:
          type: integer
        total:
          type: integer
        path:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
          example: insufficient_scope
        message:
          type: string
          example: 'Token is missing the required ability: orders:read.'
        request_id:
          type: string
          nullable: true
    Tracking:
      type: object
      description: >-
        Atribuição de campanha da venda, normalizada e idêntica à do webhook v2.
        Todos os campos são sempre devolvidos; quando a venda não carregou o
        dado, o valor é a string `"Não Informado"`.
      properties:
        event:
          type: string
          description: Evento do pixel no checkout.
          example: InitiateCheckout
        utm_source:
          type: string
          example: google
        utm_medium:
          type: string
          example: cpc
        utm_campaign:
          type: string
          example: black_friday
        utm_content:
          type: string
          example: Não Informado
        utm_term:
          type: string
          example: Não Informado
        src:
          type: string
          description: Origem (parâmetro `src`).
          example: facebook
        sck:
          type: string
          description: Sub-origem (`sck`); quando ausente, cai para o valor de `src`.
          example: facebook
        manychat_user_id:
          type: string
          description: ID do usuário no ManyChat, quando a venda veio de um fluxo ManyChat.
          example: Não Informado
  responses:
    Unauthorized:
      description: Token ausente, inválido ou expirado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: Invalid or expired token.
            request_id: null
    Forbidden:
      description: O token não tem o escopo exigido.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient_scope
            message: 'Token is missing the required ability: orders:read.'
            request_id: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token opaco no formato `ticto_live_...` (produção) ou `ticto_test_...`
        (sandbox). Enviado como `Authorization: Bearer <token>`.

````

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