Shipping address book
On behalf of a member ·
x-on-behalf-of required
Where physical cards are shipped. The default address comes first; the rest are ordered by most recently updated.
⚠ Use the max value we return; do not hardcode a limit. If we change the limit, a hardcoded Add button may become disabled while more addresses are still allowed, or stay enabled until a request is rejected.
⚠ default_id is null when there are no addresses; the field is not omitted. If there is an address, there is always a default: the first address becomes the default automatically; after deleting the default, the most recently updated remaining address takes its place. A nonempty address book without a default cannot occur, so you do not need a branch for that state.
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-on-behalf-of |
string | Required |
Response
200OK
{
"data": [
{
"id": "sad_6b1f0c72-9a3e-4d15-8f27-c4e0b9a31d68",
"label": "家",
"country": "HK",
"recipient_last": "陈",
"recipient_first": "小明",
"phone_code": "852",
"phone_number": "51234567",
"province": "",
"city": "香港",
"district": "中西区",
"line1": "干诺道中 200 号",
"line2": "",
"postal_code": "000000",
"is_default": true,
"created_at": "2026-08-01T02:11:43.000Z",
"updated_at": "2026-08-01T02:11:43.000Z"
}
],
"next_cursor": null,
"has_more": false,
"max": 20,
"default_id": "sad_6b1f0c72-9a3e-4d15-8f27-c4e0b9a31d68"
}Request
curl -X GET 'https://api.zinfra.vip/v1/shipping-addresses' \
-H 'x-auth-token: Bearer $TOKEN' \
-H 'x-on-behalf-of: $MEMBER_ID'const res = await fetch("https://api.zinfra.vip/v1/shipping-addresses", {
method: "GET",
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.get(
"https://api.zinfra.vip/v1/shipping-addresses",
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("GET", "https://api.zinfra.vip/v1/shipping-addresses",
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"))
.header("x-auth-token", "Bearer $TOKEN")
.header("x-on-behalf-of", "$MEMBER_ID")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
// Use String / BigDecimal for amounts, not double.$ch = curl_init('https://api.zinfra.vip/v1/shipping-addresses');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
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
{
"data": [
{
"id": "sad_6b1f0c72-9a3e-4d15-8f27-c4e0b9a31d68",
"label": "家",
"country": "HK",
"recipient_last": "陈",
"recipient_first": "小明",
"phone_code": "852",
"phone_number": "51234567",
"province": "",
"city": "香港",
"district": "中西区",
"line1": "干诺道中 200 号",
"line2": "",
"postal_code": "000000",
"is_default": true,
"created_at": "2026-08-01T02:11:43.000Z",
"updated_at": "2026-08-01T02:11:43.000Z"
}
],
"next_cursor": null,
"has_more": false,
"max": 20,
"default_id": "sad_6b1f0c72-9a3e-4d15-8f27-c4e0b9a31d68"
}