Warehouse location_id on the Order Detail API doesn't match the order location

Topic summary

Issue: The location_id field in the Order Detail API (Admin REST API) returns the default store location instead of the warehouse location where the order was actually created or should be fulfilled from.

Example: An order placed through “Bandung” warehouse shows the location_id for “Jakarta” (default location) in the API response.

Shopify’s Initial Response: A support representative suggested the location_id represents the origin location where inventory came from, not the fulfillment location, and referenced an archived community post.

Ongoing Confusion: Another user points out conflicting documentation:

  • Current docs state location_id is “the location assigned to fulfill the order when created”
  • Previous docs indicated it was where the order originated
  • In testing, when setting location_id via Order API then creating a fulfillment in Admin, the location_id is never used
  • Current docs recommend using the FulfillmentOrder resource for up-to-date fulfillment location information

Status: The discussion remains unresolved with users seeking clarification on the intended purpose and behavior of the location_id field on orders with multiple potential fulfillment locations.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

Hi Shopify,

We have a question about getting warehouse location_id, where can we get it from the order detail API?

We tried to create an order using a different warehouse location, but the field location_id in the order detail API displays the location_id of the default store location.

Example order #1124

We bought through the warehouse “Bandung” but the location_id field on the order detail API displays the location_id for “Jakarta”

We use Admin REST API.

But on the API Detail, location_id isn’t “Bandung”

Example API Response

