Update Customer Addresses

Overview

In order to update the addresses of an existing customer, you can consume the endpoint presented in this article. In order to consume it, you must:

  • Be authenticated user

For information on how you can authenticate, see: Authentication

As soon as you do authentication and receive a valid token, it needs to be passed to the service call.

Endpoint

Example for such endpoint for TT server is:

https://tt.api.sellercloud.com/rest/api/Customers/{customerId}/Addresses​​

For your server endpoint will be:

https://{your_server_id}.api.sellercloud.com/rest/api/Customers/{customerId}/Addresses

Request

Information about expected request parameters can be found on swagger UI https://tt/api.sellercloud.com/rest/swagger.

  • Method Type: HttpPut
  • Authorization: Use Bearer Token (where ‘Token’ is the token received from token authentication)
  • Header info: Content-Type: application/json
  • Parameters: Id of existing customer
  • Request Body:

ParameterData TypeDescriptionIs Required
AddressesList

 
List of addresses to updatetrue
IDintegerAddress IDtrue
ContactNamestringContact name

Either ‘ContactName’ or ‘CompanyName’ has to be provided.

false
CompanyNamestringBusiness name

Either ‘ContactName’ or ‘CompanyName’ has to be provided.

false
AddressSourceenumAddress source

Possible values can be found here

true
AddressStatusenumAddress status

Possible values can be found here

true
IsShippingAddressboolIndicates if the address is shipping addresstrue
IsBillingAddressboolIndicates if the address is billing addresstrue
AddressstringAddress Line 1true
Address2stringAddress Line 2false
CountrystringTwo letter iso country code of the address countrytrue
CitystringCitytrue
StatestringState

Required when ‘Country’ is set to “US”.

false
RegionstringRegionfalse
ZipCodestringZip codetrue
PhonestringPhonefalse
FaxstringFaxfalse
USAGE NOTE: The whole address object has to be provided when updating. Customer address can be obtained from Get Single Customer. Then values of its properties can be changed and the changed address can be provided to this endpoint to update it. Only the addresses to update should be provided to this endpoint.

Response

  • If user is authenticated and update is successful, then response will be Status Code 200 => OK
  • If user is not authenticated, then response will be Status Code 401 => Not Valid Token
  • In case of error, response will be Status Code 500 => Internal Server Error

Was this article helpful?

Next
Address Source