@plentymarkets/shop-api / doSaveAddress
Function: doSaveAddress() ​
Defined in: api/doSaveAddress/index.ts:39
Method doSaveAddress - Create a new billing or shipping address to the current session (guest or logged in).
Parameters ​
context ​
PlentysystemsIntegrationContext
params ​
Returns ​
Remarks ​
- Calls /rest/storefront/contact/addresses/
- This method is used to create a new billing or shipping address
Example ​
ts
const { data } = await useSdk().plentysystems.doSaveAddress({
typeId: AddressType.Billing,
addressData: {
country: '12',
firstName: 'John',
lastName: 'Doe',
streetName: 'Main Street',
apartment: '1',
city: 'New York',
state: null,
zipCode: '12345',
phoneNumber: null
}
});