userPreferences
Requires an authenticated session.
Returns the signed-in user's saved preferences, or null when they have never saved any. Available to customer apps too.
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 UserPreferences {
userPreferences {
id
createdAt
currencyId
dateFormat
languageId
numberFormat
language {
id
code
name
nativeName
createdAt
direction
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query UserPreferences {\n userPreferences {\n id\n createdAt\n currencyId\n dateFormat\n languageId\n numberFormat\n language {\n id\n code\n name\n nativeName\n createdAt\n direction\n }\n }\n}"
}
EOF
Response:
{
"data": {
"userPreferences": {
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"currencyId": "string",
"dateFormat": "string",
"languageId": "string",
"numberFormat": "string",
"language": {
"id": "id",
"code": "string",
"name": "string",
"nativeName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"direction": "LTR"
}
}
}
}
userPreferences: UserPreference
Type
UserPreference object
A user's preferences.