XM
Powered By GitBook
Set Default Address
Path:
1
POST https://{baseurl}/api-commerceIdentity/user/{{userId}}/address/{{addressId}}/set
Copied!
Enables users to set a default address for shipping and billing so that they don't have to separately select them each time they shop.
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 and address ID.
Required : true

Sample Request

Path:
1
https://{baseurl}/user/5e97947d3cb8553c0e43d87f/address
Copied!

Sample Response

HTTP Code : 200 Message : OK
Description: You will see this message when an address is set as default.
1
[
2
{
3
"isDefault": false,
4
"isValidated": false,
5
"_id": "5e98a2a13e9e9e495ed2e3b3",
6
"address1": "10400 NE 4th St ",
7
"city": "Bellevue",
8
"state": "WA",
9
"country": "United States",
10
"zipCode": "98004",
11
"kind": "Billing",
12
"name": {
13
"first": "John",
14
"last": "Doe"
15
},
16
"address2": null,
17
"attention": null,
18
"company": null,
19
"email": null,
20
"phone": null,
21
"id": "5e98a2a13e9e9e495ed2e3b3"
22
}
23
]
Copied!
HTTP Code : 404 Message : Not Found
Description: You will see this message when the address could not be set as a default address
Sample
1
{
2
"code": "SET_DEFAULT_FAILED",
3
"message": "Address not found."
4
}
Copied!

Changelog

    Last updated - July 2020
Last modified 3mo ago
Copy link
Contents
Changelog