{
  "id": 4754850185369,
  "admin_graphql_api_id": "gid://shopify/Order/4754850185369",
  "app_id": 1354745,
  "browser_ip": null,
  "buyer_accepts_marketing": false,
  "cancel_reason": null,
  "cancelled_at": null,
  "cart_token": null,
  "client_details": {
    "accept_language": null,
    "browser_height": null,
    "browser_ip": null,
    "browser_width": null,
    "session_hash": null,
    "user_agent": null
  },
  "closed_at": null,
  "confirmed": true,
  "contact_email": "contact.email@gmail.com",
  "created_at": "2022-12-07T16:28:17+07:00",
  "currency": "IDR",
  "current_subtotal_price": "10000.00",
  "current_subtotal_price_set": {
    "shop_money": {
      "amount": "10000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "10000.00",
      "currency_code": "IDR"
    }
  },
  "current_total_discounts": "0.00",
  "current_total_discounts_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "IDR"
    }
  },
  "current_total_duties_set": null,
  "current_total_price": "11000.00",
  "current_total_price_set": {
    "shop_money": {
      "amount": "11000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "11000.00",
      "currency_code": "IDR"
    }
  },
  "current_total_tax": "1000.00",
  "current_total_tax_set": {
    "shop_money": {
      "amount": "1000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "1000.00",
      "currency_code": "IDR"
    }
  },
  "customer_locale": "en",
  "device_id": null,
  "discount_codes": [],
  "email": "contact.email@gmail.com",
  "estimated_taxes": false,
  "financial_status": "paid",
  "fulfillment_status": null,
  "gateway": "manual",
  "landing_site": null,
  "landing_site_ref": null,
  "location_id": null,
  "name": "#1124",
  "note": null,
  "note_attributes": [],
  "number": 124,
  "order_number": 1124,
  "original_total_duties_set": null,
  "payment_gateway_names": [
    "manual"
  ],
  "phone": "+6282317312345",
  "presentment_currency": "IDR",
  "processed_at": "2022-12-07T16:28:17+07:00",
  "processing_method": "manual",
  "reference": null,
  "referring_site": null,
  "source_identifier": null,
  "source_name": "shopify_draft_order",
  "source_url": null,
  "subtotal_price": "10000.00",
  "subtotal_price_set": {
    "shop_money": {
      "amount": "10000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "10000.00",
      "currency_code": "IDR"
    }
  },
  "tags": "",
  "tax_lines": [
    {
      "price": "1000.00",
      "rate": 0.1,
      "title": "VAT",
      "price_set": {
        "shop_money": {
          "amount": "1000.00",
          "currency_code": "IDR"
        },
        "presentment_money": {
          "amount": "1000.00",
          "currency_code": "IDR"
        }
      },
      "channel_liable": false
    }
  ],
  "taxes_included": false,
  "test": false,
  "total_discounts": "0.00",
  "total_discounts_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "IDR"
    }
  },
  "total_line_items_price": "10000.00",
  "total_line_items_price_set": {
    "shop_money": {
      "amount": "10000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "10000.00",
      "currency_code": "IDR"
    }
  },
  "total_outstanding": "0.00",
  "total_price": "11000.00",
  "total_price_set": {
    "shop_money": {
      "amount": "11000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "11000.00",
      "currency_code": "IDR"
    }
  },
  "total_price_usd": "0.71",
  "total_shipping_price_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "IDR"
    }
  },
  "total_tax": "1000.00",
  "total_tax_set": {
    "shop_money": {
      "amount": "1000.00",
      "currency_code": "IDR"
    },
    "presentment_money": {
      "amount": "1000.00",
      "currency_code": "IDR"
    }
  },
  "total_tip_received": "0.00",
  "total_weight": 10,
  "updated_at": "2022-12-07T16:56:06+07:00",
  "user_id": 68108157081,
  "billing_address": {
    "first_name": "test",
    "address1": "Jl. Prof. Moh. Yamin",
    "phone": "",
    "city": "Kota Bekasi",
    "zip": "17112",
    "province": "Jawa Barat",
    "country": "Indonesia",
    "last_name": "",
    "address2": "",
    "company": "",
    "latitude": null,
    "longitude": null,
    "name": "nancy",
    "country_code": "ID",
    "province_code": "JB"
  },
  "customer": {
    "id": 6369683079321,
    "email": "contact.email@gmail.com",
    "accepts_marketing": false,
    "created_at": "2022-12-07T16:26:13+07:00",
    "updated_at": "2022-12-07T17:00:02+07:00",
    "first_name": "test",
    "last_name": "",
    "orders_count": 2,
    "state": "disabled",
    "total_spent": "22000.00",
    "last_order_id": 4754872860825,
    "note": "",
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": false,
    "tags": "",
    "last_order_name": "#1125",
    "currency": "IDR",
    "phone": "+62823173123455",
    "accepts_marketing_updated_at": "2022-12-07T16:27:34+07:00",
    "marketing_opt_in_level": null,
    "tax_exemptions": [],
    "sms_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": null,
      "consent_collected_from": "SHOPIFY"
    },
    "admin_graphql_api_id": "gid://shopify/Customer/6369683079321",
    "default_address": {
      "id": 7852546490521,
      "customer_id": 6369683079321,
      "first_name": "nancy",
      "last_name": "",
      "company": "",
      "address1": "Jl. Prof. Moh. Yamin",
      "address2": "",
      "city": "Kota Bekasi",
      "province": "Jawa Barat",
      "country": "Indonesia",
      "zip": "3417112",
      "phone": "",
      "name": "nancy",
      "province_code": "JB",
      "country_code": "ID",
      "country_name": "Indonesia",
      "default": true
    }
  },
  "discount_applications": [],
  "fulfillments": [],
  "line_items": [
    {
      "id": 12049814814873,
      "admin_graphql_api_id": "gid://shopify/LineItem/12049814814873",
      "destination_location": {
        "id": 3560630845593,
        "country_code": "ID",
        "province_code": "JB",
        "name": "nancy",
        "address1": "Jl. Prof. Moh. Yamin",
        "address2": "",
        "city": "Kota Bekasi",
        "zip": "17112"
      },
      "fulfillable_quantity": 1,
      "fulfillment_service": "manual",
      "fulfillment_status": null,
      "gift_card": false,
      "grams": 10,
      "name": "Barang Test Upload",
      "origin_location": {
        "id": 2623394840729,
        "country_code": "ID",
        "province_code": "JK",
        "name": "Jubelio Store",
        "address1": "Jl. Jend. Sudirman",
        "address2": "",
        "city": "Jakarta Selatan Indonesia",
        "zip": "2920"
      },
      "price": "10000.00",
      "price_set": {
        "shop_money": {
          "amount": "10000.00",
          "currency_code": "IDR"
        },
        "presentment_money": {
          "amount": "10000.00",
          "currency_code": "IDR"
        }
      },
      "product_exists": true,
      "product_id": 7576504893593,
      "properties": [],
      "quantity": 1,
      "requires_shipping": true,
      "sku": "BTU01",
      "taxable": true,
      "title": "Barang Test Upload",
      "total_discount": "0.00",
      "total_discount_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "IDR"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "IDR"
        }
      },
      "variant_id": 42815681790105,
      "variant_inventory_management": "shopify",
      "variant_title": "",
      "vendor": "Jubelio Store",
      "tax_lines": [
        {
          "channel_liable": false,
          "price": "1000.00",
          "price_set": {
            "shop_money": {
              "amount": "1000.00",
              "currency_code": "IDR"
            },
            "presentment_money": {
              "amount": "1000.00",
              "currency_code": "IDR"
            }
          },
          "rate": 0.1,
          "title": "VAT"
        }
      ],
      "duties": [],
      "discount_allocations": []
    }
  ],
  "payment_terms": null,
  "refunds": [],
  "shipping_address": {
    "first_name": "test",
    "address1": "Jl. Prof. Moh. Yamin",
    "phone": "",
    "city": "Kota Bekasi",
    "zip": "17112",
    "province": "Jawa Barat",
    "country": "Indonesia",
    "last_name": "",
    "address2": "",
    "company": "",
    "latitude": -6.2402001,
    "longitude": 107.0224242,
    "name": "nancy",
    "country_code": "ID",
    "province_code": "JB"
  },
  "shipping_lines": []
}

Where can we get the right location_id field?

Thanks.

Hey @JubeCorner , the origin location is where the order was initially placed (or where the product inventory originally came from), rather than the updated or new fulfillment location, if it has been changed. There’s more detail in this post here from one of my colleagues.

Hope this helps!

Hey @ShopifyDevSup ,

The link you reference is archived, and I’m looking for clarity about the location_id field on the Order API. According to the docs, the location_id field is used for the assigned fulfillment location, which I assume means the location where the order should be fulfilled from. Here is what the current Order API documentation says:

The ID of one of the locations that was assigned to fulfill the Order when the Order was created. Orders can have multiple fulfillment orders. These fulfillment orders can each be assigned to a different location, responsible for fulfilling a subset of the items in an order. The Order.location_id field will only point to one of these locations. Use the FulfillmentOrder resource for up-to-date fulfillment location information.

However, when I set the location_id on the Order using the Order API and then create a fulfillment in the Admin, the location_id is never used. According to the previous documentation, this was the location where the Order originated. What should this field be used for? Based on the current documentation and the behavior I see when I run some tests, I’m a bit confused.