Skip to main content

Update Handbook Limit

Update the global handbook generation limit for all users under this reseller. If updateAllUserCustomLimits is true, also updates all existing user-specific limits to match the new global limit.

Note: To update the handbook limit for a single customer, use updateCustomer instead.

Mutation

mutation UpdateDefaultCustomerHandbookLimit(
$limit: Int!
$updateAllUserCustomLimits: Boolean
) {
updateDefaultCustomerHandbookLimit(
limit: $limit
updateAllUserCustomLimits: $updateAllUserCustomLimits
) {
limit
usersUpdated
}
}

Parameters

ParameterTypeRequiredDescription
limitInt!YesNew global handbook limit for all users under this reseller
updateAllUserCustomLimitsBooleanNoIf true, updates all existing user-specific limits (customer_handbook_limit) to match the new global limit

Response

{
"data": {
"updateDefaultCustomerHandbookLimit": {
"limit": 50,
"usersUpdated": 15
}
}
}

Examples

Update Global Limit Only

This updates the global limit but leaves existing user-specific limits unchanged:

mutation {
updateDefaultCustomerHandbookLimit(limit: 50) {
limit
usersUpdated
}
}

Response:

{
"data": {
"updateDefaultCustomerHandbookLimit": {
"limit": 50,
"usersUpdated": null
}
}
}

Update Global Limit and All User Limits

This updates both the global limit and all existing user-specific limits:

mutation {
updateDefaultCustomerHandbookLimit(
limit: 100
updateAllUserCustomLimits: true
) {
limit
usersUpdated
}
}

Response:

{
"data": {
"updateDefaultCustomerHandbookLimit": {
"limit": 100,
"usersUpdated": 25
}
}
}

With Variables

mutation UpdateLimit($limit: Int!, $updateAll: Boolean) {
updateDefaultCustomerHandbookLimit(
limit: $limit
updateAllUserCustomLimits: $updateAll
) {
limit
usersUpdated
}
}

Variables:

{
"limit": 75,
"updateAll": true
}

Response Fields

FieldTypeDescription
limitInt!The updated global handbook limit
usersUpdatedIntNumber of users that had their custom limits updated (if updateAllUserCustomLimits was true)

How Limits Work

  1. Global Limit: The default limit for all users under the reseller
  2. User-Specific Limit: Can be set per customer using handbookLimit in createHandbookCustomer or updateHandbookCustomer
  3. Effective Limit: Users with a custom limit use that; others use the global limit

Example Scenario

Global Limit: 50
- User A: No custom limit → Uses 50
- User B: Custom limit 100 → Uses 100
- User C: Custom limit 25 → Uses 25

After updating global limit to 75 with updateAllUserCustomLimits: true:

Global Limit: 75
- User A: No custom limit → Uses 75
- User B: Custom limit 75 → Uses 75 (updated from 100)
- User C: Custom limit 75 → Uses 75 (updated from 25)

After updating global limit to 100 with updateAllUserCustomLimits: false:

Global Limit: 100
- User A: No custom limit → Uses 100
- User B: Custom limit 75 → Uses 75 (unchanged)
- User C: Custom limit 75 → Uses 75 (unchanged)

Error Responses

Invalid Limit

{
"errors": [
{
"message": "Limit must be a positive number",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}

Notes

  • Requires reseller API key authentication
  • The limit applies to handbook generation via the GraphQL API
  • Setting updateAllUserCustomLimits: true will override all existing user-specific limits
  • New customers created after this update will use the new global limit (unless a custom limit is specified)
  • Limits are enforced per customer, not per reseller
  • The limit must be a positive integer (0 or greater)
  • To update the limit for a single customer, use updateCustomer with the handbookLimit field instead of this mutation