XM

Retrieve Address by Kind

Path:

GET https://{baseurl}/api-commerceIdentity/user/{{userId}}/address?kind=Billing

Facilitates retrieval of a specific type of address such as billing or shipping. To retrieve all the addresses of a user, the Retrieve All Addresses of User API is recommended.

Headers

Content-Type : application/json

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : Path

Name : The 24 character system-generated user ID.

Required : true

Sample Request

Path:

https://{baseurl}/user/5e97947d3cb8553c0e43d87f/address

Sample Response

HTTP Code : 200 Message : OK

Description: You will see this message when address is successfully retrieved.

[
{
"isDefault": false,
"isValidated": false,
"_id": "5e98a2a13e9e9e495ed2e3b3",
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "Billing",
"name": {
"first": "John",
"last": "Doe"
},
"address2": null,
"attention": null,
"company": null,
"email": null,
"phone": null,
"id": "5e98a2a13e9e9e495ed2e3b3"
}
]

HTTP Code : 404 Message : Not Found

Description: You will see this error when the system user ID is incorrect.

Sample

{
"code": "USER_NOT_FOUND",
"message": "User not found."
}

Changelog

  • July-2020 last updated