KlockworkKlockworkAPI
Agency

Invoices

Agency invoice request and response fields.

Base URL https://api.klockwork.org. Send X-Klockwork-Key or Authorization: Bearer kw_…. An agency key acts as the agency that created it. JSON bodies use these fields. A missing required field returns 400 with { "error": "Validation failed", "details": {} }.

Create an invoice with either talentId or clientId, not both and not neither.

List invoices

GET /api/public/agency/invoices

Response 200: { invoices: Invoice[] }

FieldTypeRequired
idstring (uuid)yes
kind"studio_talent" or "agency_client"yes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
clientIdstring (uuid) or nullyes
clientDisplayNamestring or nullyes
fromAtstringyes
toAtstringyes
currencystringyes
status"draft" or "paid" or "void"yes
invoicePrefixstringyes
invoiceNumberintegeryes
displayNumberstringyes
subtotalCentsinteger, min 0yes
totalCentsinteger, min 0yes
notesstring or nullyes
createdAtstringyes
lineItemsarray of objectno

lineItems items:

FieldTypeRequired
idstring (uuid)yes
sourceKind"timer" or "manual"yes
sourceIdstring (uuid) or nullyes
descriptionstringyes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
quantityHoursnumber, min 0yes
unitRateCentsinteger, min 0yes
amountCentsinteger, min 0yes
sortOrderinteger, min 0yes

Create an invoice

POST /api/public/agency/invoices

Request body:

FieldTypeRequired
talentIdstring (uuid) or nullno
clientIdstring (uuid) or nullno
fromstring, min 1yes
tostring, min 1yes
notesstring, max 4000 or nullno

Response 201: { invoice: Invoice }

FieldTypeRequired
idstring (uuid)yes
kind"studio_talent" or "agency_client"yes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
clientIdstring (uuid) or nullyes
clientDisplayNamestring or nullyes
fromAtstringyes
toAtstringyes
currencystringyes
status"draft" or "paid" or "void"yes
invoicePrefixstringyes
invoiceNumberintegeryes
displayNumberstringyes
subtotalCentsinteger, min 0yes
totalCentsinteger, min 0yes
notesstring or nullyes
createdAtstringyes
lineItemsarray of objectno

lineItems items:

FieldTypeRequired
idstring (uuid)yes
sourceKind"timer" or "manual"yes
sourceIdstring (uuid) or nullyes
descriptionstringyes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
quantityHoursnumber, min 0yes
unitRateCentsinteger, min 0yes
amountCentsinteger, min 0yes
sortOrderinteger, min 0yes

Get an invoice

GET /api/public/agency/invoices/{id}

Response 200: { invoice: Invoice }

FieldTypeRequired
idstring (uuid)yes
kind"studio_talent" or "agency_client"yes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
clientIdstring (uuid) or nullyes
clientDisplayNamestring or nullyes
fromAtstringyes
toAtstringyes
currencystringyes
status"draft" or "paid" or "void"yes
invoicePrefixstringyes
invoiceNumberintegeryes
displayNumberstringyes
subtotalCentsinteger, min 0yes
totalCentsinteger, min 0yes
notesstring or nullyes
createdAtstringyes
lineItemsarray of objectno

lineItems items:

FieldTypeRequired
idstring (uuid)yes
sourceKind"timer" or "manual"yes
sourceIdstring (uuid) or nullyes
descriptionstringyes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
quantityHoursnumber, min 0yes
unitRateCentsinteger, min 0yes
amountCentsinteger, min 0yes
sortOrderinteger, min 0yes

Void an invoice

POST /api/public/agency/invoices/{id}/void

No request body.

Response 200: { invoice: Invoice }

FieldTypeRequired
idstring (uuid)yes
kind"studio_talent" or "agency_client"yes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
clientIdstring (uuid) or nullyes
clientDisplayNamestring or nullyes
fromAtstringyes
toAtstringyes
currencystringyes
status"draft" or "paid" or "void"yes
invoicePrefixstringyes
invoiceNumberintegeryes
displayNumberstringyes
subtotalCentsinteger, min 0yes
totalCentsinteger, min 0yes
notesstring or nullyes
createdAtstringyes
lineItemsarray of objectno

lineItems items:

FieldTypeRequired
idstring (uuid)yes
sourceKind"timer" or "manual"yes
sourceIdstring (uuid) or nullyes
descriptionstringyes
talentIdstring (uuid) or nullyes
talentDisplayNamestring or nullyes
quantityHoursnumber, min 0yes
unitRateCentsinteger, min 0yes
amountCentsinteger, min 0yes
sortOrderinteger, min 0yes

On this page