FROM CACHE - zh-cn_header

shopify回传订单

已解决
ljl
新成员
31 0 0

通过该接口获取到shopify平台订单,如果我再次获取还会获取到相同的单子,如何回传订单状态,让已经获取到的单子无法获取到

44 条回复44
ljl
新成员
31 0 0

那就是必须要使用开发商店了,你对此有操作过吗,如果操作之后还能通过接口调用吗?你对这些有了解吗?谢谢

ljl_0-1634722169736.png

 

Tim_Mak
探路者
103 12 18

请在https://partners.shopify.com/ 创建合作伙伴账号,然后再创建一个开发店铺

ljl
新成员
31 0 0

正如您描述的那样,我已经成功的通过开发商店创建到了正式订单,也通过API接口获取到订单集合

请看如下调用接口的示意图和示意代码

1、获取订单集合

ljl_0-1634809652140.png

https://8578cc2007111d6dff8ea7b92e6fd69f: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@redliuiot.myshopify....

{
    "orders": [
        {
            "id"3897756385380,
            "admin_graphql_api_id""gid://shopify/Order/3897756385380",
            "app_id"1354745,
            "browser_ip"null,
            "buyer_accepts_marketing"false,
            "cancel_reason"null,
            "cancelled_at"null,
            "cart_token"null,
            "checkout_id"23122729205860,
            "checkout_token""755bd1f381202b00b53da1501a293cc4",
            "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"null,
            "created_at""2021-10-21T17:16:26+08:00",
            "currency""USD",
            "current_subtotal_price""100.00",
            "current_subtotal_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "current_total_discounts""0.00",
            "current_total_discounts_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "current_total_duties_set"null,
            "current_total_price""106.63",
            "current_total_price_set": {
                "shop_money": {
                    "amount""106.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""106.63",
                    "currency_code""USD"
                }
            },
            "current_total_tax""6.63",
            "current_total_tax_set": {
                "shop_money": {
                    "amount""6.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""6.63",
                    "currency_code""USD"
                }
            },
            "customer_locale"null,
            "device_id"null,
            "discount_codes": [],
            "email""",
            "estimated_taxes"false,
            "financial_status""paid",
            "fulfillment_status"null,
            "gateway""manual",
            "landing_site"null,
            "landing_site_ref"null,
            "location_id"61114024036,
            "name""#1002",
            "note"null,
            "note_attributes": [],
            "number"2,
            "order_number"1002,
            "original_total_duties_set"null,
            "payment_gateway_names": [
                "manual"
            ],
            "phone"null,
            "presentment_currency""USD",
            "processed_at""2021-10-21T17:16:26+08:00",
            "processing_method""manual",
            "reference"null,
            "referring_site"null,
            "source_identifier"null,
            "source_name""shopify_draft_order",
            "source_url"null,
            "subtotal_price""100.00",
            "subtotal_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "tags""",
            "tax_lines": [
                {
                    "price""6.63",
                    "rate"0.06625,
                    "title""New Jersey State Tax",
                    "price_set": {
                        "shop_money": {
                            "amount""6.63",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""6.63",
                            "currency_code""USD"
                        }
                    },
                    "channel_liable"false
                }
            ],
            "taxes_included"false,
            "test"false,
            "token""b928d9759b7f611d3f4b540ef8f93d4b",
            "total_discounts""0.00",
            "total_discounts_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_line_items_price""100.00",
            "total_line_items_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "total_outstanding""0.00",
            "total_price""106.63",
            "total_price_set": {
                "shop_money": {
                    "amount""106.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""106.63",
                    "currency_code""USD"
                }
            },
            "total_price_usd""106.63",
            "total_shipping_price_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_tax""6.63",
            "total_tax_set": {
                "shop_money": {
                    "amount""6.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""6.63",
                    "currency_code""USD"
                }
            },
            "total_tip_received""0.00",
            "total_weight"45359,
            "updated_at""2021-10-21T17:16:27+08:00",
            "user_id"71512817764,
            "discount_applications": [],
            "fulfillments": [],
            "line_items": [
                {
                    "id"10176485720164,
                    "admin_graphql_api_id""gid://shopify/LineItem/10176485720164",
                    "fulfillable_quantity"1,
                    "fulfillment_service""manual",
                    "fulfillment_status"null,
                    "gift_card"false,
                    "grams"45359,
                    "name""HAT - RED",
                    "origin_location": {
                        "id"2973975347300,
                        "country_code""US",
                        "province_code""NJ",
                        "name""601 RANDOLPH RD",
                        "address1""601 RANDOLPH RD",
                        "address2""",
                        "city""SOMERSET",
                        "zip""08873"
                    },
                    "price""100.00",
                    "price_set": {
                        "shop_money": {
                            "amount""100.00",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""100.00",
                            "currency_code""USD"
                        }
                    },
                    "product_exists"true,
                    "product_id"6608633462884,
                    "properties": [],
                    "quantity"1,
                    "requires_shipping"true,
                    "sku""HAT",
                    "taxable"true,
                    "title""HAT",
                    "total_discount""0.00",
                    "total_discount_set": {
                        "shop_money": {
                            "amount""0.00",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""0.00",
                            "currency_code""USD"
                        }
                    },
                    "variant_id"39453535535204,
                    "variant_inventory_management""shopify",
                    "variant_title""RED",
                    "vendor""redliuiot",
                    "tax_lines": [
                        {
                            "channel_liable"false,
                            "price""6.63",
                            "price_set": {
                                "shop_money": {
                                    "amount""6.63",
                                    "currency_code""USD"
                                },
                                "presentment_money": {
                                    "amount""6.63",
                                    "currency_code""USD"
                                }
                            },
                            "rate"0.06625,
                            "title""New Jersey State Tax"
                        }
                    ],
                    "duties": [],
                    "discount_allocations": []
                }
            ],
            "payment_terms"null,
            "refunds": [],
            "shipping_lines": []
        },
        {
            "id"3897754452068,
            "admin_graphql_api_id""gid://shopify/Order/3897754452068",
            "app_id"1354745,
            "browser_ip"null,
            "buyer_accepts_marketing"false,
            "cancel_reason"null,
            "cancelled_at"null,
            "cart_token"null,
            "checkout_id"23122704728164,
            "checkout_token""ee6bc35bc9b4214d4a0288c2232aa0fb",
            "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"null,
            "created_at""2021-10-21T17:12:36+08:00",
            "currency""USD",
            "current_subtotal_price""100.00",
            "current_subtotal_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "current_total_discounts""0.00",
            "current_total_discounts_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "current_total_duties_set"null,
            "current_total_price""106.63",
            "current_total_price_set": {
                "shop_money": {
                    "amount""106.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""106.63",
                    "currency_code""USD"
                }
            },
            "current_total_tax""6.63",
            "current_total_tax_set": {
                "shop_money": {
                    "amount""6.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""6.63",
                    "currency_code""USD"
                }
            },
            "customer_locale"null,
            "device_id"null,
            "discount_codes": [],
            "email""",
            "estimated_taxes"false,
            "financial_status""paid",
            "fulfillment_status"null,
            "gateway""manual",
            "landing_site"null,
            "landing_site_ref"null,
            "location_id"61114024036,
            "name""#1001",
            "note"null,
            "note_attributes": [],
            "number"1,
            "order_number"1001,
            "original_total_duties_set"null,
            "payment_gateway_names": [
                "manual"
            ],
            "phone"null,
            "presentment_currency""USD",
            "processed_at""2021-10-21T17:12:36+08:00",
            "processing_method""manual",
            "reference"null,
            "referring_site"null,
            "source_identifier"null,
            "source_name""shopify_draft_order",
            "source_url"null,
            "subtotal_price""100.00",
            "subtotal_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "tags""",
            "tax_lines": [
                {
                    "price""6.63",
                    "rate"0.06625,
                    "title""New Jersey State Tax",
                    "price_set": {
                        "shop_money": {
                            "amount""6.63",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""6.63",
                            "currency_code""USD"
                        }
                    },
                    "channel_liable"false
                }
            ],
            "taxes_included"false,
            "test"false,
            "token""ed04787c3fc13d8c39077abfd17b4b21",
            "total_discounts""0.00",
            "total_discounts_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_line_items_price""100.00",
            "total_line_items_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "total_outstanding""0.00",
            "total_price""106.63",
            "total_price_set": {
                "shop_money": {
                    "amount""106.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""106.63",
                    "currency_code""USD"
                }
            },
            "total_price_usd""106.63",
            "total_shipping_price_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_tax""6.63",
            "total_tax_set": {
                "shop_money": {
                    "amount""6.63",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""6.63",
                    "currency_code""USD"
                }
            },
            "total_tip_received""0.00",
            "total_weight"45359,
            "updated_at""2021-10-21T17:12:37+08:00",
            "user_id"71512817764,
            "discount_applications": [],
            "fulfillments": [],
            "line_items": [
                {
                    "id"10176482803812,
                    "admin_graphql_api_id""gid://shopify/LineItem/10176482803812",
                    "fulfillable_quantity"1,
                    "fulfillment_service""manual",
                    "fulfillment_status"null,
                    "gift_card"false,
                    "grams"45359,
                    "name""HAT - RED",
                    "origin_location": {
                        "id"2973975347300,
                        "country_code""US",
                        "province_code""NJ",
                        "name""601 RANDOLPH RD",
                        "address1""601 RANDOLPH RD",
                        "address2""",
                        "city""SOMERSET",
                        "zip""08873"
                    },
                    "price""100.00",
                    "price_set": {
                        "shop_money": {
                            "amount""100.00",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""100.00",
                            "currency_code""USD"
                        }
                    },
                    "product_exists"true,
                    "product_id"6608633462884,
                    "properties": [],
                    "quantity"1,
                    "requires_shipping"true,
                    "sku""HAT",
                    "taxable"true,
                    "title""HAT",
                    "total_discount""0.00",
                    "total_discount_set": {
                        "shop_money": {
                            "amount""0.00",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""0.00",
                            "currency_code""USD"
                        }
                    },
                    "variant_id"39453535535204,
                    "variant_inventory_management""shopify",
                    "variant_title""RED",
                    "vendor""redliuiot",
                    "tax_lines": [
                        {
                            "channel_liable"false,
                            "price""6.63",
                            "price_set": {
                                "shop_money": {
                                    "amount""6.63",
                                    "currency_code""USD"
                                },
                                "presentment_money": {
                                    "amount""6.63",
                                    "currency_code""USD"
                                }
                            },
                            "rate"0.06625,
                            "title""New Jersey State Tax"
                        }
                    ],
                    "duties": [],
                    "discount_allocations": []
                }
            ],
            "payment_terms"null,
            "refunds": [],
            "shipping_lines": []
        }
    ]
}
2、回传追踪号和面单
ljl_1-1634809786338.png

 

