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

TIP: 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 create an address in the Considerations, Before You Start, Request, and Response sections below.


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

Copy
{
  "address_type": "telecom",
  "purpose": "OFFICE",
  "dialing_prefix": "11",
  "country_code": "1",
  "area_code": "512",
  "number": "4391234",
  "extension": "1234"
}
Create Customer Phone Number Request Fields
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:

  • OFFICE

  • HOME

  • FAX

  • MOBILE

  • PAYMENT

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, the new address entity is returned with an id assigned.

Copy
{
  "address_type": "telecom",
  "id": "21090",
  "purpose": "OFFICE",
  "dialing_prefix": "11",
  "country_code": "1",
  "area_code": "512",
  "number": "4391234",
  "extension": "1234"
}

 

 

 

Topic Updated: 5/2024.