---
title: "Query Returns"
method: GET
path: "/v2/returns"
tags: ["return"]
---

# Query Returns

`GET /v2/returns`

Query all returns

## Query parameters

- `returnNumber` string
- `customerId` string, uuid — Represents a unique key for identifying a customer in the JTL system.
- `IsExisting` boolean
- `salesOrderId` string, uuid
- `returnStateId` string, uuid
- `pageNumber` integer
- `pageSize` integer

## Headers

- `x-tenant-id` string, uuid, required
- `x-runas` string
- `x-companyid` string

## Response `200`

Returns all non-pending returns.

- JTLWawiRestContractsModelsPagedListOfJTLWawiRestContractsModelsV1ReturnReturn — Represents a paginated list of items
  - `totalItems` integer — Gets or sets the total number of items available in the data source.
  - `pageNumber` integer — Gets or sets the current page number in the paginated list.
  - `pageSize` integer — Gets or sets the number of items per page in the paginated list.
  - `items` JTLWawiRestContractsModelsV1ReturnReturn[] — Gets or sets the collection of items contained in the paged list.
    - `id` string, uuid
    - `number` string — The number of the return.
    - `returnDate` string, date-time — The date when the return was created.
    - `customerId` string, uuid — Represents a unique key for identifying a customer in the JTL system.
    - `externalNumber` string — An arbitrary external reference number for identifying the return, provided only during creation and cannot be changed afterward.
    - `origin` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 — 0 = None, 1 = Email, 2 = Manual, 3 = Phone, 4 = Fax, 5 = FFN, 6 = SCX, 7 = RestAPI
    - `companyId` string, uuid — Represents a key for identifying a firm within the application.
    - `salesOrderId` string, uuid
    - `stateId` string, uuid
    - `warehouseId` string, uuid
    - `externalComment` string — The external comment of the sales order.
    - `internalComment` string — The internal comment of the sales order.
    - `contact` string — The contact of the return.
    - `transmitToSalesChannel` boolean — Indicates whether the return should be transmitted to the sales channel (e.g. SCX or Amazon).
  - `totalPages` integer — Gets the total number of pages based on the total number of items and the page size.
  - `hasPreviousPage` boolean — Gets a value indicating whether there is a previous page available in the paginated list.
  - `hasNextPage` boolean — Gets a value indicating whether there is a next page available.
  - `nextPageNumber` integer — Gets the number of the next page if there is one; otherwise, returns the total number of pages.
  - `previousPageNumber` integer — Gets the number of the previous page. If there is no previous page, it returns 1.

## Other responses

- `401`
- `402` — No licence available or the app has not been authorised by JTL.

---

[API](https://skmtc.net/jtl-software/apis/scx-authentication-api.md) · [All operations](https://skmtc.net/jtl-software/apis/scx-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jtl-software/scx-authentication-api/versions/f979b1ea6951/schema)
