Add phone number
  • 19 Nov 2024
  • 1 Minute to read
  • Dark
    Light

Add phone number

  • Dark
    Light

Article summary

The API endpoint `/cdm/client//customer//add phone/` is designed to add a phone number to a Customer or Patient record. It requires specific header and path parameters, including an API key, client ID, and a unique customer or patient identifier (ccid). The phone number must be between 10 to 11 digits long. The request body includes parameters for consent type, phone type, country code, and client source, with specific valid values for each. Upon successful execution, the phone number is added to the customer's notification channels, with a limit of 50 phone numbers per CCID and 50 CCIDs per phone number. The API responds with various status codes, including 200 for success, 400 for invalid requests, 401 for unauthorized access, 404 for not found, 409 for conflicts, and 500 for server errors, providing relevant messages for each scenario.

Put
/cdm/client/{client_id}/customer/{ccid}/add_phone/{phone_number}

This API adds a phone number to a Customer or Patient.

Header parameters
xx-relay-api-key
stringRequired

Contains the API key needed.

Path parameters
client_id
stringRequired

Client ID

Minimum1
ccid
stringRequired

Uniquely identifies a Customer or Patient.

Max length100
ExampleBAK-11984-007
phone_number
stringRequired

The phone number for a Customer or Patient.

Min length10
Max length11
Body parameters

On success (200), this API adds the phone number to the array of notification channels in the Customer or Patient record. Currently, relay permits up to 50 phone numbers associated to one CCID and up to 50 CCIDs can be associated to a specific phone number.

object

Request body for Add Phone.

consent_type
string

Identifies the consent of the Customer or Patient.

Valid values[ "written", "express", "stop" ]
Exampleexpress
phone_type
string

Type of phone line of the Customer or Patient.

Valid values[ "mobile", "landline", "unknown" ]
Examplemobile
country_code
string

The country code of the phone_type. Defaults to 1.

Max length10
Example1
client_source
string

The source provided by the client of the channel. Defaults to an internal channel.

Max length100
Examplecustom client source
Responses
200

OK - The phone number was successfully added to the Customer or Patient record.

object

Example message success details.

message
string
Max length100
ExamplePhone number {phone_number} has been added to customer with ccid {ccid} for client {client_id}.
400

Invalid request

401

Unauthorized

404

Not Found - The requested resource was not found. Please verify the route parameter.

409

Conflict - Indicates the request could not be processed. A common reason is when attempting to create a new Journey object, but the ID already exists in the system.

500

An unexpected server error occurred. The response body should contain additional information related to the server error. Please retry your request.


Was this article helpful?