Add or Replace Customer Postal Address

You can create or replace a customer's postal address 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 TELECOM addresses for customers. Refer to Add or Replace Customer Email Address and Add or Replace Customer Phone Number.

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 postal address to a customer:

  • A customer can have up to four postal addresses, one for each purpose.

  • An address cannot be edited or deleted. It can only be replaced with a new address of the same address_type and purpose.

Before You Start

You will need the following when creating a new postal address:

  • The id of the customer entity to update as the endpoint's {customer_id} path parameter.

Request

Copy
{
  "address_type": "postal",
  "purpose": "SHIPPING",
  "country": "USA",
  "city": "Detroit",
  "line1": "173 Main St",
  "region_or_state": "MI",
  "postal_code": "48190"
}
Create Customer Postal Address Request Fields
Name Description Data Type Required or Optional Notes

address_type

The type of address to add or update. POSTAL is the required value when creating a postal address.

string

Required

 

purpose

The purpose of the postal address. Available values are:

  • BILLING — The address that appears on the invoices generated by the customer's billing accounts.

  • SERVICE — The default address for services added to the customer's billing accounts.

  • SHIPPING — The physical address to receive shipments.

  • PAYMENT — The address associated with payments. The address is for information purposes only and not referenced by other areas of the system.

string

Required

When a postal address of the same purpose is posted, the previous address is overwritten.

country

The country of the postal address.

string

Required

Refer to Country Codes.

city

The city of the postal address.

string

Optional

 

region_or_state

The region, state, or territory of the postal address.

string

Optional

Addresses for Canada, Mexico, and the United States of America require a valid region_or_state value.

Refer to Region or State Codes.

attention

Additional line for postal address.

string

Optional

 

postal_code

The postal code for the postal address.

string

Optional

Addresses for Canada, Mexico, and the United States of America require a valid postal_code value.

line1

The first line of the postal address.

string

Required

 

line2

The second line of the postal address.

string

Optional

 

p_code

A unique code used by the Avalara Communications Tax processor to represent the address.

string

Optional

By default, the p_code value is generated by Gotransverse based on the address values provided in the request.

A p_code value is required when the p_code_overriden value is TRUE.

p_code_overriden

Specifies if the p_code value provided in the request should be saved instead of generated by Gotransverse:

  • TRUE — The value for the p_code in the request is saved.

  • FALSE — (default) The value (if any) for the p_code in the request is ignored and GTV assigns a value.

boolean

Optional

 

Response

When successful, the new address entity is returned with an id assigned.

Copy
{
  "address_type": "postal",
  "id": "21082",
  "purpose": "SHIPPING",
  "country": "USA",
  "city": "Detroit",
  "line1": "173 Main St",
  "region_or_state": "MI",
  "postal_code": "48190"
}

 

 

 

Topic Updated: 5/2024.