---
schema_version: "1"
id: 01a00ed7694a6ac07388fb9520c8f11099d502a28ad160444ee7dfe49aa67003
title: Customer Address SPI
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/retail-cloud/reference/generated-api-specs/customer-address-spi.md
canonical_url: https://developer.salesforce.com/docs/commerce/retail-cloud/references/customer-address-spi
source_site: developer.salesforce.com
content_type: documentation
content_hash: fd5b2e6e1c30314f2c1f9dfa61ccde85b35d58090c4f4e007fe7fc229cfcf8e8
products:
  - Point of Sale for Developers
  - Salesforce APIs
---
Customer Address SPI

# Customer Address SPI

[Download specification](https://developer.salesforce.com/static/commercecloud/retail-cloud/customer-address-spi/customer-address-spi-oas-public.yaml)

Sample APIs that demonstrate how to implement API endpoints or webhooks in the merchant's system. These endpoints must be configured in the POS system so that the POS can use them to modify customer addresses.

**Version:** 2.3.4

## Tags

### Customer Address SPI

[Download specification](https://developer.salesforce.com/static/commercecloud/retail-cloud/customer-address-spi/customer-address-spi-oas-public.yaml)

Sample APIs that demonstrate how to implement API endpoints or webhooks in the merchant's system. These endpoints must be configured in the POS system so that the POS can use them to modify customer addresses.

## Operations

### GET Retrieve customer address list.

`GET /merchant/spi/sample/endpoint/sa/customer/address`

Operation ID: `getCustomerAddresses`. Tags: Customer Address SPI.

Retrieve a list of addresses for a customer by customer ID.

#### Parameters

*   `customerId` (query, string)

#### Responses

*   **default** Default response.
    
    Media type: `application/json`. Schema: `GetCustomerAddressesResponse`.
    

### PUT Update customer address.

`PUT /merchant/spi/sample/endpoint/sa/customer/address`

Operation ID: `updateCustomerAddress`. Tags: Customer Address SPI.

Update customer address by customer ID and address ID.

#### Request body

Media type: `application/json`. Schema: `UpdateCustomerAddressRequest`.

#### Responses

*   **default** Default response.
    
    Media type: `application/json`. Schema: `UpdateCustomerAddressResponse`.
    

### POST Add new customer address.

`POST /merchant/spi/sample/endpoint/sa/customer/address`

Operation ID: `addCustomerAddress`. Tags: Customer Address SPI.

Add a new address for a customer.

#### Request body

Media type: `application/json`. Schema: `AddCustomerAddressRequest`.

#### Responses

*   **default** Default response.
    
    Media type: `application/json`. Schema: `AddCustomerAddressResponse`.
    

### DELETE Delete customer address.

`DELETE /merchant/spi/sample/endpoint/sa/customer/address`

Operation ID: `deleteCustomerAddress`. Tags: Customer Address SPI.

Delete customer address by customer ID and address ID.

#### Parameters

*   `customerId` (query, string)
*   `addressId` (query, string)

#### Responses

*   **default** Default response.
    
    Media type: `application/json`. Schema: `DeleteCustomerAddressResponse`.
    

## Schemas

### GetCustomerAddressesResponse

*   `errorMessage` (_string_, nullable) Error message shown to the user.  
    Example: `Invalid request. Please check the request and try again.`.
*   `errorCode` (_string_, nullable) Error code shown to the user.  
    Example: `INTERNAL_ERROR`.
*   `addressList` (_array of Address_, nullable) List of customer addresses.
*   `error` (_boolean_)

### UpdateCustomerAddressRequest

*   `customerId` (_string_) Customer ID.
*   `address` (_Address_)
*   `addressId` (_string_) Address ID of address to update.

### UpdateCustomerAddressResponse

*   `errorMessage` (_string_, nullable) Error message shown to the user.  
    Example: `Invalid request. Please check the request and try again.`.
*   `errorCode` (_string_, nullable) Error code shown to the user.  
    Example: `INTERNAL_ERROR`.
*   `addressList` (_array of Address_) List of customer addresses.
*   `error` (_boolean_)

### AddCustomerAddressRequest

*   `customerId` (_string_) Customer ID.
*   `address` (_Address_)

### AddCustomerAddressResponse

*   `errorMessage` (_string_, nullable) Error message shown to the user.  
    Example: `Invalid request. Please check the request and try again.`.
*   `errorCode` (_string_, nullable) Error code shown to the user.  
    Example: `INTERNAL_ERROR`.
*   `addressList` (_array of Address_) List of customer addresses.
*   `error` (_boolean_)

### DeleteCustomerAddressResponse

*   `errorMessage` (_string_, nullable) Error message shown to the user.  
    Example: `Invalid request. Please check the request and try again.`.
*   `errorCode` (_string_, nullable) Error code shown to the user.  
    Example: `INTERNAL_ERROR`.
*   `addressList` (_array of Address_, nullable) List of customer addresses.
*   `error` (_boolean_)

### Address

Address **Billing Address:** It contains first and last name of billing person. It is applicable if order is associated with signed-in customer or if an order requires billing address. Note: If item level shipping method or item level shipping address is enabled, use the shippingAddress from deliveryGroups. For more details, see:.

*   `salutation` (_string_, nullable) Salutation.
*   `firstName` (_string_) Customer first name saved for address.  
    Maximum length: 64.
*   `secondName` (_string_, nullable) Customer second name saved for address.  
    Maximum length: 64.
*   `lastName` (_string_, nullable) Customer last name saved for address.  
    Maximum length: 64.
*   `suffix` (_string_, nullable) Suffix.
*   `addressLine1` (_string_, required) Address Line 1.  
    Maximum length: 256.
*   `addressLine2` (_string_, nullable) Address Line 2.  
    Maximum length: 256.
*   `city` (_string_, required) City.  
    Maximum length: 64.
*   `state` (_string_, required) State.  
    Maximum length: 32.
*   `postalCode` (_string_, required) Postal Code.  
    Maximum length: 16.
*   `countryCode` (_string_, nullable) Country Code.  
    Maximum length: 32.
*   `phone` (_string_, nullable) Phone.  
    Maximum length: 24.
*   `storeId` (_string_, nullable) Store ID if it is store address.
*   `emailAddress` (_string_, nullable) Customer Email Address.
*   `country` (_string_, nullable) Country.
*   `defaultBilling` (_boolean_)
*   `defaultShipping` (_boolean_)