Add or Replace Customer Phone Number
You can create or replace a customer phone number using the following endpoint and sample payload:
POST https://example-gotransverse.com/billing/2/customers/{customer_id}/addresses
This endpoint can also create EMAIL and POSTAL addresses. Refer to Add or Replace Customer Email Address and Add or Replace Customer Postal Address.
Learn what you need to know to successfully
Considerations
Consider the following when adding a phone number to a customer:
-
A customer can have up to five phone numbers, one for each purpose.
-
An phone number cannot be edited or deleted. It can only be replaced with a new phone number of the same address_type and purpose.
Before You Start
You will need the following when creating a new phone number:
-
The id of the customer entity to update as the endpoint's {customer_id} path parameter.
Request
{
"address_type": "telecom",
"purpose": "OFFICE",
"dialing_prefix": "11",
"country_code": "1",
"area_code": "512",
"number": "4391234",
"extension": "1234"
}
Name | Description | Data Type | Required or Optional | Notes |
---|---|---|---|---|
address_type |
The type of address. The value must be TELECOM to create a phone number. |
string |
Required |
|
purpose |
The purpose of the phone number:
|
string |
Required |
|
dialing_prefix |
The prefix code of the phone number. |
string |
Optional |
Valid for a 2-digit ISD code. |
country_code |
The country code of the phone number. |
string |
Optional |
|
area_code |
The area code of the phone number. |
string |
Required |
|
number |
The phone number. |
string |
Required |
|
extension |
The extension for the phone number. |
string |
Optional |
Response
When successful,
{
"address_type": "telecom",
"id": "21090",
"purpose": "OFFICE",
"dialing_prefix": "11",
"country_code": "1",
"area_code": "512",
"number": "4391234",
"extension": "1234"
}
Topic Updated: 5/2024.