Warehouse_ID not working correctly

Hi,

I have the following query, which returns a warehouse_id that is not “V2FyZWhvdXNlOjEwMDg3”, please advise:

query {
  orders(warehouse_id:"V2FyZWhvdXNlOjEwMDg3") {
request_id
complexity
data(first: 1) {
  edges {
    node {
      legacy_id
      order_number
      line_items {
        edges {
          node {
            warehouse
            warehouse_id
          }
        }
        
      }
    }
  }
pageInfo {
  hasNextPage
  hasPreviousPage
}
}
  }
}

Returns:

{
  "data": {
"orders": {
  "request_id": "5efe19a24501192ab3bd9db8",
  "complexity": 101,
  "data": {
    "edges": [
      {
        "node": {
          "legacy_id": 123389541,
          "order_number": "#DC-1088",
          "line_items": {
            "edges": [
              {
                "node": {
                  "warehouse": "Primary",
                  "warehouse_id": "V2FyZWhvdXNlOjU4OTg="
                }
              },
              {
                "node": {
                  "warehouse": "Primary",
                  "warehouse_id": "V2FyZWhvdXNlOjU4OTg="
                }
              }
            ]
          }
        }
      }
    ],
    "pageInfo": {
      "hasNextPage": true,
      "hasPreviousPage": false
    }
  }
}
  }
}

Should note this is in our staging environment

Hi @Devin_Mabra
I apologize for the delay in my response!
That seems to be because that is the warehouse when the order was imported, then it got changed because of the Custom Status.
And the line items might also be different because it’s a multi-warehouse account, and they might be allocated/shipped from different warehouses
Line items might differ from the order warehouse_is because of this reason, that is could be allocated or shipped from different warehouses (for example when the order has Allow Split) or you have some Multi Warehouse allocation rules set up as well.
Let me know if this doesn’t help.
Thanks in advance!
Tom