Alokai

addShippingAddress

Add a new shipping address for the current user.

By default, it uses the addShippingAddressDefaultQuery GraphQL query

Signature

declare function addShippingAddress(
	context: CommercetoolsIntegrationContext,
	params: AddShippingAddressParams,
	customQuery?: CustomQuery
): Promise<AddShippingAddressResponse>;

Parameters

NameRequiredTypeDescription
contextRequiredCommercetoolsIntegrationContext
paramsRequiredAddShippingAddressParams
customQueryOptionalCustomQuery

Referenced Types

Examples

Adding a shipping address for the current user

const { user } = await sdk.commerce.addShippingAddress({
 address: { firstName: "John", lastName: "Doe", country: "US" },
 user: { version: "testVersion" },
});

On this page