Skip to main content

Loans

Loans to employees and the installments that come out of payroll. An installment is claimed when its month is processed and settled when that run is locked, so outstanding_balance moves with the payroll calendar rather than with the calendar.

Plan feature

These endpoints need a plan that includes Payroll (payroll). On a plan without it, requests return 402 with code: plan_upgrade_required and feature naming what an upgrade would add.

List loan types​

GET/v1/loan_types

Query parameters​

NameTypeRequiredDescription
limitintegerNoPage size. Values above 100 are clamped.
starting_afterstringNoOpaque cursor from a previous response’s next_cursor.
updated_sincetimestampNoReturn records changed at or after this instant. Tracks the record itself, not its child collections.
is_activebooleanNoFilter by whether the record is in use.

Responses​

StatusMeaning
200A page of loan types.
401The API key is missing, malformed, revoked or expired.
402The workspace's plan does not include Payroll (plan_upgrade_required).
403The key does not carry the required scopes.
429Rate limit exceeded. See the RateLimit-* headers.

Retrieve a loan type​

GET/v1/loan_types/{id}

Path parameters​

NameTypeRequiredDescription
idstringYesThe identifier returned as id on the object.

Responses​

StatusMeaning
200The loan type.
401The API key is missing, malformed, revoked or expired.
402The workspace's plan does not include Payroll (plan_upgrade_required).
403The key does not carry the required scopes.
404No such loan type in this workspace.
429Rate limit exceeded. See the RateLimit-* headers.

List loans​

GET/v1/loans

Query parameters​

NameTypeRequiredDescription
limitintegerNoPage size. Values above 100 are clamped.
starting_afterstringNoOpaque cursor from a previous response’s next_cursor.
updated_sincetimestampNoReturn records changed at or after this instant. Tracks the record itself, not its child collections.
employee_idstringNoOnly records for this employee.
loan_type_idstringNoOnly loans of this kind.
statusstringNoOnly loans in this state.

Responses​

StatusMeaning
200A page of loans.
401The API key is missing, malformed, revoked or expired.
402The workspace's plan does not include Payroll (plan_upgrade_required).
403The key does not carry the required scopes.
429Rate limit exceeded. See the RateLimit-* headers.

Retrieve a loan​

GET/v1/loans/{id}

Path parameters​

NameTypeRequiredDescription
idstringYesThe identifier returned as id on the object.

Responses​

StatusMeaning
200The loan.
401The API key is missing, malformed, revoked or expired.
402The workspace's plan does not include Payroll (plan_upgrade_required).
403The key does not carry the required scopes.
404No such loan in this workspace.
429Rate limit exceeded. See the RateLimit-* headers.

List loan installments​

GET/v1/loan_installments

Query parameters​

NameTypeRequiredDescription
limitintegerNoPage size. Values above 100 are clamped.
starting_afterstringNoOpaque cursor from a previous response’s next_cursor.
updated_sincetimestampNoReturn records changed at or after this instant. Tracks the record itself, not its child collections.
loan_idstringNoOnly installments of this loan.
statusstringNoOnly installments in this state.
due_monthintegerNoCalendar month due, 1–12.
due_yearintegerNoCalendar year due.

Responses​

StatusMeaning
200A page of loan installments.
401The API key is missing, malformed, revoked or expired.
402The workspace's plan does not include Payroll (plan_upgrade_required).
403The key does not carry the required scopes.
429Rate limit exceeded. See the RateLimit-* headers.

Retrieve a loan installment​

GET/v1/loan_installments/{id}

Path parameters​

NameTypeRequiredDescription
idstringYesThe identifier returned as id on the object.

Responses​

StatusMeaning
200The loan installment.
401The API key is missing, malformed, revoked or expired.
402The workspace's plan does not include Payroll (plan_upgrade_required).
403The key does not carry the required scopes.
404No such loan installment in this workspace.
429Rate limit exceeded. See the RateLimit-* headers.