Service URL: POST /customers/phoneNumbers
Request Body:
phoneNumberDetails – IPhoneNumber – The new phone details for the customer
Response Headers:
Location: /customers/phoneNumbers/{phoneNumberId}
Remarks:
This service can add a phone number to the customer. In this service, the phone number are associated with the customer and not a particular address. The id for the new phone number is returned in the response headers. If the new phone number is marked as the preffered number, the existing preffered phone number is also updated to remove the preffered flag.
Example Request:
POST:
Content-Type: application/json
{
"@entity" : "retail:addCustomerPhoneNumberRequest",
"phoneNumberDetails" : {
"@entity": "retail:phoneNumber",
"countryCode": "",
"lastUpdated": 1521045610000,
"number": "01295768256",
"preferred": false,
"restrictedReason": "",
"status": "",
"typeId": {
"@entity": "retail:contactTypeKey",
"id": ""
},
"referenceId": "",
"active": true
}
}
Example Response:
Status: 201 Created
Location: http://localhost:8080/WebRestApi/rest/customers/phoneNumbers/47