Manage communication methods for a consumer profile
You can manage the communication methods on a consumer profile by using the following operations:
- Add a new communication method to an existing consumer profile
- Update a communication method
- Set the default communication method
- Delete a communication method
Add a new communication method to an existing consumer profile
You can add a new communication method (email/phone) to an existing consumer profile by sending a POST request to the /consumer-profiles/{consumer-profile-id}/communication endpoint.
HTTP method: POST
Endpoint: /consumer-profiles/PACJGQ/communication
Scenario: Adding a new communication method to the consumer profile with consumer-profile-id = PACJGQ
{
"phoneList": [
{
"phoneNumber": "8888888828",
"countryCode": "1",
"phoneNumberType": "Home"
}
],
"emailList": [
{
"emailAddress": "john.doe.x@gmail.com",
"emailAddressType": "Home"
}
]
}
Response:
{
"consumerProfileId": "PACJGQ",
"cardOnFileReferenceNumber": "",
"firstName": "John",
"lastName": "Doe",
"communication": {
"phoneList": [
{
"phoneNumber": "8888888828",
"countryCode": "1",
"phoneNumberType": "Home",
"communicationIdentifier": "HH04423498968"
}
],
"emailList": [
{
"emailAddress": "john.doe.x@gmail.com",
"emailAddressType": "Home",
"communicationIdentifier": "EE8141240230923"
}
]
},
"paymentMethodType": {
"cardList": [
{
"paymentMethodId": "77ccba29-4857-494a-82bc-2a80e1fa2b9d",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "2234",
"accountStatus": "ACTIVE",
"cardType": "MC",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0"
}
]
},
"addresses": [
{
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work2",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "200 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
}
],
"correlationIdentifier": "c1143783-8c2a-43c8-84ee-2893c2e53e89",
"createTimestamp": "2024-07-02T09:55:18.996Z",
"createUserIdentifier": "jack",
"updateTimestamp": "2024-07-02T09:55:18.996Z",
"updateUserIdentifier": "jack",
"profileStatus": "ACTIVE"
}
Update a communication method
You can modify the communication method (email/phone) for an existing consumer profile by sending a PATCH request to the /consumer-profiles/{consumer-profile-id}/communication/{communication-id} endpoint.
HTTP method: PATCH
Endpoint: /consumer-profiles/PACJGQ/communication/HH04423498968
Scenario: Updating the communication method with communication-id = HH04423498968 on the consumer profile with consumer-profile-id = PACJGQ
{
"phone": {
"phoneNumber": "8008887124",
"countryCode": "1",
"phoneNumberType": "Home"
}
}
Response:
{
"consumerProfileId": "PACJGQ",
"cardOnFileReferenceNumber": "123",
"firstName": "John",
"lastName": "Doe",
"communication": {
"phoneList": [
{
"phoneNumber": "",
"countryCode": "",
"phoneNumberType": "",
"communicationIdentifier": "HH04423498968"
}
],
"emailList": [
{
"emailAddress": "john.doe.x@gmail.com",
"emailAddressType": "Home",
"communicationIdentifier": "EE8141240230923"
}
]
},
"paymentMethodType": {
"cardList": [
{
"paymentMethodId": "77ccba29-4857-494a-82bc-2a80e1fa2b9d",
"cardExpirationMonthYearNumber": "01/2025",
"last4CardNumber": "9999",
"accountStatus": "ACTIVE",
"cardType": "MC",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0"
},
{
"paymentMethodId": "63aaba29-4857-494a-82bc-2a80e1fa2b1e",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "0919",
"accountStatus": "ACTIVE",
"cardType": "DI",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g"
}
],
"defaultMOP": {
"card": {
"paymentMethodId": "63aaba29-4857-494a-82bc-2a80e1fa2b1e",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "0919",
"accountStatus": "ACTIVE",
"cardType": "DI",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g"
}
}
},
"addresses": [
{
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "200 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
},
{
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work2",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "400 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
}
],
"correlationIdentifier": "648ccc37-e006-45ee-a127-2718bffeadad",
"createTimestamp": "2021-08-23T00:23:05.353Z",
"createUserIdentifier": "jack",
"updateTimestamp": "2024-07-02T12:08:56.482Z",
"updateUserIdentifier": "jack",
"profileStatus": "ACTIVE"
}
Set the default communication method
You can set the default communication method for a consumer profile by sending a PATCH request to the /consumer-profiles/{consumer-profile-id}/communication/{communication-id}/default endpoint.
HTTP method: PATCH
Endpoint: /consumer-profiles/PACJGQ/communication/HH04423498968/default
Scenario: Setting the communication-id = HH04423498968 as the default communication method for consumer-profile-id = PACJGQ
{
"consumerProfileId": "PACJGQ",
"cardOnFileReferenceNumber": "123",
"firstName": "John",
"lastName": "Doe",
"communication": {
"phoneList": [
{
"phoneNumber": "8888888828",
"countryCode": "1",
"phoneNumberType": "Home",
"communicationIdentifier": "HH04423498968"
}
],
"emailList": [
{
"emailAddress": "john.doe.x@gmail.com",
"emailAddressType": "Home",
"communicationIdentifier": "EE8141240230923"
}
],
"defaultPhone": {
"phoneNumber": "8888888828",
"countryCode": "1",
"phoneNumberType": "Home",
"communicationIdentifier": "HH04423498968"
}
},
"paymentMethodType": {
"cardList": [
{
"paymentMethodId": "77ccba29-4857-494a-82bc-2a80e1fa2b9d",
"cardExpirationMonthYearNumber": "01/2025",
"last4CardNumber": "9999",
"accountStatus": "ACTIVE",
"cardType": "MC",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0"
},
{
"paymentMethodId": "63aaba29-4857-494a-82bc-2a80e1fa2b1e",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "0919",
"accountStatus": "ACTIVE",
"cardType": "DI",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g"
}
],
"defaultMOP": {
"card": {
"paymentMethodId": "63aaba29-4857-494a-82bc-2a80e1fa2b1e",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "0919",
"accountStatus": "ACTIVE",
"cardType": "DI",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g"
}
}
},
"addresses": [
{
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "200 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
},
{
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work2",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "400 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
}
],
"correlationIdentifier": "648ccc37-e006-45ee-a127-2718bffeadad",
"createTimestamp": "2021-08-23T00:23:05.353Z",
"createUserIdentifier": "jack",
"updateTimestamp": "2024-07-02T12:13:41.602Z",
"updateUserIdentifier": "jack",
"profileStatus": "ACTIVE"
}
Delete a communication method
You can delete a communication method from a consumer profile by sending a DELETE request to the /consumer-profiles/{consumer-profile-id}/communication/{communication-id} endpoint.
HTTP method: DELETE
Endpoint: /consumer-profiles/PACJGQ/communication/EE8141240230923
Scenario: Deleting the communication-id = EE8141240230923 from the consumer-profile-id = PACJGQ
{
"consumerProfileId": "PACJGQ",
"cardOnFileReferenceNumber": "123",
"firstName": "John",
"lastName": "Doe",
"communication": {
"phoneList": [
{
"phoneNumber": "8888888828",
"countryCode": "1",
"phoneNumberType": "Home",
"communicationIdentifier": "HH04423498968"
}
],
"defaultPhone": {
"phoneNumber": "8888888828",
"countryCode": "1",
"phoneNumberType": "Home",
"communicationIdentifier": "HH04423498968"
}
},
"paymentMethodType": {
"cardList": [
{
"paymentMethodId": "77ccba29-4857-494a-82bc-2a80e1fa2b9d",
"cardExpirationMonthYearNumber": "01/2025",
"last4CardNumber": "9999",
"accountStatus": "ACTIVE",
"cardType": "MC",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0"
},
{
"paymentMethodId": "63aaba29-4857-494a-82bc-2a80e1fa2b1e",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "0919",
"accountStatus": "ACTIVE",
"cardType": "DI",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g"
}
],
"defaultMOP": {
"card": {
"paymentMethodId": "63aaba29-4857-494a-82bc-2a80e1fa2b1e",
"cardExpirationMonthYearNumber": "02/2025",
"last4CardNumber": "0919",
"accountStatus": "ACTIVE",
"cardType": "DI",
"firstName": "John",
"lastName": "Doe",
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g"
}
}
},
"addresses": [
{
"addressIdentifier": "8d452494-ec75-4ef9-9b45-e4bd7debf6a0",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "200 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
},
{
"addressIdentifier": "f99a1ecd-b177-4c3d-a99b-c72e132b260g",
"firstName": "John",
"lastName": "Doe",
"consumerAssignedAddressName": "Work2",
"primaryAddressIndicator": true,
"addressType": "SHIPPING",
"line1": "400 Elton Farm",
"line2": "Apt 123",
"city": "Glen Mills",
"state": "PA",
"postalCode": "19342",
"countryCode": "USA",
"addressStatus": "ACTIVE"
}
],
"correlationIdentifier": "648ccc37-e006-45ee-a127-2718bffeadad",
"createTimestamp": "2021-08-23T00:23:05.353Z",
"createUserIdentifier": "jack",
"updateTimestamp": "2024-07-02T12:17:40.401Z",
"updateUserIdentifier": "jack",
"profileStatus": "ACTIVE"
}