Delete an address
On behalf of a member ·
x-on-behalf-of required
Returns the complete updated list, including the correct default, so no guessing or additional query is needed. After deleting the default address, the most recently updated remaining address becomes the default automatically.
⚠ No idempotency key is required: deletion itself is idempotent (the second request returns 404).
⚠ Physical card orders in transit are unaffected because their addresses are snapshotted.
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Required |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-on-behalf-of |
string | Required |
Response
200Deleted; returns the remaining list and the new
default_id.404
not_foundRequest
curl -X DELETE 'https://api.zinfra.vip/v1/shipping-addresses/{id}' \
-H 'x-auth-token: Bearer $TOKEN' \
-H 'x-on-behalf-of: $MEMBER_ID'const res = await fetch("https://api.zinfra.vip/v1/shipping-addresses/{id}", {
method: "DELETE",
headers: {
"x-auth-token": "Bearer $TOKEN",
"x-on-behalf-of": "$MEMBER_ID",
},
});
// Keep monetary amounts as strings, never numbers.
const data = await res.json();import requests
res = requests.delete(
"https://api.zinfra.vip/v1/shipping-addresses/{id}",
headers={
"x-auth-token": "Bearer $TOKEN",
"x-on-behalf-of": "$MEMBER_ID",
},
)
# Use Decimal(str(...)) for amounts, not float.
data = res.json()req, _ := http.NewRequest("DELETE", "https://api.zinfra.vip/v1/shipping-addresses/{id}",
nil)
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-on-behalf-of", "$MEMBER_ID")
res, err := http.DefaultClient.Do(req)
// Decode amount fields as string, not float64.HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.zinfra.vip/v1/shipping-addresses/{id}"))
.header("x-auth-token", "Bearer $TOKEN")
.header("x-on-behalf-of", "$MEMBER_ID")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
// Use String / BigDecimal for amounts, not double.$ch = curl_init('https://api.zinfra.vip/v1/shipping-addresses/{id}');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-auth-token: Bearer $TOKEN',
'x-on-behalf-of: $MEMBER_ID',
],
]);
$res = curl_exec($ch);
// Use bcmath / strings for amounts, not floatval.
200
// No response example is declared in the specification for this operation.