BlueSuite API
REST API v1

Invoices

Manage invoices via the REST API

The Invoices API lets you create, read, update, and delete invoices in your workspace.

List Invoices

Returns a paginated list of invoices.

GET /api/v1/invoices

Required Scope: invoices:read

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerResults per page, 1-100 (default: 25)
searchstringSearch invoices by keyword
sort_bystringField to sort by
sort_directionstringasc or desc (default: desc)
contact_idintegerFilter by contact ID
job_idintegerFilter by job ID
exclude_childrenbooleanExclude child invoices when true
exclude_statusesstringComma-separated list of statuses to exclude (e.g. draft,cancelled)
curl https://app.bluesuite.com/api/v1/invoices?page=1&per_page=10&contact_id=42 \
  -H "Authorization: Bearer wk_abc123.your_api_key"
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "INV-001",
      "contact_id": 42,
      "status": "sent",
      "total": 1500.00,
      "date": "2025-03-01",
      "due_date": "2025-03-31"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total_pages": 3
  }
}

Create Invoice

Creates a new invoice.

POST /api/v1/invoices

Required Scope: invoices:write

Request Body:

FieldTypeRequiredDescription
namestringNoInvoice name or number
contact_idintegerNoAssociated contact ID
property_idintegerNoAssociated property ID
job_idintegerNoAssociated job ID
quote_idintegerNoAssociated quote ID
salesperson_idstring (UUID)NoAssigned salesperson user ID
datestringNoInvoice date (YYYY-MM-DD)
due_datestringNoPayment due date (YYYY-MM-DD)
send_onstringNoScheduled send date (YYYY-MM-DD)
messagestringNoMessage to the customer
payment_instructionsstringNoPayment instructions text
payment_termsstringNoOne of: due_on_receipt, net_7, net_14, net_30, net_60, net_90 (default: due_on_receipt)
line_itemsarrayNoArray of line item objects (see Line Items)
discountnumberNoDiscount amount (default: 0)
discount_unitstringNo% or $ (default: %)
depositnumberNoDeposit amount (default: 0)
deposit_unitstringNo% or $ (default: %)
tax_ratenumberNoTax rate percentage (default: 0)
tax_rate_idintegerNoTax rate record ID
totalnumberNoInvoice total (default: 0)
statusstringNoOne of: draft, sent, paid, overdue, cancelled, partially_paid, scheduled (default: draft)
typestringNoone-off or recurring (default: one-off)
custom_fieldsobjectNoCustom field values
event_idsarray of integersNoEvent IDs to associate with this invoice
curl -X POST https://app.bluesuite.com/api/v1/invoices \
  -H "Authorization: Bearer wk_abc123.your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "INV-042",
    "contact_id": 42,
    "job_id": 10,
    "date": "2025-03-01",
    "due_date": "2025-03-31",
    "payment_terms": "net_30",
    "line_items": [
      { "name": "Window cleaning", "quantity": 1, "unitPrice": 150 }
    ],
    "total": 150,
    "status": "draft"
  }'
{
  "success": true,
  "data": {
    "id": 101,
    "name": "INV-042",
    "contact_id": 42,
    "job_id": 10,
    "status": "draft",
    "total": 150,
    "date": "2025-03-01",
    "due_date": "2025-03-31",
    "payment_terms": "net_30",
    "created_at": "2025-03-01T12:00:00.000Z"
  }
}

Get Invoice

Returns a single invoice with expanded details (contact, job, line items, etc.).

GET /api/v1/invoices/:id

Required Scope: invoices:read

curl https://app.bluesuite.com/api/v1/invoices/101 \
  -H "Authorization: Bearer wk_abc123.your_api_key"
{
  "success": true,
  "data": {
    "id": 101,
    "name": "INV-042",
    "contact_id": 42,
    "job_id": 10,
    "status": "draft",
    "total": 150,
    "date": "2025-03-01",
    "due_date": "2025-03-31",
    "payment_terms": "net_30",
    "line_items": [
      { "name": "Window cleaning", "quantity": 1, "unitPrice": 150 }
    ],
    "contact": {
      "id": 42,
      "first_name": "John",
      "last_name": "Smith"
    }
  }
}

Update Invoice

Updates an existing invoice. Only include the fields you want to change.

PUT /api/v1/invoices/:id

Required Scope: invoices:write

Request Body: Same fields as Create Invoice. All fields are optional.

curl -X PUT https://app.bluesuite.com/api/v1/invoices/101 \
  -H "Authorization: Bearer wk_abc123.your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "sent",
    "total": 175
  }'
{
  "success": true,
  "data": {
    "id": 101,
    "name": "INV-042",
    "status": "sent",
    "total": 175
  }
}

Delete Invoice

Deletes an invoice.

DELETE /api/v1/invoices/:id

Required Scope: invoices:write

curl -X DELETE https://app.bluesuite.com/api/v1/invoices/101 \
  -H "Authorization: Bearer wk_abc123.your_api_key"
{
  "success": true,
  "data": {
    "deleted": true
  }
}

Update Invoice Status

Updates only the status of an invoice.

PUT /api/v1/invoices/:id/status

Required Scope: invoices:write

Request Body:

FieldTypeRequiredDescription
statusstringYesOne of: draft, sent, paid, overdue, cancelled, partially_paid, scheduled
curl -X PUT https://app.bluesuite.com/api/v1/invoices/101/status \
  -H "Authorization: Bearer wk_abc123.your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paid" }'
{
  "success": true,
  "data": {
    "id": 101,
    "status": "paid"
  }
}

Line Items

Line items represent individual services or products on an invoice. When creating or updating an invoice, provide line items in this format:

FieldTypeRequiredDescription
namestringYesItem name
descriptionstringNoAdditional description
quantitynumberNoQuantity (default: 1)
unitPricenumberYesUnit price
taxablebooleanNoWhether the item is taxable
optionalbooleanNoWhether the item is optional

The API automatically assigns each line item a unique id and _type field. Response objects will include these generated fields.

{
  "line_items": [
    { "name": "Window cleaning", "quantity": 1, "unitPrice": 150 },
    { "name": "Gutter cleaning", "quantity": 1, "unitPrice": 75, "description": "Front and back" }
  ]
}

On this page