Product returns are the documents recording goods returned by customers and the reason for the return.
GraphQL
query {
ProductReturn (id: 100012) {
id
label
}
}
GraphQL
query {
ProductReturns {
data {
id
label
}
}
}
id Unique identifier of the product return
label Title of the product return
total_units Total units of the product return
status Status of the product return (enum values : pending, cancelled, completed, unpublished).
add_in_stock If true, the product return adds quantities in stock when created.
dated_at Date of the product return.
customer Customer of the product return.
order Order the product return is created from.
line_items List of the line items of the order.
integrations List of the ID of the items of the integrated solutions linked to this order.
has_batch_numbers Define if the product return has batch numbers.
tracking_completed If the product return has batch numbers, are they all allocated.
You can create filters based on following fields
label Example: { "column" : "LABEL", "operator" : "LIKE", "value" : "%011%" }
status Example: { column": "STATUS", "operator": "EQ", "value": {"id": "completed"}
total_units Example: { "column": "TOTAL_UNITS", "operator": "GT", "value": 50 }
add_in_stock Example: { column": "ADD_IN_STOCK", "operator": "EQ", "value": true }
dated_at Example: { "column": "DATED_AT", "operator": "EQ", "value": "2024-01-11" }
customer_id Example: { "column": "CUSTOMER_ID", "operator": "EQ", "value": {"id": 100002} }
variant_id Product return containing this variant Example: { "column": "VARIANT_ID", "operator": "EQ", "value": 100076 }
variant_label Example: { "column": "VARIANT_LABEL", "operator": "EQ", "value": "NICE SHOES" }
variant_sku Example: { "column": "VARIANT_SKU", "operator": "EQ", "value": "10ABC45" }
batch_number_id Example: { "column": "BATCH_NUMBER_ID", "operator": "EQ", "value": "100024" }
tracking_completed Example: { "column": "TRACKING_COMPLETED", "operator": "EQ", "value": {"id": true} }
has_batch_numbers Example :{ column": "HAS_BATCH_NUMBERS", "operator": "EQ", "value": {"id": true} }
You can sort data based on following fields : id, label, total_units, status, add_in_stock, dated_at, created_at, customer_id
GraphQL
query ProductReturns(
$orderBy: [QueryProductReturnOrderByOrderByClause!],
$first: Int,
$page: Int
) {
ProductReturns(
orderBy: $orderBy
first: $first
page: $page
) {
paginatorInfo {
total
count
currentPage
perPage
}
data {
id
label
customer {
id
label
}
dated_at
}
}
}
Variables (JSON)
{
"orderBy": [
{
"column": "DATED_AT",
"order": "DESC"
}
],
"first": 50,
"page": 1,
}
GraphQL
query ProductReturns(
$where: QueryProductReturnsWhereWhereConditions,
$first: Int,
$page: Int
) {
Orders(
where: $where
first: $first
page: $page
) {
paginatorInfo {
total
}
data {
id
label
customer {
id
label
}
dated_at
}
}
}
JSON
{
"first": 50,
"page": 1,
"where": {
"AND": [
{
"AND": [
{
"column": "STATUS",
"operator": "EQ",
"value": {
"id": "active",
}
},
{
"column": "CUSTOMER_ID",
"operator": "EQ",
"value": {
"id": 100000,
}
}
]
}
]
}
}
JSON
{
"data": {
"ProductReturns": {
"paginatorInfo": {
"total": 1,
"count": 1,
"currentPage": 1,
"perPage": 50
},
"data": [
{
"id": 100006,
"label": "PR00000007",
"customer": {
"id": 100000,
"label": "Zieme"
},
"dated_at": "1021-07-02"
}
]
}
}
}
# Enums
## ProductReturnStatus enum
| Value | Description |
| :--- | :--- |
| `pending` | The product return is pending |
| `cancelled` | The product return is cancelled |
| `completed` | The product return is completed |
| `unpublished` | The product return is not yet published |