Can I create a return on a regular kit sku but only for one of the components via API?
Yes, you should be able to create the return against the component SKU by passing the component as the return line item and setting is_component: true.
Example shape:
mutation {
return_create(data: {
order_id: "ORDER_ID",
warehouse_id: "WAREHOUSE_ID",
return_reason: "Customer return",
line_items: [
{
sku: "COMPONENT_SKU",
quantity: 1,
return_reason: "Customer return",
condition: "Good",
is_component: true
}
]
}) {
request_id
return {
id
legacy_id
status
}
}
}
The important part is that the sku should be the component SKU, not the parent kit SKU, and is_component should be set to true.
I haven’t tested this against your account specifically, so if you still get a validation error, please share the exact error and whether the original order line item was shipped as the kit parent or exploded into components.
Additionally, there is a new field in your user profile in this forum where you can complete your ShipHero account ID. With that info I can give you a more accurate response.
{
“body”: {
“errors”: [
{
“message”: “No line item with sku ‘secri2’ exists for order ‘841957994’”,
“operation”: “return_create”,
“field”: “return_create”,
“request_id”: “6a3d8719673ac62ffbc30398”,
“code”: 5
}
],
“data”: {
“return_create”: null
},
“extensions”: {
“throttling”: {
“estimated_complexity”: 10,
“cost”: 10,
“cost_detail”: {
“return_create”: {
“items_count”: 0,
“cost”: 10,
“total_cost”: 10,
“fields”: {}
}
},
“user_quota”: {
“credits_remaining”: 3994,
“max_available”: 4004,
“increment_rate”: 60
}
}
}
}
Seems this kit is a regular kit. Can you try with a build kit?
Anyway I’m opening a ticket for the bug, you should be able to return regular kit items too.
previously I had success with build kits
Ok, a ticket was open to fix this bugs.