Timeoffpolicies 6 endpoints

GET /v1/time_off_policies/{time_off_policy_uuid}

Get a time off policy

scope: time_off_policies:read

operationId: TimeOffPolicies_getPolicy

Parameters

Name In Required Type Description
time_off_policy_uuid path optional string

The UUID of the company time off policy

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Responses

200

Example response

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

GET /v1/time_off_policies/{time_off_policy_uuid}
PUT /v1/time_off_policies/{time_off_policy_uuid}

Update a time off policy

scope: time_off_policies:write

operationId: TimeOffPolicies_updatePolicy

Parameters

Name In Required Type Description
time_off_policy_uuid path optional string

The UUID of the company time off policy

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

Can update any attributes of the time off policy except policy_type, is_active, complete & employees

application/json
schema TimeOffPoliciesUpdatePolicyRequest
Property Type Required
name string optional
max_hours string optional
accrual_rate string optional
accrual_method string optional
accrual_rate_unit string optional
carryover_limit_hours string optional
paid_out_on_termination boolean optional
max_accrual_hours_per_year string optional
accrual_waiting_period_days integer optional

Responses

200

OK

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/time_off_policies/{time_off_policy_uuid}
PUT /v1/time_off_policies/{time_off_policy_uuid}/add_employees

Add employees to a time off policy. Employees are required to have at least one job to be added to a time off policy. Accepts starting balances for non-unlimited policies

scope: time_off_policies:write

operationId: TimeOffPolicies_addEmployeesToPolicy

Parameters

Name In Required Type Description
time_off_policy_uuid path optional string

The UUID of the company time off policy

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

A list of employee objects containing the employee uuid

application/json
schema TimeOffPoliciesAddEmployeesToPolicyRequest
Property Type Required
employees array optional
uuid string optional
balance string optional

Responses

200

OK

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/time_off_policies/{time_off_policy_uuid}/add_employees
PUT /v1/time_off_policies/{time_off_policy_uuid}/balance

Updates time off hours balances for employees for a time off policy

scope: time_off_policies:write

operationId: TimeOffPolicies_updateEmployeeBalance

Parameters

Name In Required Type Description
time_off_policy_uuid path optional string

The UUID of the company time off policy

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

A list of employee objects containing the employee uuid and time off hours balance

application/json
schema TimeOffPoliciesUpdateEmployeeBalanceRequest
Property Type Required
employees array optional
uuid string optional
balance string optional

Responses

200

OK

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/time_off_policies/{time_off_policy_uuid}/balance
PUT /v1/time_off_policies/{time_off_policy_uuid}/deactivate

Deactivate a time off policy

scope: time_off_policies:write

operationId: TimeOffPolicies_deactivatePolicy

Parameters

Name In Required Type Description
time_off_policy_uuid path optional string

The UUID of the company time off policy

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Responses

200

OK

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/time_off_policies/{time_off_policy_uuid}/deactivate
PUT /v1/time_off_policies/{time_off_policy_uuid}/remove_employees

Remove employees from a time off policy

scope: time_off_policies:write

operationId: TimeOffPolicies_removeEmployees

Parameters

Name In Required Type Description
time_off_policy_uuid path optional string

The UUID of the company time off policy

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

A list of employee objects containing the employee uuid

application/json
schema TimeOffPoliciesRemoveEmployeesRequest
Property Type Required
employees array optional
uuid string optional

Responses

200

OK

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/time_off_policies/{time_off_policy_uuid}/remove_employees

Webhooks 7 endpoints

GET /v1/webhook_subscriptions

Returns all webhook subscriptions associated with the provided Partner API token.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:read

operationId: Webhooks_listSubscriptions

Parameters

Name In Required Type Description
X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Responses

200

Example response

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

GET /v1/webhook_subscriptions
POST /v1/webhook_subscriptions

Create a webhook subscription to receive events of the specified subscription_types whenever there is a state change.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:write

operationId: Webhooks_createSubscription

Parameters

Name In Required Type Description
X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

application/json
schema WebhooksCreateSubscriptionRequest
Property Type Required
url string required
subscription_types array required

Responses

201

Example response

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

POST /v1/webhook_subscriptions
DELETE /v1/webhook_subscriptions/{webhook_subscription_uuid}

Deletes the Webhook Subscription associated with the provided UUID.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:write

operationId: Webhooks_deleteSubscriptionByUuid

Parameters

Name In Required Type Description
webhook_subscription_uuid path optional string

The webhook subscription UUID.

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Responses

204

The resource was deleted successfully.

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

DELETE /v1/webhook_subscriptions/{webhook_subscription_uuid}
GET /v1/webhook_subscriptions/{webhook_subscription_uuid}

Returns the Webhook Subscription associated with the provided UUID.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:read

operationId: Webhooks_getSubscription

Parameters

Name In Required Type Description
webhook_subscription_uuid path optional string

The webhook subscription UUID.

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Responses

200

Example response

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

GET /v1/webhook_subscriptions/{webhook_subscription_uuid}
PUT /v1/webhook_subscriptions/{webhook_subscription_uuid}

Updates the Webhook Subscription associated with the provided UUID.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:write

operationId: Webhooks_updateSubscription

Parameters

Name In Required Type Description
webhook_subscription_uuid path optional string

The webhook subscription UUID.

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

application/json
schema WebhooksUpdateSubscriptionRequest
Property Type Required
subscription_types array required

Responses

200

Example response

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/webhook_subscriptions/{webhook_subscription_uuid}
GET /v1/webhook_subscriptions/{webhook_subscription_uuid}/request_verification_token

Request that the webhook subscription verification_token be POSTed to the Subscription URL.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:read

operationId: Webhooks_requestVerificationToken

Parameters

Name In Required Type Description
webhook_subscription_uuid path optional string

The webhook subscription UUID.

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Responses

200

No Content. The verification_token is POSTed to the Subscription URL.

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

GET /v1/webhook_subscriptions/{webhook_subscription_uuid}/request_verification_token
PUT /v1/webhook_subscriptions/{webhook_subscription_uuid}/verify

When a webhook subscription is created, a verification_token is POSTed to the registered webhook subscription URL. This verify endpoint needs to be called with verification_token before webhook events can be sent to the registered webhook URL.

Use the /v1/webhook_subscriptions/{webhook_subscription_uuid}/request_verification_token API to resend the verification_token to the Subscriber.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:write

operationId: Webhooks_verifySubscriptionToken

Parameters

Name In Required Type Description
webhook_subscription_uuid path optional string

The webhook subscription UUID.

X-Gusto-API-Version header optional string

Determines the date-based API version associated with your API call. If none is provided, your application’s minimum API version is used.

Request Body

application/json
schema WebhooksVerifySubscriptionTokenRequest
Property Type Required
verification_token string required

Responses

200

Example response

404

Not Found

The requested resource does not exist. Make sure the provided ID/UUID is valid.

422

Unprocessable Entity

This may happen when the body of your request contains errors such as invalid_attribute_value, or the request fails due to an invalid_operation. See the Errors Categories guide for more details.

PUT /v1/webhook_subscriptions/{webhook_subscription_uuid}/verify