req body:
{    
    "fulfillment": {
        "message""The package was shipped this morning.",
        "notify_customer"false,
        "tracking_info": {
            "number"1562678,
            "url""https:\/\/www.my-shipping-company.com",
            "company""my-shipping-company"
        },
        "line_items_by_fulfillment_order": [{
            "fulfillment_order_id"3897756385380,
            "fulfillment_order_line_items": [{
                "id"10176485720164,
                "quantity"1
            }]
        }]
    }
}
resp body:
{
    "errors""Not Found"
}
 
一如既往,还是没找到
 ljl_2-1634810356172.png

您那边可否可以根据我的请求示例帮我调一下fulfillments接口,使他能够完成运单号和面单数据的回传

 
 

 

ljl
新成员
31 0 0

https://accounts.shopify.com/lookup?rid=2de5ccd0-3d54-4cdd-8fcd-a220c6ee454d

1、邮箱登录

继续访问 Shopify:1614516281@qq.com

密码:jiale654321

 

 

ljl_0-1634812072239.png

2、请选择此账户

ljl_1-1634812289548.png

3、成功进入此页面后就可以看到创建的正式订单

ljl_2-1634812342260.png

根据我的请求示例,请帮我看一下调用fulfillments接口为什么返回

Not Found错误信息
如下是两个接口的请求信息
{    
    "fulfillment": {
        "message""The package was shipped this morning.",
        "notify_customer"false,
        "tracking_info": {
            "number"1562678,
            "url""https:\/\/www.my-shipping-company.com",
            "company""my-shipping-company"
        },
        "line_items_by_fulfillment_order": [{
            "fulfillment_order_id"3897756385380,
            "fulfillment_order_line_items": [{
                "id"10176485720164,
                "quantity"1
            }]
        }]
    }
}
万分感谢
 
