Skip to content
ClockLap Developers
API reference clocklap.com Get an API key

API reference

Invoices

20 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.

GET/v1/invoicesInvoices you can see (managers: their sites; staff: their own), newest first, with outstanding totals

Invoices you can see (managers: their sites; staff: their own), newest first, with outstanding totals

Query parameters

NameTypeDescription
statusstring
customer_idstring
location_idstring
project_idstring
fromstring
tostring
searchstring
mine"0" | "1" | "true" | "false"
limitinteger
cursorstring

Example

curl "https://ca-api.clocklap.com/v1/invoices" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/invoicesCreate a draft invoice (add_hours_for_date adds that day's unbilled hours as labour; customer quick-creates a client)

Create a draft invoice (add_hours_for_date adds that day's unbilled hours as labour; customer quick-creates a client)

Body (JSON)

NameTypeDescription
customer_idstring or null
customerobject
customer.namerequiredstring
customer.emailstring (email) or null
customer.phonestring or null
customer.addressstring or null
location_idstring or null
project_idstring or null
issue_datestring
due_datestring
currency"CAD" | "USD"
linesarray of object Default []
lines[].idstring
lines[].kindrequired"labour" | "material" | "flat" | "discount"
lines[].descriptionrequiredstring
lines[].qtyrequirednumber
lines[].unitstring or null
lines[].unit_price_centsrequiredinteger
lines[].tax_code"taxable" | "exempt" Default "taxable"
lines[].time_entry_idsarray of string
add_hours_for_datestring
notesstring or null
tax_profileobject
tax_profile.presetrequiredstring
tax_profile.ratesrequiredarray of object
client_refstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/invoices" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200

GET/v1/invoices/{id}Get one invoice

Get one invoice

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/invoices/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

PATCH/v1/invoices/{id}Edit a draft (lines, client, dates, taxes); notes, photos and signature can change until it is paid

Edit a draft (lines, client, dates, taxes); notes, photos and signature can change until it is paid

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
customer_idstring or null
location_idstring or null
project_idstring or null
issue_datestring
due_datestring
currency"CAD" | "USD"
linesarray of object
lines[].idstring
lines[].kindrequired"labour" | "material" | "flat" | "discount"
lines[].descriptionrequiredstring
lines[].qtyrequirednumber
lines[].unitstring or null
lines[].unit_price_centsrequiredinteger
lines[].tax_code"taxable" | "exempt" Default "taxable"
lines[].time_entry_idsarray of string
notesstring or null
tax_profileobject
tax_profile.presetrequiredstring
tax_profile.ratesrequiredarray of object
signature_svgstring or null
signed_namestring or null
media_idsarray of string
versioninteger

Example

curl -X PATCH "https://ca-api.clocklap.com/v1/invoices/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200

GET/v1/invoices/{id}/accountingWhere this invoice was sent: one row per accounting connection, with its number and link there

Where this invoice was sent: one row per accounting connection, with its number and link there

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/invoices/{id}/accounting" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/invoices/{id}/paymentsRecord a cash, cheque, e-transfer, card-terminal or other payment (negative = refund)

Record a cash, cheque, e-transfer, card-terminal or other payment (negative = refund)

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
amount_centsrequiredinteger
methodrequired"cash" | "cheque" | "etransfer" | "card_terminal" | "other"
paid_atstring (date-time)
referencestring or null
notestring or null
media_idstring or null
client_refstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/invoices/{id}/payments" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount_cents":2500,"method":"cash"}'

Responses

200

GET/v1/invoices/{id}/pdfThe invoice as a PDF

The invoice as a PDF

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/invoices/{id}/pdf" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/invoices/{id}/sendFinalize and email the invoice with its PDF and payment link (send_email: false = mark sent only)

Finalize and email the invoice with its PDF and payment link (send_email: false = mark sent only)

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
emailstring (email)
messagestring
send_emailboolean Default true

Example

curl -X POST "https://ca-api.clocklap.com/v1/invoices/{id}/send" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","message":"string","send_email":true}'

Responses

200

POST/v1/invoices/{id}/shareGet the share link (finalizes a draft); rotate: true replaces the old link

Get the share link (finalizes a draft); rotate: true replaces the old link

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
rotateboolean

Example

curl -X POST "https://ca-api.clocklap.com/v1/invoices/{id}/share" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rotate":true}'

Responses

200

DELETE/v1/invoices/{id}/shareTurn off the share link

Turn off the share link

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X DELETE "https://ca-api.clocklap.com/v1/invoices/{id}/share" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/invoices/{id}/syncThe invoice in the shape accounting connections push

The invoice in the shape accounting connections push

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/invoices/{id}/sync" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/invoices/{id}/voidVoid (cancel) an invoice. Its number stays used.

Void (cancel) an invoice. Its number stays used.

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
reasonstring or null

Example

curl -X POST "https://ca-api.clocklap.com/v1/invoices/{id}/void" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"string"}'

