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

# Get All Returns

> Returns all Returns for the WMS connection associated with the provided access token.



## OpenAPI

````yaml get /wms/returns
openapi: 3.1.0
info:
  description: >

    Trackstar is a Unified API that provides standard endpoints for Supply Chain
    Logistics. We currently offer an API for Warehouse Management Systems (WMS).
  title: Trackstar API
  version: 0.1.0
servers:
  - description: Trackstar API
    url: https://production.trackstarhq.com
security: []
tags: []
externalDocs:
  description: Trackstar API Documentation
  url: https://docs.trackstarhq.com
paths:
  /wms/returns:
    get:
      tags:
        - wms
        - Returns
      summary: Get All Returns
      description: >-
        Returns all Returns for the WMS connection associated with the provided
        access token.
      operationId: get_wms_get_returns
      parameters:
        - in: header
          name: x-trackstar-api-key
          description: Your organization-level Trackstar API key.
          schema:
            type: string
            example: <x-trackstar-api-key>
          required: true
        - in: header
          name: x-trackstar-access-token
          description: >-
            Your user's access token for a specific integration (ShipHero,
            Extensiv, etc).
          schema:
            type: string
            example: <x-trackstar-access-token>
          required: true
        - in: query
          name: page_token
          description: >-
            The page token to use to retrieve the next page of results. If this
            field is omitted, there are no subsequent pages.
          schema:
            type:
              - string
              - 'null'
            example: page_token
          required: false
        - in: query
          name: limit
          description: The maximum number of items to return. The default is 1000.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            example: 1000
          required: false
        - in: query
          name: ids
          schema:
            $ref: '#/components/schemas/WmsReturnIdsQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: created_date
          description: >-
            Use this parameter to retrieve items filtered to a specific date
            range. For example, to get all items between 2023-03-10 and
            2023-03-22, you would send
            `created_date[gte]=2023-03-10T00:00:00Z&created_date[lte]=2023-03-22T00:00:00Z.`
            See the [filtering docs](/how-to-guides/about-the-api#filtering) for
            more. The date format must always be YYYY-MM-DDTHH:MM:SSZ. 
             Note: it is much more efficient to use a combination of `gte`/`lte` than it is to use `gt`/`lt`.
          schema:
            $ref: '#/components/schemas/WmsReturnCreated_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: updated_date
          description: Same syntax as `created_date`.
          schema:
            $ref: '#/components/schemas/WmsReturnUpdated_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: trackstar_created_date
          description: Same syntax as `created_date`.
          schema:
            $ref: '#/components/schemas/WmsReturnTrackstar_Created_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: trackstar_updated_date
          description: Same syntax as `created_date`.
          schema:
            $ref: '#/components/schemas/WmsReturnTrackstar_Updated_DateQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: trackstar_tags
          description: >-
            Filter by trackstar tags. Dict-shaped tags should be queried as
            "key:value" strings.
          schema:
            $ref: '#/components/schemas/WmsReturnTrackstar_Tags_FlatQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: status
          description: >-
            The status of the return. See the [return information](info) for
            more details.
          schema:
            $ref: '#/components/schemas/WmsReturnStatusQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: warehouse_customer_id
          description: The ID of the customer associated with the resource
          schema:
            $ref: '#/components/schemas/WmsReturnWarehouse_Customer_IdQueryParam'
          required: false
          style: deepObject
          explode: true
        - in: query
          name: order_id
          description: The ID of the order that the return is associated with.
          schema:
            $ref: '#/components/schemas/WmsReturnOrder_IdQueryParam'
          required: false
          style: deepObject
          explode: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WmsReturnsListEndpoint'
          description: Successful response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
components:
  schemas:
    WmsReturnIdsQueryParam:
      type: object
      properties:
        in:
          type: array
          description: >-
            A comma-separated list of resource IDs. If provided, all other query
            params are ignored.
          example: resource_id_1,resource_id_2
          items:
            type: string
            description: ''
      required:
        - in
      additionalProperties: false
      title: WmsReturnIdsQueryParam
    WmsReturnCreated_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        gt:
          type: string
          format: date-time
          description: ''
        gte:
          type: string
          format: date-time
          description: ''
        lt:
          type: string
          format: date-time
          description: ''
        lte:
          type: string
          format: date-time
          description: ''
      additionalProperties: false
      title: WmsReturnCreated_DateQueryParam
    WmsReturnUpdated_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        gt:
          type: string
          format: date-time
          description: ''
        gte:
          type: string
          format: date-time
          description: ''
        lt:
          type: string
          format: date-time
          description: ''
        lte:
          type: string
          format: date-time
          description: ''
      additionalProperties: false
      title: WmsReturnUpdated_DateQueryParam
    WmsReturnTrackstar_Created_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        gt:
          type: string
          format: date-time
          description: ''
        gte:
          type: string
          format: date-time
          description: ''
        lt:
          type: string
          format: date-time
          description: ''
        lte:
          type: string
          format: date-time
          description: ''
      additionalProperties: false
      title: WmsReturnTrackstar_Created_DateQueryParam
    WmsReturnTrackstar_Updated_DateQueryParam:
      type: object
      properties:
        eq:
          type: string
          format: date-time
          description: ''
          example: '2023-03-15T13:45:30Z'
        neq:
          type: string
          format: date-time
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            format: date-time
            description: ''
        gt:
          type: string
          format: date-time
          description: ''
        gte:
          type: string
          format: date-time
          description: ''
        lt:
          type: string
          format: date-time
          description: ''
        lte:
          type: string
          format: date-time
          description: ''
      additionalProperties: false
      title: WmsReturnTrackstar_Updated_DateQueryParam
    WmsReturnTrackstar_Tags_FlatQueryParam:
      type: object
      properties:
        contains:
          type: array
          description: Comma-separated.
          example: tag_1,tag_2:value_2
          items:
            type: string
            description: ''
        not_contains:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
      additionalProperties: false
      title: WmsReturnTrackstar_Tags_FlatQueryParam
    WmsReturnStatusQueryParam:
      type: object
      properties:
        eq:
          type: string
          enum:
            - open
            - in-transit
            - receiving
            - received
            - cancelled
            - other
          description: ''
          example: open
        neq:
          type: string
          enum:
            - open
            - in-transit
            - receiving
            - received
            - cancelled
            - other
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            enum:
              - open
              - in-transit
              - receiving
              - received
              - cancelled
              - other
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            enum:
              - open
              - in-transit
              - receiving
              - received
              - cancelled
              - other
            description: ''
        contains:
          type: string
          description: ''
        not_contains:
          type: string
          description: ''
      additionalProperties: false
      title: WmsReturnStatusQueryParam
    WmsReturnWarehouse_Customer_IdQueryParam:
      type: object
      properties:
        eq:
          type: string
          description: ''
          example: warehouse_cust_id
        neq:
          type: string
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
        contains:
          type: string
          description: ''
        not_contains:
          type: string
          description: ''
      additionalProperties: false
      title: WmsReturnWarehouse_Customer_IdQueryParam
    WmsReturnOrder_IdQueryParam:
      type: object
      properties:
        eq:
          type: string
          description: ''
          example: order_123
        neq:
          type: string
          description: ''
        in:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
        nin:
          type: array
          description: Comma-separated.
          items:
            type: string
            description: ''
        contains:
          type: string
          description: ''
        not_contains:
          type: string
          description: ''
      additionalProperties: false
      title: WmsReturnOrder_IdQueryParam
    WmsReturnsListEndpoint:
      type: object
      properties:
        data:
          type: array
          description: ''
          items:
            $ref: '#/components/schemas/WmsReturnApiItemSchema'
        next_token:
          type:
            - string
            - 'null'
          description: >-
            See [pagination](/how-to-guides/about-the-api#pagination) for more
            details.
          example: next_token
        total_count:
          type: integer
          description: The number of items returned.
          example: 1
      required:
        - data
        - next_token
        - total_count
      additionalProperties: false
      title: WmsReturnsListEndpoint
    ValidationError:
      properties:
        error:
          type: string
        detail:
          type: object
          properties:
            <location>:
              type: object
              properties:
                <field_name>:
                  type: array
                  items:
                    type: string
      required:
        - error
      type: object
      title: ValidationError
    WmsReturnApiItemSchema:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the return.
          example: return_id
        warehouse_customer_id:
          type:
            - string
            - 'null'
          description: >-
            The ID of the merchant/tenant/customer that owns the return. Can be
            passed into the [Warehouse
            Customer](/api-reference/wms-api/warehouse-customers/get-item)
            endpoint for more details.
          example: warehouse_customer_id
        created_date:
          type: string
          format: date-time
          description: The date the return was created.
          example: '2022-01-01T00:00:00Z'
        updated_date:
          type: string
          format: date-time
          description: The date the return was last updated.
          example: '2022-01-02T05:05:05Z'
        status:
          type: string
          enum:
            - open
            - in-transit
            - receiving
            - received
            - cancelled
            - other
          description: >-
            The status of the return. See the [return information](info) for
            more details.
          example: open
        raw_status:
          type:
            - string
            - 'null'
          description: The raw status (if available) returned directly from the WMS.
          example: raw_status
        order_id:
          type:
            - string
            - 'null'
          description: >-
            The ID of the order that the return is associated with. Can be
            passed into the [Order](/api-reference/wms-api/orders/get-item)
            endpoint for more details.
          example: order_id
        notes:
          type: array
          description: A list of notes associated with the return.
          example:
            - This is a note
          items:
            type: string
            description: This is a note
        line_items:
          type: array
          description: A list of inventory items included in the return.
          example:
            - inventory_item_id: item_id
              sku: sku
              expected_quantity: 1
              received_quantity: 1
              restocked_quantity: 1
              return_reason: Too Small
          items:
            $ref: '#/components/schemas/WmsReturnLineItem'
        shipments:
          type: array
          description: List of the shipments associated with the return.
          example:
            - tracking_number: tracking_number
              shipped_date: '2023-02-03T02:04:06Z'
              arrived_date: '2023-02-03T02:04:06Z'
              warehouse_id: warehouse_id
              carrier_id: carrier_id
              carrier_name: carrier_name
              scac: FDXG
              shipping_cost: 1.23
              measurements:
                length: 1
                width: 1
                height: 1
                unit: in
                weight: 1
                weight_unit: lb
              line_items:
                - inventory_item_id: item_id
                  sku: sku
                  quantity: 4
                  receiving_details:
                    - quantity: 1
                      condition: good
                      disposition: restocked
                    - quantity: 1
                      condition: damaged
                      disposition: scrapped
          items:
            $ref: '#/components/schemas/ReturnShipment'
        external_system_url:
          type:
            - string
            - 'null'
          description: URL link to the return in the external system (WMS/Freight etc).
          example: https://example.com/return/123
        trackstar_tags:
          type:
            - array
            - 'null'
          description: >-
            A list of custom tags associated with the resource. A tag can be
            either a string or a dictionary with one key-value pair.
          example:
            - tag1
            - tag2
            - tag3: value3
          items: {}
        additional_fields:
          type: object
          description: Integration-specific fields
          example:
            key: value
          additionalProperties: {}
        trackstar_created_date:
          type: string
          format: date-time
          description: ''
        trackstar_updated_date:
          type: string
          format: date-time
          description: ''
      required:
        - additional_fields
        - created_date
        - external_system_url
        - id
        - line_items
        - notes
        - order_id
        - raw_status
        - shipments
        - status
        - trackstar_created_date
        - trackstar_tags
        - trackstar_updated_date
        - updated_date
        - warehouse_customer_id
      additionalProperties: false
      title: WmsReturnApiItemSchema
    WmsReturnLineItem:
      type: object
      properties:
        inventory_item_id:
          type: string
          description: >-
            Can be passed into the
            [Inventory](/api-reference/wms-api/inventory/get-item) endpoint for
            more details.
          example: item_id
        sku:
          type:
            - string
            - 'null'
          description: ''
          example: sku
        expected_quantity:
          type: integer
          description: How many units are expected to arrive.
          example: 1
        received_quantity:
          type: integer
          description: How many units actually arrived.
          example: 1
        restocked_quantity:
          type:
            - integer
            - 'null'
          description: The number of returned inventory items that have been restocked.
          example: 1
        return_reason:
          type:
            - string
            - 'null'
          description: The reason for the return.
          example: Too Small
      required:
        - expected_quantity
        - inventory_item_id
        - received_quantity
        - restocked_quantity
        - return_reason
        - sku
      additionalProperties: false
      title: WmsReturnLineItem
    ReturnShipment:
      type: object
      properties:
        tracking_number:
          type:
            - string
            - 'null'
          description: The tracking number of the shipment.
        shipped_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the shipment was sent.
        arrived_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the shipment arrived.
        warehouse_id:
          type:
            - string
            - 'null'
          description: >-
            The ID of the warehouse the shipment was sent to. Can be passed into
            the [Warehouse](/api-reference/wms-api/warehouses/get-item) endpoint
            for more details.
          example: warehouse_id
        carrier_id:
          type:
            - string
            - 'null'
          description: The ID of the carrier for the shipment.
          example: carrier_id
        carrier_name:
          type:
            - string
            - 'null'
          description: The name of the carrier for the shipment.
          example: carrier_name
        scac:
          type:
            - string
            - 'null'
          description: The Standard Carrier Alpha Code (SCAC) for the shipment.
          example: FDXG
        shipping_cost:
          type:
            - number
            - 'null'
          description: The cost of the shipment.
          example: 0
        measurements:
          $ref: '#/components/schemas/ShipmentMeasurements'
        line_items:
          type: array
          description: List of inventory items items in the shipment.
          items:
            $ref: '#/components/schemas/ReturnShipmentLineItem'
      required:
        - arrived_date
        - carrier_id
        - carrier_name
        - line_items
        - measurements
        - scac
        - shipped_date
        - shipping_cost
        - tracking_number
        - warehouse_id
      additionalProperties: false
      title: ReturnShipment
    ShipmentMeasurements:
      type: object
      properties:
        length:
          type:
            - number
            - 'null'
          description: ''
          example: 1.5
        width:
          type:
            - number
            - 'null'
          description: ''
          example: 1.5
        height:
          type:
            - number
            - 'null'
          description: ''
          example: 1.5
        unit:
          type:
            - string
            - 'null'
          enum:
            - cm
            - in
          description: The unit of measurement for the size of the shipment.
          example: in
        weight:
          type:
            - number
            - 'null'
          description: ''
          example: 2.5
        weight_unit:
          type:
            - string
            - 'null'
          enum:
            - kg
            - oz
            - lb
          description: The unit of measurement for the weight of the shipment.
          example: lb
      required:
        - height
        - length
        - unit
        - weight
        - weight_unit
        - width
      additionalProperties: false
      title: ShipmentMeasurements
    ReturnShipmentLineItem:
      type: object
      properties:
        inventory_item_id:
          type: string
          description: >-
            Can be passed into the
            [Inventory](/api-reference/wms-api/inventory/get-item) endpoint for
            more details.
          example: item_id
        sku:
          type:
            - string
            - 'null'
          description: ''
          example: sku
        quantity:
          type: integer
          description: How many units were shipped.
          example: 1
        receiving_details:
          type: array
          description: Details about received items in the shipment.
          example:
            - quantity: 1
              condition: good
              disposition: restocked
          items:
            $ref: '#/components/schemas/ReceivingDetails'
      required:
        - inventory_item_id
        - quantity
        - receiving_details
        - sku
      additionalProperties: false
      title: ReturnShipmentLineItem
    ReceivingDetails:
      type: object
      properties:
        quantity:
          type: integer
          description: How many units were received in this condition and disposition.
          example: 1
        condition:
          type:
            - string
            - 'null'
          description: The condition of the item received.
          example: good
        disposition:
          type:
            - string
            - 'null'
          description: The disposition of the item received, eg restocked or discarded.
          example: restocked
      required:
        - condition
        - disposition
        - quantity
      additionalProperties: false
      title: ReceivingDetails

````