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

# List orders

> List orders



## OpenAPI

````yaml get /v2/orders
openapi: 3.1.0
info:
  description: Open API's for WizCommerce API's
  title: WizCommerce Open API's
  termsOfService: https://wizcommerce.com/terms/
  contact:
    name: Tech Support
    url: https://help.wizcommerce.com/
    email: tech@wizcommerce.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.wizcommerce.com
    description: Production BaseURL
  - url: https://api-staging.sourcerer.tech
    description: Staging BaseURL
security: []
paths:
  /v2/orders:
    get:
      tags:
        - Orders
      summary: List orders
      description: List orders
      parameters:
        - example: 1
          x-order: '1'
          name: page
          in: query
          schema:
            type: integer
            minimum: 1
        - example: 25
          x-order: '2'
          name: page_size
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - example: '2021-01-01T00:00:00Z'
          x-order: '3'
          description: 'format: 2006-01-02T15:04:05Z (ISO 8601) UTC'
          name: created_after
          in: query
          schema:
            type: string
        - example: '2021-01-01T00:00:00Z'
          x-order: '4'
          description: 'format: 2006-01-02T15:04:05Z (ISO 8601) UTC'
          name: created_before
          in: query
          schema:
            type: string
        - example: '2021-01-01T00:00:00Z'
          x-order: '5'
          description: 'format: 2006-01-02T15:04:05Z (ISO 8601) UTC'
          name: updated_after
          in: query
          schema:
            type: string
        - example: '2021-01-01T00:00:00Z'
          x-order: '6'
          description: 'format: 2006-01-02T15:04:05Z (ISO 8601) UTC'
          name: updated_before
          in: query
          schema:
            type: string
        - example:
            - 01f5d171-d3e3-4b2b-bd57-0727194b5bed
          x-order: '7'
          description: >-
            Filter by order IDs. Repeat param for multiple:
            ?ids=<uuid>&ids=<uuid>
          name: ids
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - example:
            - ORD-123
          x-order: '8'
          description: >-
            Filter by order reference ID. Repeat param for multiple:
            ?reference_ids=ORD-123&reference_ids=ORD-124
          name: reference_ids
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - example:
            - 01f5d171-d3e3-4b2b-bd57-0727194b5bed
          x-order: '9'
          description: >-
            Filter by customer IDs. Repeat param for multiple:
            ?customer_ids=<uuid>&customer_ids=<uuid>
          name: customer_ids
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - example:
            - CUST_123
          x-order: '10'
          description: >-
            Filter by customer reference ID. Repeat param for multiple:
            ?customer_reference_ids=CUST_123&customer_reference_ids=CUST_124
          name: customer_reference_ids
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - example: updated_at
          x-order: '11'
          name: sort_by
          in: query
          schema:
            type: string
            enum:
              - created_at
              - updated_at
            default: updated_at
        - example: desc
          x-order: '12'
          name: sort
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - example: confirmed
          x-order: '13'
          description: If not provided, by default "confirmed" orders will be sent.
          name: order_status
          in: query
          schema:
            type: string
            enum:
              - draft
              - confirmed
              - cancelled
              - submitted
            default: confirmed
        - example: order
          x-order: '14'
          name: type
          in: query
          schema:
            type: string
            enum:
              - order
              - quote
        - example:
            - openapi
          x-order: '15'
          description: >-
            Include orders with these sources e.g. openapi(Open API),
            sales_rep(Wizorder), wizshop(Wizshop). Repeat param for multiple:
            ?source=openapi&source=sales_rep
          name: source
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - example:
            - sales_rep
          x-order: '16'
          description: >-
            Exclude orders with these sources e.g. openapi(Open API),
            sales_rep(Wizorder), wizshop(Wizshop). Repeat param for multiple:
            ?exclude_source=sales_rep&exclude_source=openapi
          name: exclude_source
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dtos.SuccessPaginationResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/dtosv2.OrderListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dtos.SuccessPaginationResponse:
      type: object
      properties:
        data:
          x-order: '1'
        pagination:
          allOf:
            - $ref: '#/components/schemas/dtos.PaginationResponse'
          x-order: '2'
    dtosv2.OrderListResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        reference_id:
          type: string
          x-order: '2'
          example: '1234567890'
        display_id:
          type: string
          x-order: '3'
          example: WC_1234567890
        customer_id:
          type: string
          x-order: '4'
          example: '1234567890'
        type:
          type: string
          enum:
            - order
            - quote
          x-order: '5'
          example: order
        status:
          type: string
          x-order: '6'
          example: active
        amount:
          type: number
          x-order: '7'
          example: 100
        amount_paid:
          type: number
          x-order: '8'
          example: 100
        payment_status:
          type: string
          x-order: '9'
          example: PAID
        fulfillment_status:
          type: string
          x-order: '10'
          example: >-
            PARTIALLY_DELIVERED UNFULFILLED PARTIALLY_FULFILLED FULFILLED
            IN_PROGRESS DELIVERED
        payment_method_id:
          type: string
          x-order: '11'
          example: '1234567890'
        payment_method:
          type: string
          x-order: '12'
          example: payment_method
        payment_term:
          type: string
          x-order: '13'
          example: payment_term
        shipping_method:
          type: string
          x-order: '14'
          example: shipping_method
        freight_term:
          type: string
          x-order: '15'
          example: freight_term
        internal_note:
          type: string
          x-order: '16'
          example: internal_note
        customer_note:
          type: string
          x-order: '17'
          example: customer_note
        shipment_date:
          type: string
          x-order: '18'
          example: '2021-01-01T00:00:00Z'
        due_date:
          type: string
          x-order: '19'
          example: '2021-01-01T00:00:00Z'
        source:
          description: Channel that last created or updated the order.
          type: string
          x-order: '20'
          example: cart
        entity_source:
          description: >-
            Channel the order was created in, e.g. wizorder (WizOrder), wizshop
            (Website), openapi. Written by the creating service, so other values
            are possible. Set at creation and not changed by later updates.
          type: string
          x-order: '20.5'
          example: wizorder
        price_list_id:
          type: string
          x-order: '21'
          example: '1234567890'
        primary_contact:
          allOf:
            - $ref: '#/components/schemas/dtosv2.OrderContactResponse'
          x-order: '22'
        shipping_address:
          allOf:
            - $ref: '#/components/schemas/dtosv2.OrderAddressResponse'
          x-order: '23'
        billing_address:
          allOf:
            - $ref: '#/components/schemas/dtosv2.OrderAddressResponse'
          x-order: '24'
        po_number:
          type: string
          x-order: '25'
        created_at:
          type: string
          x-order: '26'
          example: '2021-01-01T00:00:00Z'
        updated_at:
          type: string
          x-order: '27'
          example: '2021-01-01T00:00:00Z'
    errors.HttpError:
      type: object
      properties:
        code:
          type: string
          x-order: '1'
        message:
          type: string
          x-order: '2'
        details:
          type: array
          items:
            $ref: '#/components/schemas/errors.HttpErrorDetails'
          x-order: '3'
    dtos.PaginationResponse:
      type: object
      properties:
        total_records:
          type: integer
          x-order: '1'
          example: 100
        total_pages:
          type: integer
          x-order: '2'
          example: 10
        current_page:
          type: integer
          x-order: '3'
          example: 1
        next_page:
          type: integer
          x-order: '4'
          example: 2
        prev_page:
          type: integer
          x-order: '5'
          example: 0
        page_size:
          type: integer
          x-order: '6'
          example: 10
    dtosv2.OrderContactResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 12345678-90ab-cdef-1234-567890abcdef
        first_name:
          type: string
          x-order: '2'
          example: John
        last_name:
          type: string
          x-order: '3'
          example: Doe
        email:
          type: string
          x-order: '4'
          example: john.doe@example.com
        phone:
          type: string
          x-order: '5'
          example: '+14155552671'
        designation:
          type: string
          x-order: '6'
          example: Sales Manager
        reference_id:
          type: string
          x-order: '7'
          example: 12345678-90ab-cdef-1234-567890abcdef
    dtosv2.OrderAddressResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 12345678-90ab-cdef-1234-567890abcdef
        first_name:
          type: string
          x-order: '2'
          example: John
        last_name:
          type: string
          x-order: '3'
          example: Doe
        phone:
          type: string
          x-order: '4'
          example: '+14155552671'
        email:
          type: string
          x-order: '5'
          example: john.doe@example.com
        address_line_1:
          type: string
          x-order: '6'
          example: 123 Main St
        address_line_2:
          type: string
          x-order: '7'
          example: Apt 101
        city:
          type: string
          x-order: '8'
          example: Anytown
        state:
          type: string
          x-order: '9'
          example: CA
        state_info:
          allOf:
            - $ref: '#/components/schemas/dtosv2.StateInfoResponse'
          x-order: '10'
        country:
          type: string
          x-order: '11'
          example: US
        country_info:
          allOf:
            - $ref: '#/components/schemas/dtosv2.CountryInfoResponse'
          x-order: '12'
        zip_code:
          type: string
          x-order: '13'
          example: '12345'
        reference_id:
          type: string
          x-order: '14'
          example: '1234567890'
    errors.HttpErrorDetails:
      type: object
      properties:
        field:
          type: string
          x-order: '1'
        reason:
          type: string
          x-order: '2'
    dtosv2.StateInfoResponse:
      type: object
      properties:
        code:
          description: ISO 3166-2 code (country + state), e.g. US-CA
          type: string
          x-order: '1'
          example: US-CA
        short_code:
          description: State/region code within the country, e.g. CA
          type: string
          x-order: '2'
          example: CA
        name:
          description: Display name of the state/region, e.g. California
          type: string
          x-order: '3'
          example: California
    dtosv2.CountryInfoResponse:
      type: object
      properties:
        code:
          description: ISO 3166-1 alpha-3 (3-letter) country code, e.g. USA
          type: string
          x-order: '1'
          example: USA
        short_code:
          description: ISO 3166-1 alpha-2 (2-letter) country code, e.g. US
          type: string
          x-order: '2'
          example: US
        name:
          description: Display name of the country, e.g. United States
          type: string
          x-order: '3'
          example: United States
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````