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

# List orders

> Retrieve a paginated list of orders.



## OpenAPI

````yaml api-reference/schema.yaml get /orders/
openapi: 3.0.3
info:
  title: ''
  version: 0.0.0
servers:
  - url: https://api.parceltracer.com/v1/external/
    description: Parcel Tracer api endpoint
security: []
paths:
  /orders/:
    get:
      tags:
        - Orders
      summary: List orders
      description: Retrieve a paginated list of orders.
      operationId: list_orders
      parameters:
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOrdersListDocsList'
              examples:
                OrdersListing:
                  value:
                    count: 123
                    next: http://api.example.org/accounts/?page=4
                    previous: http://api.example.org/accounts/?page=2
                    results:
                      - - order_id: '11'
                          reference_id: ''
                          is_exchange: 'false'
                          workflow: STANDARD
                          tracking_link: https://prod.parceltracer.app/tracking/xxxxx-yyyyyyy
                          is_critical: 'false'
                          merchant_location: 1
                          cod:
                            - - USD
                              - '20.00'
                          number_of_packages: 1
                          description: ''
                          notes: ''
                          return_reason: ''
                          delivery_state: CREATED
                          payment_state: UNPAID
                          merchant_invoice: 'null'
                          customer:
                            id: 6635
                            name: Joe
                            phone_number: '+9613123456'
                            secondary_phone_number: ''
                            email: joe@email.com
                          customer_location:
                            id: 6635
                            area:
                              id: 1
                              name_en: Aaiyat
                              name_ar: عيات
                              lat: 34.53534
                              long: 36.19682
                              district: Akkar
                              maps_link: http://maps.google.com/maps?q=34.53534,36.19682
                            directions: ''
                        - order_id: '17'
                          reference_id: ''
                          is_exchange: 'false'
                          workflow: STANDARD
                          tracking_link: https://prod.parceltracer.app/tracking/xxxxx-yyyyyyy
                          is_critical: 'false'
                          merchant_location: 1
                          cod:
                            - - USD
                              - '20.00'
                          number_of_packages: 1
                          description: ''
                          notes: ''
                          return_reason: ''
                          delivery_state: CREATED
                          payment_state: UNPAID
                          merchant_invoice: 'null'
                          customer:
                            id: 6635
                            name: Sara
                            phone_number: '+9613853335'
                            secondary_phone_number: ''
                            email: ''
                          customer_location:
                            id: 6635
                            area:
                              id: 2
                              name_en: El Hamra
                              name_ar: حمرا
                              lat: 33.89631
                              long: 35.48196
                              district: Beirut
                              maps_link: http://maps.google.com/maps?q=33.89631,35.48196
                            directions: ''
                  summary: Order listing.
          description: ''
      security:
        - MerchantAPIKey: []
