Create invoice

Create a draft invoice for a client or a completed job.

POST https://cotlet.dev/api/v1/jobber/clients/{client_id}/invoices

write

Creates an invoice in Draft status from a job or from line items. A draft is not sent and not due, so create_invoice reaches no one and runs without asking first. Check the total, then send it with send_invoice.

Parameters

Parameters: create_invoice
NameTypeDescription
client_id string required string Client ID from list_clients.
job_id string string Invoice this job. Without it, pass line_items.
line_items array array Items with name, quantity and unit_price.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/jobber/clients/client_8c41d2/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("jobber", "create_invoice", {"client_id":"client_8c41d2"})
Node.js
const result = await cotlet.call('jobber', 'create_invoice', {"client_id":"client_8c41d2"});
CLI
cotlet call jobber create_invoice --data '{"client_id":"client_8c41d2"}'

Example response

JSON

{
  "invoice_id": "inv_20431",
  "number": 1051,
  "status": "draft",
  "total": 480,
  "balance": 480,
  "currency": "USD"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.