ljl
新成员
31 0 0

https://accounts.shopify.com/lookup?rid=2de5ccd0-3d54-4cdd-8fcd-a220c6ee454d

1、邮箱登录

继续访问 Shopify:1614516281@qq.com

密码:jiale654321

 

 

ljl_0-1634812072239.png

2、请选择此账户

ljl_1-1634812289548.png

3、成功进入此页面后就可以看到创建的正式订单

ljl_2-1634812342260.png

根据我的请求示例,请帮我看一下调用fulfillments接口为什么返回

Not Found错误信息
如下是两个接口的请求信息
{    
    "fulfillment": {
        "message""The package was shipped this morning.",
        "notify_customer"false,
        "tracking_info": {
            "number"1562678,
            "url""https:\/\/www.my-shipping-company.com",
            "company""my-shipping-company"
        },
        "line_items_by_fulfillment_order": [{
            "fulfillment_order_id"3897756385380,
            "fulfillment_order_line_items": [{
                "id"10176485720164,
                "quantity"1
            }]
        }]
    }
}
万分感谢
 
Tim_Mak
探路者
103 12 18

要用另一个接口,刚才发了请求已完成发货

接口(POST):/orders/3897756385380/fulfillments.json

body:

{
    "fulfillment":{
        "location_id": 61114024036,
        "tracking_number":"1562678",
        "tracking_urls":["https:\/\/www.my-shipping-company.com"]
         }
}

