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
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String! | Yes | External 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
| Field | Type | Description |
|---|---|---|
userId | String! | External user ID from the reseller system |
email | String! | Email address of the customer |
name | String | Full name of the customer |
createdAt | String! | ISO 8601 timestamp of when the customer was created |
customerHandbookLimit | Int | Per-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
userIdis the external identifier from your system, not the internal database ID - Only returns customers belonging to the authenticated reseller
- If
customerHandbookLimitisnull, the customer uses the reseller's global default limit