Skip to main content

Get Customer

Get a single customer by external user ID (userId). The userId refers to the external user ID from the reseller system.

Query​

query GetHandbookCustomer($userId: String!) {
handbookCustomer(userId: $userId) {
userId
email
name
createdAt
customerHandbookLimit
}
}

Parameters​

ParameterTypeRequiredDescription
userIdString!YesExternal user ID from the reseller system

Response​

{
"data": {
"handbookCustomer": {
"userId": "external_user_123",
"email": "[email protected]",
"name": "John Doe",
"createdAt": "2025-01-01T00:00:00Z",
"customerHandbookLimit": 10
}
}
}

Example Usage​

Get Customer​

query {
handbookCustomer(userId: "external_user_123") {
userId
email
name
createdAt
customerHandbookLimit
}
}

Variables​

{
"userId": "external_user_123"
}

Response Fields​

Customer​

FieldTypeDescription
userIdString!External user ID from the reseller system
emailString!Email address of the customer
nameStringFull name of the customer
createdAtString!ISO 8601 timestamp of when the customer was created
customerHandbookLimitIntPer-user handbook generation limit for GraphQL API (null means use reseller's global default)

Error Responses​

Customer Not Found​

{
"data": {
"handbookCustomer": null
}
}

Invalid User ID​

{
"errors": [
{
"message": "Invalid userId format",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}

Access Denied​

If the customer doesn't belong to the authenticated reseller:

{
"errors": [
{
"message": "Customer not found or access denied",
"extensions": {
"code": "FORBIDDEN"
}
}
]
}

Notes​

  • Requires reseller API key authentication
  • The userId is the external identifier from your system, not the internal database ID
  • Only returns customers belonging to the authenticated reseller
  • If customerHandbookLimit is null, the customer uses the reseller's global default limit