(location_id 是设置》地点》链接尾部 来的)

 

然后现在如果get /2021-10/orders.json 就不会获取已发货的订单

ljl
新成员
31 0 0

我这边测试同样也成功了,谢谢您

Tim_Mak
探路者
103 12 18

那就好

订单发货之后也会把订单标记为关闭(closed)

如果要获取已关闭的订单,要加orders.json?status=any或status=closed(默认是open)

ljl
新成员
31 0 0

好的,明白了,现在只是根据需求调通了接口,后期可能会根据请求参数和请求体完成进行细致化的处理

 

ljl
新成员
31 0 0

您好,现在在开发中又遇到一个问题

通过postman正常调接口是没有问题的

ljl_0-1635042929887.png

但是程序中调却出现了问题

{
       "errors": {
              "fulfillment": "Required parameter missing or invalid"
       }
}

我尝试着将程序中的url,请求体拿出来,通过postman利用它的post方式调该 接口,是完全没有问题的,你知道这是怎么产生的吗?

ljl
新成员
31 0 0

不好意思,周末还来打然您,不过看了一些博客,问题得到了解决

Snipaste_2021-10-24_10-52-17.png

ljl
新成员
31 0 0

1、目前接口已经调通了,应该不需要操作获取授权这一步吧

https://shopify.dev/apps/auth/oauth

2、在调获取订单接口时,shopify官方可以按照时间段来获取订单,API中提供的日期格式是这样的2005-07-31T15:57:11-04:00,我也转化成这样吗?重点是-04:00,你有转成这种时间格式的Java代码吗?

ljl_0-1635067220174.png

 

ljl
新成员
31 0 0

1、目前接口已经调通了,应该不需要操作获取授权这一步吧

https://shopify.dev/apps/auth/oauth

2、在调获取订单接口时,shopify官方可以按照时间段来获取订单,API中提供的日期格式是这样的2005-07-31T15:57:11-04:00,我也转化成这样吗?重点是-04:00,你有转成这种时间格式的Java代码吗?

ljl_0-1635067220174.png

 

ljl
新成员
31 0 0

您好,有个问题想问您一下,在创建正式订单的时候,可以指定渠道吗?

有们这边有一个需求,需要通过shopify平台店铺中订单的渠道,去匹配我们系统中指定的渠道,如果匹配上了,我就可以用这个渠道发货,请求shopifyf在建单时可以指定渠道吗?如果可以,方便告诉我在哪一步指定吗?

还有个问题2021-10-25T17:18:27+08:00,这是获取的中国时间,我用这个时间减掉8个小时才能获取到当下创建的订单,也就是说我如果在拉取shopify平台的订单,我在中国根据指定时间日期去拉取,拉的是8个小时以前的订单

 

ljl_0-1635152914162.png

 

https://8578cc2007111d6dff8ea7b92e6fd69f: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@redliuiot.myshopify....

