【问题标题】:Get all address of a customer using rest Magento2使用rest Magento2获取客户的所有地址
【发布时间】:2018-02-16 09:16:49
【问题描述】:

如何使用 rest Magento2 获取客户的所有地址?是否有任何开箱即用的 API?

【问题讨论】:

    标签: magento2 customer-account-data-api


    【解决方案1】:

    是的,假设您有客户 ID:

    GET /V1/customers/{customerId}
    

    这将返回所有客户地址

    "customer": 
    {
      "id": 0,
      "default_billing": "string",
      "default_shipping": "string",
      "addresses": [
        {
          "id": 0,
          "customer_id": 0,
          "region": {
            "region_code": "string",
            "region": "string",
            "region_id": 0,
            "extension_attributes": {}
          },
          "region_id": 0,
          "country_id": "string",
          "street": [
            "string"
          ]
        }
      ]
    }
    

    【讨论】:

    • 您好,我是 API 新手,我正在尝试通过使用 API 来吸引客户,我的锻炼:127.0.0.1/anusthana/api/rest/customer -> 它的返回错误,我发现了一些知识从谷歌他们说你通过令牌,我不知道我怎么能通过令牌,但我知道我的令牌 - > snag.gy/QbHmRs.jpg 我该如何使用它?你能帮帮我吗? @sissy
    • 我的帐户无法正常工作,我无法发布,您能帮我吗?
    • 试着写个帖子解释你的所作所为吧,我不可能帮到你的cmets或者聊天,对不起
    • 至少感谢您的回复。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-22
    • 2015-05-05
    • 2019-01-14
    • 2019-11-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多