Delete an Address

delete
Delete by ID

https://api.moltin.com/v2/customers/:customer_id/addresses/:address_id
Request
Response
Path Parameters
address_id
required
string
The ID for the Address to delete
customer_id
required
string
A customer ID that has addresses
Headers
X-Moltin-Customer-Token
optional
string
A customer token used to access customer addresses for implicit calls
Authorization
required
string
The Bearer token to grant access to the API
204: No Content

With customer token

cURL
JavaScript SDK
curl -X DELETE https://api.moltin.com/v2/customers/:customer_id/addresses/:address_id \
-H "X-Moltin-Customer-Token: XXXX"
-H "Authorization: Bearer XXXX"
const MoltinGateway = require('@moltin/sdk').gateway
const Moltin = MoltinGateway({
client_id: 'X'
})
const customerId = 'XXXX'
const addressId = 'XXXX'
const customerToken = 'XXXX'
Moltin.Addresses.Delete({
customer: customerId,
addresss: addressId,
token: customerToken
}).then(response => {
// Do something
})

Without customer token

cURL
JavaScript SDK
curl -X DELETE https://api.moltin.com/v2/customers/:customer_id/addresses/:address_id \
-H "Authorization: Bearer XXXX"
const MoltinGateway = require('@moltin/sdk').gateway
const Moltin = MoltinGateway({
client_id: 'X',
client_secret: 'X'
})
const customerId = 'XXXX'
const addressId = 'XXXX'
Moltin.Addresses.Delete({
customer: customerId,
addresss: addressId
}).then(response => {
// Do something
})