Shopify创建订单Admin API不突然收到电子邮件
Admin API 2021-10订单端点正在为已经存在的用户
{\“ Customer \”:[\“电子邮件已被接收\”]}
此问题以前没有存在。有人知道最近是否有API的情况发生了变化?找不到有关更新的文档
Admin API 2021-10 Orders endpoint is throwing the following error for already existing user
{\"customer\":[\"Email has already been taken\"]}
This problem was not there before. Does anyone know if something changed recently API-wise? no documentation regarding the update was found
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,在创建订单时,您需要在创建订单时使用客户ID。因此,您通过电子邮件检查该客户是否存在?如果这样做,您只需提供ID即可。如果您跳过该步骤(请记住,客户是Shopify订单的一个单独的方面),那么您可能会遇到此问题。给Shopify提供了一封电子邮件,试图创建客户,系统说停在那里,该客户已经存在,您从未提供ID。
听起来很奇怪,但是也许您从未遇到这个问题,因为您从来没有遇到过乡间的客户?如您所知,大多数订单是一次性的,并且在很多商店中都不重复。
不确定这种解释是完全有意义的,但是无论如何,我发现的解决方法只是在尝试创建订单之前建立客户。您要么为现有的ID使用ID,要么创建新的ID。
Usually when creating orders, you would want to use a Customer ID for an order when creating it. So you check, via email, does this customer even exist? If it does, you just provide the ID. If you skip that step (remember, customers are a separate aspect of Shopify Orders), you may then run into this issue. Shopify is given an email, tries to create a customer, and the system says STOP RIGHT THERE, this customer already exists, and you never provided an ID.
Sounds weird, but maybe you never encountered this issue because you just never ran into repeat customers? As you know, most orders are one-time and not repeat at a lot of stores.
Not sure this explanation makes total sense, but anyway, the workaround I found was just to establish the customer BEFORE trying to create the order. Either you use an ID for an existing one, or, create a new one.