{
    "orders": [
        {
            "id"3901351919716,
            "admin_graphql_api_id""gid://shopify/Order/3901351919716",
            "app_id"1354745,
            "browser_ip"null,
            "buyer_accepts_marketing"false,
            "cancel_reason"null,
            "cancelled_at"null,
            "cart_token"null,
            "checkout_id"23170614100068,
            "checkout_token""215f7af4c24162d06a55a631d712424b",
            "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""111111@qq.com",
            "created_at""2021-10-25T14:36:20+08:00",
            "currency""USD",
            "current_subtotal_price""100.00",
            "current_subtotal_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "current_total_discounts""0.00",
            "current_total_discounts_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "current_total_duties_set"null,
            "current_total_price""100.00",
            "current_total_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "current_total_tax""0.00",
            "current_total_tax_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "customer_locale""zh-CN",
            "device_id"null,
            "discount_codes": [],
            "email""111111@qq.com",
            "estimated_taxes"false,
            "financial_status""paid",
            "fulfillment_status"null,
            "gateway""manual",
            "landing_site"null,
            "landing_site_ref"null,
            "location_id"null,
            "name""#1018",
            "note""测试面单",
            "note_attributes": [],
            "number"18,
            "order_number"1018,
            "original_total_duties_set"null,
            "payment_gateway_names": [
                "manual"
            ],
            "phone"null,
            "presentment_currency""USD",
            "processed_at""2021-10-25T14:36:20+08:00",
            "processing_method""manual",
            "reference"null,
            "referring_site"null,
            "source_identifier"null,
            "source_name""shopify_draft_order",
            "source_url"null,
            "subtotal_price""100.00",
            "subtotal_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "tags""",
            "tax_lines": [],
            "taxes_included"false,
            "test"false,
            "token""3aa74d1e15221a7b6890377c4a7267c8",
            "total_discounts""0.00",
            "total_discounts_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_line_items_price""100.00",
            "total_line_items_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "total_outstanding""0.00",
            "total_price""100.00",
            "total_price_set": {
                "shop_money": {
                    "amount""100.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""100.00",
                    "currency_code""USD"
                }
            },
            "total_price_usd""100.00",
            "total_shipping_price_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_tax""0.00",
            "total_tax_set": {
                "shop_money": {
                    "amount""0.00",
                    "currency_code""USD"
                },
                "presentment_money": {
                    "amount""0.00",
                    "currency_code""USD"
                }
            },
            "total_tip_received""0.00",
            "total_weight"45359,
            "updated_at""2021-10-25T14:36:21+08:00",
            "user_id"71512817764,
            "billing_address": {
                "first_name""test",
                "address1""1200  Westport Rd",
                "phone""+11234567890",
                "city""Imperial",
                "zip""15126-1002",
                "province""Pennsylvania",
                "country""United States",
                "last_name""test",
                "address2""",
                "company""test",
                "latitude"40.4502542,
                "longitude"-80.3158926,
                "name""test test",
                "country_code""US",
                "province_code""PA"
            },
            "customer": {
                "id"5257612558436,
                "email""111111@qq.com",
                "accepts_marketing"false,
                "created_at""2021-10-22T09:27:57+08:00",
                "updated_at""2021-10-25T14:36:21+08:00",
                "first_name""test",
                "last_name""test",
                "orders_count"15,
                "state""disabled",
                "total_spent""1500.00",
                "last_order_id"3901351919716,
                "note"null,
                "verified_email"true,
                "multipass_identifier"null,
                "tax_exempt"false,
                "phone"null,
                "tags""",
                "last_order_name""#1018",
                "currency""USD",
                "accepts_marketing_updated_at""2021-10-22T09:27:57+08:00",
                "marketing_opt_in_level"null,
                "tax_exemptions": [],
                "sms_marketing_consent"null,
                "admin_graphql_api_id""gid://shopify/Customer/5257612558436",
                "default_address": {
                    "id"6454376005732,
                    "customer_id"5257612558436,
                    "first_name""test",
                    "last_name""test",
                    "company""test",
                    "address1""1200  Westport Rd",
                    "address2""",
                    "city""Imperial",
                    "province""Pennsylvania",
                    "country""United States",
                    "zip""15126-1002",
                    "phone""+11234567890",
                    "name""test test",
                    "province_code""PA",
                    "country_code""US",
                    "country_name""United States",
                    "default"true
                }
            },
            "discount_applications": [],
            "fulfillments": [],
            "line_items": [
                {
                    "id"10184054964324,
                    "admin_graphql_api_id""gid://shopify/LineItem/10184054964324",
                    "destination_location": {
                        "id"2975341346916,
                        "country_code""US",
                        "province_code""PA",
                        "name""testtest",
                        "address1""1200  Westport Rd",
                        "address2""",
                        "city""Imperial",
                        "zip""15126-1002"
                    },
                    "fulfillable_quantity"1,
                    "fulfillment_service""manual",
                    "fulfillment_status"null,
                    "gift_card"false,
                    "grams"45359,
                    "name""HAT - RED",
                    "origin_location": {
                        "id"2974544560228,
                        "country_code""US",
                        "province_code""NJ",
                        "name""redliuiot",
                        "address1""601 RANDOLPH RD",
                        "address2""",
                        "city""SOMERSET",
                        "zip""08873"
                    },
                    "price""100.00",
                    "price_set": {
                        "shop_money": {
                            "amount""100.00",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""100.00",
                            "currency_code""USD"
                        }
                    },
                    "product_exists"true,
                    "product_id"6608633462884,
                    "properties": [],
                    "quantity"1,
                    "requires_shipping"true,
                    "sku""HAT",
                    "taxable"true,
                    "title""HAT",
                    "total_discount""0.00",
                    "total_discount_set": {
                        "shop_money": {
                            "amount""0.00",
                            "currency_code""USD"
                        },
                        "presentment_money": {
                            "amount""0.00",
                            "currency_code""USD"
                        }
                    },
                    "variant_id"39453535535204,
                    "variant_inventory_management""shopify",
                    "variant_title""RED",
                    "vendor""redliuiot",
                    "tax_lines": [],
                    "duties": [],
                    "discount_allocations": []
                }
            ],
            "payment_terms"null,
            "refunds": [],
            "shipping_address": {
                "first_name""test",
                "address1""1200  Westport Rd",
                "phone""+11234567890",
                "city""Imperial",
                "zip""15126-1002",
                "province""Pennsylvania",
                "country""United States",
                "last_name""test",
                "address2""",
                "company""test",
                "latitude"40.4502542,
                "longitude"-80.3158926,
                "name""test test",
                "country_code""US",
                "province_code""PA"
            },
            "shipping_lines": []
        }
    ]
}
Tim_Mak
探路者
103 12 18

