【发布时间】:2018-02-16 09:16:49
【问题描述】:
如何使用 rest Magento2 获取客户的所有地址?是否有任何开箱即用的 API?
【问题讨论】:
标签: magento2 customer-account-data-api
如何使用 rest Magento2 获取客户的所有地址?是否有任何开箱即用的 API?
【问题讨论】:
标签: magento2 customer-account-data-api
是的,假设您有客户 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"
]
}
]
}
【讨论】: