I';我在shopify order api中将位置_id设置为null
我通过shopify admin创建了一个订单,并添加了客户详细信息,当我执行orders.json api时,我得到了location_id=“null” 现在我需要位置id来更新履行状态 如果可能,如何更新订单的位置id。这是我创建订单时的响应I';我在shopify order api中将位置_id设置为null,shopify,shopify-app,Shopify,Shopify App,我通过shopify admin创建了一个订单,并添加了客户详细信息,当我执行orders.json api时,我得到了location_id=“null” 现在我需要位置id来更新履行状态 如果可能,如何更新订单的位置id。这是我创建订单时的响应 { "orders": [ { "id": 568323571800, "email": "sample_test_123_gmail@gmail.com", "closed_at": nul
{
"orders": [
{
"id": 568323571800,
"email": "sample_test_123_gmail@gmail.com",
"closed_at": null,
"created_at": "2018-08-02T15:41:06+05:30",
"updated_at": "2018-08-02T15:46:06+05:30",
"number": 9,
"note": "",
"token": "a666eb3aea251cc585afc006cbf5b315",
"gateway": "Cash on Delivery (COD)",
"test": false,
"total_price": "200.00",
"subtotal_price": "200.00",
"total_weight": 100,
"total_tax": "0.00",
"taxes_included": false,
"currency": "INR",
"financial_status": "pending",
"confirmed": true,
"total_discounts": "0.00",
"total_line_items_price": "200.00",
"cart_token": null,
"buyer_accepts_marketing": false,
"name": "#1009",
"referring_site": null,
"landing_site": null,
"cancelled_at": null,
"cancel_reason": null,
"total_price_usd": "2.92",
"checkout_token": null,
"reference": null,
"user_id": 23090102360,
"location_id": null,
位置ID与您的库存相关联。首先,确保您已经为库存设置了位置。其次,确保将Shopify设置为您的库存管理提供商。如果您现在为Shopify管理的项目创建订单,您可能会看到一个位置ID。您创建这样的草稿订单的测试可能还没有与Shopify位置完全集成?当您使用前端而不是API预订订单时会发生什么 位置ID与您的库存相关联。首先,确保您已经为库存设置了位置。其次,确保将Shopify设置为您的库存管理提供商。如果您现在为Shopify管理的项目创建订单,您可能会看到一个位置ID。您创建这样的草稿订单的测试可能还没有与Shopify位置完全集成?当您使用前端而不是API预订订单时会发生什么 订单上的
location\u id
将返回null
,除非订单是从Shopify POS位置发出的,在这种情况下,它将返回与该位置相关的location\u id
请参阅履行指南:订单上的位置\u id将返回
null
,除非订单是从Shopify POS位置发出的,在这种情况下,它将返回与该位置相关的位置\u id
请参阅履行指南:要按顺序获取locationId,需要在productCreate中传递带有位置id和可用数量的InventoryQuantilities输入。然后按顺序获取locationId
{
"input": {
"title": "Demo Product",
"descriptionHtml": "des",
"productType": "type",
"vendor": "vendor",
"handle": "abc1",
"tags": ["tag1", "tag2"],
"variants": [
{
"title": "small",
"price": 100,
"compareAtPrice": 110,
"position": 1,
"inventoryQuantities": {
"availableQuantity": 100,
"locationId": "gid://shopify/Location/55274340513"
},
"inventoryItem": {
"cost": 200,
"tracked": true
}
}
]
}
}
要按顺序获取locationId,需要在productCreate中传递带有位置id和可用数量的InventoryQuantilities输入。然后您将按顺序获取locationId
{
"input": {
"title": "Demo Product",
"descriptionHtml": "des",
"productType": "type",
"vendor": "vendor",
"handle": "abc1",
"tags": ["tag1", "tag2"],
"variants": [
{
"title": "small",
"price": 100,
"compareAtPrice": 110,
"position": 1,
"inventoryQuantities": {
"availableQuantity": 100,
"locationId": "gid://shopify/Location/55274340513"
},
"inventoryItem": {
"cost": 200,
"tracked": true
}
}
]
}
}
您可以从/admin/api/2021-04/locations.json api中找到location_id 您将得到如下响应:
{
"locations": [
{
"id": location_id,
"name": "location_name",
"address1": "location_address",
"address2": null,
"city": "Faisalabad",
"zip": "38000",
"province": "",
"country": "PK",
"phone": "",
"created_at": "2021-02-25T15:34:18+05:00",
"updated_at": "2021-02-25T15:34:20+05:00",
"country_code": "PK",
"country_name": "Pakistan",
"province_code": null,
"legacy": false,
"active": true,
"admin_graphql_api_id": "gid://shopify/Location/location_id",
"localized_country_name": "Pakistan",
"localized_province_name": null
}
]
}
您可以从/admin/api/2021-04/locations.json api中找到location_id 您将得到如下响应:
{
"locations": [
{
"id": location_id,
"name": "location_name",
"address1": "location_address",
"address2": null,
"city": "Faisalabad",
"zip": "38000",
"province": "",
"country": "PK",
"phone": "",
"created_at": "2021-02-25T15:34:18+05:00",
"updated_at": "2021-02-25T15:34:20+05:00",
"country_code": "PK",
"country_name": "Pakistan",
"province_code": null,
"legacy": false,
"active": true,
"admin_graphql_api_id": "gid://shopify/Location/location_id",
"localized_country_name": "Pakistan",
"localized_province_name": null
}
]
}
在草稿订单期间,订单的位置id可见,而从前端下单时,其显示空值。我正在尝试使用api更新订单的履行状态,但是没有位置id,需要显示位置id。听起来你在Shopify中发现了一个超级错误。玩得开心!真的陷入这个困境,希望如果你有答案,请回复如何启用订单的请求履行,订单的履行服务是手动类型,所以我需要使用api触发。可能吗。在草稿订单期间,订单的位置id可见,而从前端下单时,其显示空值。我正在尝试使用api更新订单的履行状态,但是没有位置id,需要显示位置id。听起来你在Shopify中发现了一个超级错误。玩得开心!真的陷入这个困境,希望如果你有答案,请回复如何启用订单的请求履行,订单的履行服务是手动类型,所以我需要使用api触发。可能吗。面临类似的问题。我不知道应该提供的
位置\u id
,因此必须使用端点进行查找。很遗憾,它不像Shopify UI中那样默认,所以我可以避免这种情况。面临类似的问题。我不知道应该提供的位置\u id
,因此必须使用端点进行查找。很遗憾,它不像Shopify UI中那样默认,所以我可以避免这种情况。