customerAddresses
Requires a customer (portal or buyer app) session.
The addresses this login may use. An owner-assigned buyer sees ONLY the addresses assigned to them; assigned nothing = the whole account address book (unrestricted), never none.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerAddresses {
customerAddresses {
id
postalCode
type
city
contactPhone
country
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerAddresses {\n customerAddresses {\n id\n postalCode\n type\n city\n contactPhone\n country\n }\n}"
}
EOF
Response:
{
"data": {
"customerAddresses": [
{
"id": "id",
"postalCode": "string",
"type": "BILLING",
"city": "string",
"contactPhone": "string",
"country": "string"
}
]
}
}
customerAddresses: [CustomerAddress!]!
Type
CustomerAddress object
An address of the customer.