Skip to main content

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

ParameterTypeRequiredDescription
handbookIdInt!YesThe 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

FieldTypeDescription
handbookIdInt!Unique identifier for the handbook
contentStringThe full generated handbook content (HTML)
createdAtString!ISO 8601 timestamp when the handbook was created
updatedAtStringISO 8601 timestamp when the handbook was last updated
dataHandbookData!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 content field contains the full HTML content of the generated handbook
  • The data field contains the original input parameters used to generate the handbook
  • If content is null, the handbook may not have been fully generated yet
  • For detailed information about response types and fields, see Types & Schema