"Invalid Line item" error when creating a return

Hi there,

I’m trying to create a return via API using the return_create mutation.

mutation {
  return_create(
    data: {
      order_id: "T3JkZXI6MTk2MTA4OTI2"
      warehouse_id: "V2FyZWhvdXNlOjcxODI0"
      return_reason: "No longer wants"
      label_type: FREE
      label_cost: "0.00"
      address: {
        name: "Tester One"
        address1: "55 main street"
        address2: "BLDG 4"
        city: "New York"
        state: "NY"
        country: "US"
        zip: "10014"
        phone: "8555555555"
      }
      dimensions: {
        weight: "0.00"
        height: "0.00"
        width: "0.00"
        length: "0.00"
      }
      shipping_carrier: "genericlabel"
      shipping_method: "Pick Up"
      line_items: {
        sku: "BDC-001-00-00-05"
        quantity: 1
        return_reason: "No longer wants"
        condition: "new"
      }
    }
  ) {
    request_id
    complexity
    return {
      id
      order_id
      reason
      status
      line_items {
        id
        line_item_id
        product_id
        quantity
        reason
      }
      created_at
    }
  }
}

The warehouse ID I’ve specified is for the Capitol Hill warehouse. However, I receive an error message:

"message": "Invalid Line item 532147435, warehouse Primary. It must belong to the same warehouse 71824, Capitol Hill."

What does this mean?

Hi @bshap27
Thanks for reaching out!

It looks like there might be an issue with this line item. Allow me to ask internally why that might be happening and provide an update asap.
As far as I could check, the Mutation looks perfectly fine, so the error might be internally on our side

Thanks in advance for the patience!
Tom

I am having the same issue, hope there will be a fix soon.