1. 可以,如果店铺有设置物流选项,他们会在订单的shipping_lines这一条显示

2. 你们指定时间是什么目的?有好几个不同的用法,created_at_max是指定时间以前的订单,created_at_min是指定时间以后的订单

ljl
新成员
31 0 0

我不是很清楚店铺物流选项在哪里设置,方便截图告诉我吗?

这是shopify平台告诉我的,他不建议我这样做

了解,Shopify的后台设计中,发货和选择物流商是同一个动作(因为一般来说要发货的话才会选择物流商)

因此建议您可以在确认物流商后,再选择发货并选择该物流商

请问以上说明是否有不清楚,或是其他能帮助您的部分呢?

这次对话给您的体验如何?期待您的反馈
/

Tim_Mak
探路者
103 12 18

我想了下,更好的方案应该是按location_id去区分

shopify店铺可以有多个发货地点,每个都有单独的location_id

这个location_id是可以获取订单的时候得知

ljl
新成员
31 0 0

我看了一下,此方案不可行,因为订单状态为未发货状态时,当调取获取订单接口时,是获取不到订单location_id,当调fulfillments回传运单号和面单信息才传location_id,还有别的可行方案吗?当我获取到未发货状态的订单时,就能使用使用某参数用于我来做一个渠道映射

ljl
新成员
31 0 0

此问题已得到解决,我们系统如果同步过来的订单如果没有指定渠道,是可以在我们系统选择的,谢谢

littleTree
Shopify Partner
4 0 0

我也打算对接发货,也是遇到了问题,实际上应该是使用哪个发货回传接口:

1、/admin/api/2021-10/orders/450789469/fulfillments.json

2、/admin/api/2021-10/fulfillments.json