Responses

200

GET/v1/invoices/contextCan I invoice here? Effective settings, the client, and my unbilled hours for a day at a site/project

Can I invoice here? Effective settings, the client, and my unbilled hours for a day at a site/project

Query parameters

NameTypeDescription
location_idstring
project_idstring
datestring

Example

curl "https://ca-api.clocklap.com/v1/invoices/context" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/invoices/settingsWorkspace invoicing settings, sites and projects with their own, and the next number

Workspace invoicing settings, sites and projects with their own, and the next number

Example

curl "https://ca-api.clocklap.com/v1/invoices/settings" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

PATCH/v1/invoices/settingsChange workspace invoicing settings (numbering, taxes, terms, who can create)

Change workspace invoicing settings (numbering, taxes, terms, who can create)

Body (JSON)

NameTypeDescription
enabledboolean
who_can_create"staff" | "managers"
default_rate_centsinteger or null
currency"CAD" | "USD"
tax_profileobject
tax_profile.presetrequiredstring
tax_profile.ratesrequiredarray of object
terms_daysinteger
prefixstring
notesstring
require_photoboolean
require_signatureboolean

Example

curl -X PATCH "https://ca-api.clocklap.com/v1/invoices/settings" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200

PUT/v1/invoices/settings/locations/{id}Invoicing for one location (e.g. {enabled: true}); null = inherit again

Invoicing for one location (e.g. {enabled: true}); null = inherit again

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
enabledboolean
who_can_create"staff" | "managers"
default_rate_centsinteger or null
currency"CAD" | "USD"
tax_profileobject or null
tax_profile.presetrequiredstring
tax_profile.ratesrequiredarray of object
terms_daysinteger
prefixstring
notesstring
require_photoboolean
require_signatureboolean

Example

curl -X PUT "https://ca-api.clocklap.com/v1/invoices/settings/locations/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200

GET/v1/payments/settingsOnline payments: whether the workspace's Stripe is connected and can take card payments

Online payments: whether the workspace's Stripe is connected and can take card payments

Example

curl "https://ca-api.clocklap.com/v1/payments/settings" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

DELETE/v1/payments/stripeDisconnect Stripe. Invoices stay; "Pay now" disappears.

Disconnect Stripe. Invoices stay; "Pay now" disappears.

Example

curl -X DELETE "https://ca-api.clocklap.com/v1/payments/stripe" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/payments/stripe/connectStart connecting the workspace's own Stripe account; open the returned URL

Start connecting the workspace's own Stripe account; open the returned URL

Body (JSON)

NameTypeDescription
return_urlstring (uri)

Example

curl -X POST "https://ca-api.clocklap.com/v1/payments/stripe/connect" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_url":"https://example.com/clocklap-webhook"}'

Responses

200

POST/v1/payments/stripe/refreshRe-check the connected Stripe account (after finishing Stripe's steps)

Re-check the connected Stripe account (after finishing Stripe's steps)

Example

curl -X POST "https://ca-api.clocklap.com/v1/payments/stripe/refresh" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200