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

# Listar pedidos

> Lista pedidos de comercio con paginación por cursor. No expone page, offset, total ni total_pages.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/orders
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/orders:
    get:
      tags:
        - API
      summary: Listar pedidos
      description: >-
        Lista pedidos de comercio con paginación por cursor. No expone page,
        offset, total ni total_pages.
      operationId: listApiOrders
      parameters:
        - name: query
          in: query
          required: false
          schema:
            type: string
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: date_from
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: date_to
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnum4ac9200c4a'
        - name: preparation_status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ApiSharedEnumb49e56b125'
      responses:
        '200':
          description: Pedidos obtenidos exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOrderListResponse'
        '400':
          description: Parámetros inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Parámetros inválidos
                      retryable: false
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: API key faltante o inválida
                      retryable: false
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Scopes insuficientes
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error interno del servidor
                      retryable: false
                      details: []
      x-codeSamples:
        - lang: typescript
          label: La Pyme SDK
          source: |
            import { Lapyme } from "lapyme";

            const lapyme = new Lapyme({
              bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
            });

            const orders = await lapyme.orders.listOrders({
              limit: 20,
            });
components:
  schemas:
    ApiSharedEnum4ac9200c4a:
      type: string
      enum:
        - open
        - completed
        - cancelled
    ApiSharedEnumb49e56b125:
      type: string
      enum:
        - unfulfilled
        - in_progress
        - partially_fulfilled
        - fulfilled
        - cancelled
    ApiOrderListResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                const: order
              id:
                type: string
                format: uuid
              order_number:
                type: string
              raw_order_number:
                type: integer
              order_date:
                type: string
                format: date-time
              customer_id:
                type: string
                format: uuid
              customer_name:
                type: string
              customer_tax_id:
                anyOf:
                  - type: string
                  - type: 'null'
              items_count:
                type: integer
              total_units:
                type: integer
              discount_amount:
                type: integer
                minimum: 0
              subtotal:
                type: integer
                minimum: 0
              tax_amount:
                type: integer
                minimum: 0
              total:
                type: integer
                minimum: 0
              currency:
                $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
              order_status:
                $ref: '#/components/schemas/ApiSharedEnum4ac9200c4a'
              preparation_status:
                $ref: '#/components/schemas/ApiSharedEnumb49e56b125'
              invoicing_status:
                $ref: '#/components/schemas/ApiSharedEnum2f67ddf0e8'
              notes:
                anyOf:
                  - type: string
                  - type: 'null'
              created_at:
                type: string
                format: date-time
              created_by_name:
                type: string
            required:
              - object
              - id
              - order_number
              - raw_order_number
              - order_date
              - customer_id
              - customer_name
              - customer_tax_id
              - items_count
              - total_units
              - discount_amount
              - subtotal
              - tax_amount
              - total
              - currency
              - order_status
              - preparation_status
              - invoicing_status
              - notes
              - created_at
              - created_by_name
            additionalProperties: false
        has_more:
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
        object:
          $ref: '#/components/schemas/ApiSharedEnum8d46e1ec20'
        url:
          type: string
          description: Requested list path.
      required:
        - request_id
        - data
        - has_more
        - next_cursor
        - object
        - url
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnum6cfb146157:
      type: string
      enum:
        - PES
        - DOL
    ApiSharedEnum2f67ddf0e8:
      type: string
      enum:
        - pending
        - partially_invoiced
        - invoiced
    ApiSharedEnum8d46e1ec20:
      type: string
      enum:
        - list
      description: List-envelope discriminator.
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````