Return_create: Invalid Line Item, it must belong to the same warehouse

The return_create mutation expects a warehouse_id. I assumed I could specify any warehouse_id that the user wants to send the return to, but instead I’m getting an error. Is there any way to override this?

{
  "errors": [
    {
      "message": "Invalid Line item 438437224, warehouse Primary. It must belong to the same warehouse 67914, kittehbox-01.",
      "operation": "return_create",
      "field": "return_create",
      "request_id": "5fa08391de1101213e063fa5",
      "code": 9
    }
  ],
  "data": {
    "return_create": null
  }
}

Hi @alubic
I apologize for the delayed response to this.
Are you still seeing the error? that one seems to be because the product doesn’t exist in the Primary warehouse. You will need to create it in the primary warehouse before returning it to that warehouse.
Thanks in advance!
Tom

Hello,

I’m trying to return it to a new warehouse I created inside ShipHero called “kittehbox-01” for testing purposes. Is it possible to return a line item to a warehouse where it doesn’t exist? Or, is it possible to associate a product with many warehouses? Our retailers would like to centralize their returns to a single warehouse, if possible.

Sure @alubic!
You can have the product in more than one warehouse and then you should be able to return the product to the warehouse you want.
Let me know if that doesn’t help.
Thanks again!
Tom

@tomasw

When I open up any product and click the pencil icon to edit the details, warehouse is a read-only field. How do I associate a product with multiple warehouses?

Hey @alubic
You have three ways of doing that:

  1. You can manually add it by using the + Add a product button at https://app.shiphero.com/dashboard/products (which should redirect you to https://app.shiphero.com/dashboard/products/add)

  2. You can download all the products from Primary at https://app.shiphero.com/dashboard/products/bulk-manage and then re-upload it to the other warehouse

  3. You can create the product using the Public API and the following mutation:

    mutation {
    product_add_to_warehouse(
    data: { sku: “123344455”, warehouse_id: “V2FyZWhvdXNlOjExNzkw” }
    ) {
    request_id
    complexity
    }
    }

Those 3 ways are completely valid*

*For 2 then you will need to add inventory using inventory upload (https://app.shiphero.com/dashboard/upload-inventory) once the product was created in the warehouse.

Let me know if there is anything I could explain better or help with.
Thanks again!
Tom

Hi @tomasw

I was able to successfully put the products into the second warehouse, but I still can’t seem to override the warehouse_id. “locked_to_warehouse_id” is null, but i’m still being told that I have to return to the primary warehouse. Please see the attached response:

{
  "errors": [
{
  "message": "Invalid Line item 438926552, warehouse Primary. It must belong to the same warehouse 67914, kittehbox-01.",
  "operation": "return_create",
  "field": "return_create",
  "request_id": "5fa1c91a1b675248ecbcd7dd",
  "code": 9
}
  ],
  "data": {
"return_create": null
  }
}

Hi @alubic!
I see what you are saying and I was able to reproduce on my test account. It looks like it’s not allowing a return to be created for a different warehouse than the one it belongs to.
It should, but it’s not working, so I just created a ticket for our engineers to check this.
In the meantime, for testing purposes would generate returns on the Primary warehouse work for you? (You can change the warehouse receiving afterward when receiving the return)
Thanks again!
Tom

Any update on this? I am having the same issue.

1 Like

I will check on this!

Hi, I reopened this. Thank you @Csraspini !

I am seeing this error in the following situation and would love some advice on how to fix it.

I create an order using the API. My warehouse is set to the ID of my custom warehouse, we’ll call it “custom” for now. I add a new item to that order through the UI. When I try and create a return on the order, the item that was added by hand throws the error: “Invalid Line item ######, warehouse Primary. It must belong to the same warehouse ######, custom”

It seems to me, when I add the new item to the order it is defaulting to Primary instead of what warehouse the order is using. I did not see a place to change this so it would be nice to know a solution.