updateCustomerAddress

updateCustomerAddress

This method allows you to update a specific address for a customer.

Parameters

  • customerId (string, required): The UUID of the customer.
  • id (string, required): The UUID of the address to update.

Body Parameters

  • formatted (string, optional): The formatted address.
  • street (string, optional): The street of the address.
  • city (string, optional): The city of the address.
  • state (string, optional): The state of the address.
  • region (string, optional): The region of the address.
  • postalCode (string, optional): The postal code of the address.
  • locality (string, optional): The locality of the address.
  • country (string, optional): The country code of the address. Possible values include ISO 3166-1 alpha-3 country codes.

Returns

A JSON object indicating the successful update of the address.

Usage Example

const axios = require('axios');
let data = JSON.stringify({
  "formatted": "string",
  "street": "string",
  "city": "string",
  "state": "string",
  "region": "string",
  "postalCode": "string",
  "locality": "string",
  "country": "AFG"
});

let config = {
  method: 'patch',
  maxBodyLength: Infinity,
  url: 'https://api.nexera.id/customers/:customerId/addresses/:id',
  headers: { 
    'Content-Type': 'application/json', 
    'Accept': 'application/json', 
    'Authorization': 'Bearer <TOKEN>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});