UpdateProductReturn
Update a product return
Parameters
id - ID |
---|
Id of the product return |
input - ProductReturnInput |
---|
Data of the product return |
Example
mutation UpdateProductReturn($id: ID!, $input: ProductReturnInput!) {
UpdateProductReturn(id: $id, input: $input) {
id
label
dated_at
status
total_units
add_in_stock
customer {
id
label
}
order {
id
label
dated_at
status
}
line_items {
id
kit_line_item_id
is_kit
cost
description
quantity
on_hand
weight
location {
id
label
}
variant {
id
sku
label
type
product {
id
}
}
batch_numbers{
batch_number{
id
}
quantity
}
}
}
}
{
"id": 100007,
"input": {
"id": 100007,
"label": "PR00000008",
"total_units": 9765043.4345448,
"status": "pending",
"dated_at": "2020-01-08",
"add_in_stock": true,
"line_items": [
{
"id": 100216,
"temporary_id": 100216,
"is_kit": false,
"quantity": 8533600.7727417,
"cost": null,
"weight": 0,
"description": null,
"location": {
"id": 100010,
"label": "Warehouse"
},
"variant": {
"id": 100337,
"label": "Magnificent New Balance Jersey"
}
},
{
"id": 100217,
"temporary_id": 100217,
"is_kit": false,
"quantity": 1231441.3806024,
"cost": null,
"weight": 1,
"description": null,
"location": {
"id": 100010,
"label": "Warehouse"
},
"variant": {
"id": 100338,
"label": "Astonishing Hummel Jacket"
}
},
{
"id": 100218,
"temporary_id": 100218,
"is_kit": false,
"quantity": 20,
"cost": null,
"weight": 2,
"description": null,
"location": {
"id": 100010,
"label": "Warehouse"
},
"variant": {
"id": 100339,
"label": "Wondrous Lotto T-shirt"
},
"batch_numbers":[
{
"batch_number":{
"id":189000
},
"quantity":12
},
{
"batch_number":{
"id":189666
},
"quantity":8
}
]
}
]
}
}
Returned data
{
"data": {
"UpdateProductReturn": {
"id": 100007,
"label": "PR00000008",
"dated_at": "2020-01-08",
"status": "pending",
"total_units": 9765043.4345448,
"add_in_stock": true,
"customer": {
"id": 100012,
"label": "VonRueden"
},
"order": {
"id": 100010,
"label": "O00000011",
"dated_at": "2020-01-08",
"status": "completed"
},
"line_items": [
{
"id": 100216,
"kit_line_item_id": null,
"is_kit": false,
"cost": null,
"description": null,
"quantity": 8533600.7727417,
"on_hand": null,
"weight": 0,
"location": {
"id": 100010,
"label": "Warehouse"
},
"variant": {
"id": 100337,
"sku": "atH1CCStFk",
"label": "Magnificent New Balance Jersey",
"type": "normal",
"product": {
"id": 100289
}
},
"batch_numbers":[]
},
{
"id": 100217,
"kit_line_item_id": null,
"is_kit": false,
"cost": null,
"description": null,
"quantity": 1231441.3806024,
"on_hand": null,
"weight": 1,
"location": {
"id": 100010,
"label": "Warehouse"
},
"variant": {
"id": 100338,
"sku": "NHqHS74jgi",
"label": "Astonishing Hummel Jacket",
"type": "normal",
"product": {
"id": 100290
}
},
"batch_numbers":[]
},
{
"id": 100218,
"kit_line_item_id": null,
"is_kit": false,
"cost": null,
"description": null,
"quantity": 1.2812007,
"on_hand": null,
"weight": 2,
"location": {
"id": 100010,
"label": "Warehouse"
},
"variant": {
"id": 100339,
"sku": "updwKvC7nY",
"label": "Wondrous Lotto T-shirt",
"type": "normal",
"product": {
"id": 100291
}
},
"batch_numbers":[
{
"batch_number":{
"id":189000
},
"quantity":12
},
{
"batch_number":{
"id":189666
},
"quantity":8
}
]
}
]
}
}
}
ProductReturnInput data type
id - Int |
---|
Unique identifier of the product return |
label - String |
---|
Title of the product return |
total_units - Float |
---|
Total units of the product return |
status - Enum |
---|
Status of the product return (enum values : pending, cancelled, completed, unpublished). |
add_in_stock - Boolean |
---|
If true, the product return add quantities in stocks when created |
dated_at - Date |
---|
Date of the product return |
line_items - LineItemInput - Subquery |
---|
List of the line items of the order. |