createCustomerAddress
Create a new customer address.
This method sends a POST request to the createCustomerAddress endpoint of the Vue Storefront API Middleware. In turn, it receives data from the createCustomerAddress endpoint exposed by the BigCommerce API
Signature
declare function createCustomerAddress$1(
props: CreateAddressParameters,
options?: MethodOptions
): Promise<CreateAddressResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | CreateAddressParameters | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions |
Returns
Returns a response containing the object with the created address details.
Referenced Types
Examples
Adding a new customer address
import { sdk } from '~/sdk.config.ts';
const createAddress = await sdk.bigcommerce.createCustomerAddress({
first_name: 'Name',
last_name: 'Surname',
company: 'Company',
address1: 'Address',
address2: '2',
city: 'Edinburgh',
postal_code: 'EH1 1ST',
country_code: 'GB',
phone: '074743473312'
})