createCustomerAddress
Create a new customer address.
In turn, it receives data from the createCustomerAddress endpoint exposed by the BigCommerce API
Signature
declare function createCustomerAddress(
context: BigcommerceIntegrationContext,
params: index_d_exports$1.CreateAddressParameters
): Promise<index_d_exports$1.CreateAddressResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Required | index_d_exports$1.CreateAddressParameters |
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 address = 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'
})