customerAccountInfo
Requires a customer (portal or buyer app) session.
Returns the signed-in customer's company account: its name and code, credit limit, current balance and available credit. Available credit is empty when the credit limit is not enforced.
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 CustomerAccountInfo {
customerAccountInfo {
partnerCode
companyName
availableCredit
creditLimit
creditLimitEnabled
creditUnlimited
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerAccountInfo {\n customerAccountInfo {\n partnerCode\n companyName\n availableCredit\n creditLimit\n creditLimitEnabled\n creditUnlimited\n }\n}"
}
EOF
Response:
{
"data": {
"customerAccountInfo": {
"partnerCode": "string",
"companyName": "string",
"availableCredit": 0,
"creditLimit": 0,
"creditLimitEnabled": true,
"creditUnlimited": true
}
}
}
customerAccountInfo: CustomerAccountInfo!
Type
CustomerAccountInfo object
The customer's account figures.