DATA OCAPI GET /customer_lists/{list_id}/customers/{customer_no} is not returning the primary/default address of the customer
Trailblazer Community

DATA OCAPI GET /customer_lists/{list_id}/customers/{customer_no} is not returning the primary/default address of the customer

Commerce Cloud API/OCAPI

Last updated 2019-09-16 ·Reference W-6572282 ·Reported By 1 users

In Review

Summary
DATA OCAPI GET /customer_lists/{list_id}/customers/{customer_no} is not returning the primary/default address of the customer

Repro
https://localhost/s/-/dw/data/v19_5/customer_lists/SiteGenesis/customers/D00000001?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa



Actual Result:

{
"_v": "19.5",
"_type": "customer",
"_resource_state": "f4646f34d57f1380d6d70b7684a69d81d20c5b789f8140e9818aa777dda22c4a",
"birthday": "1988-10-21",
"creation_date": "2015-05-18T19:19:51.000Z",
"credentials": {
"_type": "credentials",
"enabled": true,
"locked": false,
"login": "testuser1@salesforce.com"
},
"customer_id": "bePy27QIKGWxtrcUWHba3V3osl",
"customer_no": "D00000001",
"email": "testuser1@salesforce.com",
"first_name": "Test1",
"gender": 2,
"last_login_time": "2015-05-18T20:43:17.000Z",
"last_modified": "2019-09-03T14:39:22.000Z",
"last_name": "User1",
"last_visit_time": "2015-05-18T20:43:17.000Z",
"previous_login_time": "2015-05-18T20:43:17.000Z",
"previous_visit_time": "2015-05-18T20:43:17.000Z"
}
Expected Result:

{
"_v": "19.5",
"_type": "customer",
"_resource_state": "f4646f34d57f1380d6d70b7684a69d81d20c5b789f8140e9818aa777dda22c4a",
"birthday": "1988-10-21",
"creation_date": "2015-05-18T19:19:51.000Z",
"credentials": {
"_type": "credentials",
"enabled": true,
"locked": false,
"login": "testuser1@salesforce.com"
},
"customer_id": "bePy27QIKGWxtrcUWHba3V3osl",
"customer_no": "D00000001",
"email": "testuser1@salesforce.com",
"first_name": "Test1",
"gender": 2,
"last_login_time": "2015-05-18T20:43:17.000Z",
"last_modified": "2019-09-03T14:39:22.000Z",
"last_name": "User1",
"last_visit_time": "2015-05-18T20:43:17.000Z",
"previous_login_time": "2015-05-18T20:43:17.000Z",
"previous_visit_time": "2015-05-18T20:43:17.000Z",
"primary_address": {
"_type": "customer_address",
"address1": "104 Presidential Way",
"address_id": "Home",
"city": "Woburn",
"country_code": "us",
"creation_date": "2019-09-03T14:39:22.000Z",
"etag": "4653b5d07deef6a9ec294b46587adf9e25e60c8e274cd22b439c1dfc2626c073",
"first_name": "Test1",
"full_name": "Test1 User1",
"last_modified": "2019-09-03T14:39:22.000Z",
"last_name": "User1",
"phone": "781-555-1212",
"postal_code": "01801",
"state_code": "MA"
}
}

Workaround
Customer should use following DATA rest apis to deal with customer addresses



GET/customer_lists/{list_id}/customers/{customer_no}/addresses Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses.

POST/customer_lists/{list_id}/customers/{customer_no}/addresses The action creates a new customer address with the given address information.

GET/customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id} Action which returns an address of a customer.

PATCH/customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id} Action which updates an address of a customer with the given address information.

DELETE/customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id} Action which deletes a

Reported By (1)

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.