XM
Powered By GitBook
Unset Default Address
Path:
1
POST /https://{baseurl}/api-commerceIdentity/user/{{userId}}/address/unset
Copied!
After setting an address as default, users may want to change that default address at a later point. This API is used to remove the address as default.
If required, a new default address can be set through the Set Default Address endpoint.
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: The address is successfully removed from the default address setting. The complete user details are retrieved in response.
1
{
2
"_id": "5e97947d3cb8553c0e43d87f",
3
"isActive": {
4
"status": true
5
},
6
"registrationDate": "2020-04-15T22:34:22.429Z",
7
"expiryDate": "2070-04-15T22:34:22.429Z",
8
"roles": [
9
"5de1646f8c6352091d944f1c"
10
],
11
"name": {
12
"first": "John",
13
"middle": "A",
14
"last": "Doe"
15
},
16
"phone": [
17
{
18
"_id": "5e97947d3cb8553c0e43d880",
19
"number": "123456789",
20
"countryCode": "+1",
21
"extension": "1234",
22
"kind": "mobile",
23
"id": "5e97947d3cb8553c0e43d880"
24
}
25
],
26
"email": "[email protected]",
27
"extra": {
28
"resetPassword": "requested"
29
},
30
"registrationSite": "abcde.com",
31
"account": "5e97947d3cb8553c0e43d87e",
32
"userId": 90,
33
"address": [
34
{
35
"isDefault": false,
36
"isValidated": false,
37
"_id": "5e98a2a13e9e9e495ed2e3b3",
38
"address1": "10400 NE 4th St ",
39
"city": "Bellevue",
40
"state": "WA",
41
"country": "United States",
42
"zipCode": "98004",
43
"kind": "Billing",
44
"name": {
45
"first": "John",
46
"last": "Doe"
47
},
48
"address2": null,
49
"attention": null,
50
"company": null,
51
"email": null,
52
"phone": null,
53
"id": "5e98a2a13e9e9e495ed2e3b3"
54
}
55
],
56
"provider": [
57
{
58
"registrationDate": "2020-04-15T22:34:22.429Z",
59
"isActive": true,
60
"_id": "5e97947d3cb8553c0e43d881",
61
"name": "LOCAL",
62
"lastLoginDate": "2020-04-16T22:44:59.116Z",
63
"id": "5e97947d3cb8553c0e43d881"
64
}
65
],
66
"createdAt": "2020-04-15T23:10:53.773Z",
67
"updatedAt": "2020-04-16T23:02:39.342Z",
68
"__v": 0
Copied!
HTTP Code : 404 Message : Not Found
Description: You will see this error when the system user ID is incorrect.
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