components:
  schemas:
    PaginatedOrdersListDocsList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/OrdersListDocs'
    OrdersListDocs:
      type: object
      properties:
        order_id:
          type: integer
          description: Unique order identifier.
        reference_id:
          type: string
          description: Reference ID of the order, for internal tracking by the shop.
        is_critical:
          type: boolean
          description: >-
            Mark the order as critical for prioritized handling (subject to the
            delivery company load and availability)
        is_exchange:
          type: boolean
          description: >-
            ('Require pickup of a return package upon delivery.\n', 'This option
            is only applicable when workflow is STANDARD')
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow969Enum'
          description: |-
            Order workflow: STANDARD or RETURN.

            * `STANDARD` - STANDARD
            * `RETURN` - RETURN
        merchant_location:
          type: integer
          description: >-
            ("Unique identifier of the merchant's location.\n", 'This identifier
            should correspond to one of the pickup locations visible on the
            pickup locations page on Parcel Tracer.')
        customer:
          allOf:
            - $ref: '#/components/schemas/Customer'
          description: Customer object for the order.
        customer_location:
          allOf:
            - $ref: '#/components/schemas/ExternalLocation'
          description: Customer location for delivery or pickup.
        cod:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          description: >-
            Total amount to be collected upon delivery (or upon return).
            Example: [['USD', '123.5']]
        delivery_fee:
          type: array
          items:
            type: array
            items:
              type: string
            maxItems: 2
            minItems: 2
          description: >-
            Total amount charged for the delivery operation. Required only if
            workflow is STANDARD. Example: [['USD', '123.5']]
        number_of_packages:
          type: integer
          description: >-
            ('Number of packages in the order.\n', 'Should be greater than or
            equal to 1.')
        description:
          type: string
          description: Optional description of the order contents.
        notes:
          type: string
          description: >-
            Extra notes about the order, visible to delivery company, carriers
            and customers.
        payment_state:
          allOf:
            - $ref: '#/components/schemas/PaymentStateEnum'
          description: |-
            Payment state of the order.

            * `UNPAID` - UNPAID
            * `PENDING_PAYMENT_BY_DRIVER` - PENDING_PAYMENT_BY_DRIVER
            * `PAID_BY_DRIVER` - PAID_BY_DRIVER
            * `PENDING_PAYMENT_TO_MERCHANT` - PENDING_PAYMENT_TO_MERCHANT
            * `PAID_TO_MERCHANT` - PAID_TO_MERCHANT
        return_reason:
          type: string
          description: Applicable if the order is a return. Reason for the return.
      required:
        - cod
        - customer
        - customer_location
        - description
        - is_critical
        - is_exchange
        - merchant_location
        - notes
        - number_of_packages
        - order_id
        - payment_state
        - reference_id
        - workflow
    Workflow969Enum:
      enum:
        - STANDARD
        - RETURN
      type: string
      description: |-
        * `STANDARD` - STANDARD
        * `RETURN` - RETURN
    Customer:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        phone_number:
          type: string
        secondary_phone_number:
          type: string
        email:
          type: string
          format: email
      required:
        - id
        - name
        - phone_number
    ExternalLocation:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        area:
          $ref: '#/components/schemas/Area'
        directions:
          type: string
      required:
        - area
        - id
    PaymentStateEnum:
      enum:
        - UNPAID
        - PENDING_PAYMENT_BY_DRIVER
        - PAID_BY_DRIVER
        - PENDING_PAYMENT_TO_MERCHANT
        - PAID_TO_MERCHANT
      type: string
      description: |-
        * `UNPAID` - UNPAID
        * `PENDING_PAYMENT_BY_DRIVER` - PENDING_PAYMENT_BY_DRIVER
        * `PAID_BY_DRIVER` - PAID_BY_DRIVER
        * `PENDING_PAYMENT_TO_MERCHANT` - PENDING_PAYMENT_TO_MERCHANT
        * `PAID_TO_MERCHANT` - PAID_TO_MERCHANT
    Area:
      type: object
      description: |-
        A ModelSerializer that takes an additional `fields` argument that
        controls which fields should be displayed.
      properties:
        id:
          type: integer
          readOnly: true
        name_ar:
          type: string
          default: ''
          maxLength: 200
        name_en:
          type: string
          default: ''
          maxLength: 200
        district:
          $ref: '#/components/schemas/DistrictEnum'
        lat:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,15})?$
          nullable: true
        long:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,15})?$
          nullable: true
        maps_link:
          type: string
          nullable: true
          maxLength: 200
        code:
          type: string
          readOnly: true
      required:
        - code
        - id
    DistrictEnum:
      enum:
        - Zahleh
        - Hasbaya
        - Baalbek
        - Jezzine
        - Baabda
        - Jbeil
        - Zgharta
        - Bint Jbeil
        - Hermel
        - Marjeyoun
        - Bsharri
        - Aley
        - Rashaya
        - Miniyeh-Danniyeh
        - Tripoli
        - Tyre
        - Nabatieh
        - Chouf
        - Maatn
        - Western Beqaa
        - Akkar
        - Sidon
        - Batroun
        - Keserwan
        - Koura
        - Beirut
      type: string
      description: |-
        * `Zahleh` - Zahleh
        * `Hasbaya` - Hasbaya
        * `Baalbek` - Baalbek
        * `Jezzine` - Jezzine
        * `Baabda` - Baabda
        * `Jbeil` - Jbeil
        * `Zgharta` - Zgharta
        * `Bint Jbeil` - Bint Jbeil
        * `Hermel` - Hermel
        * `Marjeyoun` - Marjeyoun
        * `Bsharri` - Bsharri
        * `Aley` - Aley
        * `Rashaya` - Rashaya
        * `Miniyeh-Danniyeh` - Miniyeh-Danniyeh
        * `Tripoli` - Tripoli
        * `Tyre` - Tyre
        * `Nabatieh` - Nabatieh
        * `Chouf` - Chouf
        * `Maatn` - Maatn
        * `Western Beqaa` - Western Beqaa
        * `Akkar` - Akkar
        * `Sidon` - Sidon
        * `Batroun` - Batroun
        * `Keserwan` - Keserwan
        * `Koura` - Koura
        * `Beirut` - Beirut
  securitySchemes:
    MerchantAPIKey:
      type: apiKey
      in: header
      name: X-Api-Key

````