Get Handbook
Get a single handbook by handbook ID. Returns the handbook with both content and input data. User can only access handbooks belonging to their account.
Query
query GetHandbook($handbookId: Int!) {
getHandbook(handbookId: $handbookId) {
handbookId
content
createdAt
updatedAt
data {
companyName
myState
numberOfEmployees
industry
handbookName
# ... all other handbook data fields
}
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
handbookId | Int! | Yes | The handbook ID to retrieve |
Response
{
"data": {
"getHandbook": {
"handbookId": 123,
"content": "<html><head><title>Employee Handbook</title></head><body>...</body></html>",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"data": {
"companyName": "Acme Corporation",
"myState": "CA",
"numberOfEmployees": "50",
"multiState": true,
"multiStateSelectedStates": [
{ "state": "CA" },
{ "state": "NY" },
{ "state": "TX" }
],
"industry": "PROFESSIONAL",
"handbookName": "Employee Handbook 2025",
"fullTimeHours": 40,
"payPeriodFrequency": "weekly",
"trialPeriod": true,
"trialPeriodDays": 90,
"paidHolidays": true,
"vacationBenefits": true,
"sickLeave": true,
"healthInsurance": true,
"directDeposit": true
// ... all other fields
}
}
}
}
Examples
Get Full Handbook
query {
getHandbook(handbookId: 123) {
handbookId
content
createdAt
updatedAt
data {
companyName
myState
numberOfEmployees
industry
handbookName
}
}
}
Get Handbook with Variables
query GetHandbook($handbookId: Int!) {
getHandbook(handbookId: $handbookId) {
handbookId
content
data {
companyName
myState
industry
}
}
}
Variables:
{
"handbookId": 123
}
Response Fields
Handbook
| Field | Type | Description |
|---|---|---|
handbookId | Int! | Unique identifier for the handbook |
content | String | The full generated handbook content (HTML) |
createdAt | String! | ISO 8601 timestamp when the handbook was created |
updatedAt | String | ISO 8601 timestamp when the handbook was last updated |
data | HandbookData! | Input data used to generate this handbook |
HandbookData
The data field contains all the input parameters that were used to generate the handbook. This includes:
- Core Information:
companyName,myState,numberOfEmployees,multiState,multiStateSelectedStates - Company Details:
industry,handbookName,hrManager,payrollManager - Employment Policies:
fullTimeHours,payPeriodFrequency,performanceReviewPeriod,trialPeriod,trialPeriodDays - Benefits:
paidHolidays,vacationBenefits,sickLeave,healthInsurance,directDeposit,workersComp - Policies:
companyVehiclesPolicy,socialMediaPolicy,progressiveDisciplinePolicy, etc. - Custom Content:
missionStatement,missionStatementText,appendixConditions
See Types & Schema for the complete list of fields.
Error Responses
Handbook Not Found
{
"data": {
"getHandbook": null
}
}
Access Denied
If you try to access a handbook that doesn't belong to your account:
{
"errors": [
{
"message": "Handbook not found or access denied",
"extensions": {
"code": "FORBIDDEN"
}
}
]
}
Invalid Handbook ID
{
"errors": [
{
"message": "Invalid handbookId",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}
Notes
- Requires bearer token authentication
- User can only access handbooks belonging to their account
- The
contentfield contains the full HTML content of the generated handbook - The
datafield contains the original input parameters used to generate the handbook - If
contentisnull, the handbook may not have been fully generated yet - For detailed information about response types and fields, see Types & Schema