API Documentation
Invoices ¶
Invoices ¶
For more details on how to work with custom fields please refer to Working with custom fields guide.
The invoice object represents the main building block of the invoicing module.
You can find out more about invoicing in our Help documentation: Creating and Managing Invoices
Following diagram shows invoices in our data hierarchy:
Tax changes
On September 3, 2024, we’ve released new Tax rates system. That means that tax1_name, tax1_value, tax2_name and tax2_value attributes on Invoice object are no longer in use. You should, however, use tax_rate_id attribute on Line item objects to achieve the same goal. You can read more about this in LineItems endpoint documentation.
Related resources
Supported filter params
-
amount
-
amount_credited
-
amount_credited_with_tax
-
amount_paid
-
amount_tax
-
amount_unpaid
-
amount_with_tax
-
amount_written_off
-
company_id (array)
-
created_at
-
creator_id (array)
-
credited
-
currency
-
deal_id (array)
-
delivery_on
-
export_status (1: exported, 2: unexported)
-
full_query
-
fuzzy_dates
-
fuzzy_people
-
id
-
invoice_aging (0: other, 1: overdue < 15 days, 2: overdue 15 - 45 days, 3: overdue 45+ days, 4: not overdue)
-
invoice_state (1: draft, 2: finalized)
-
invoice_status (0: unsent, 1: paid, 2: overdue, 3: not_overdue, 4: draft)
-
invoice_type (1: invoice, 2: credit note)
-
invoiced_on
-
invoicing_method (1: actuals, 2: uninvoiced amount, 3: percentage)
-
issuer_id (array)
-
jump_query
-
last_activity_at
-
number
-
overdue_status
-
paid_on
-
parent_invoice_id (array)
-
pay_on
-
payment_status (1: paid, 2: unpaid, 3: partially paid)
-
project_id (array)
-
purchase_order_number
-
query
-
responsible_id (array)
-
sent_on
-
sent_status (1: sent, 2: unsent)
-
status (0: unsent, 1: paid, 2: overdue, 3: not_overdue, 4: draft)
-
subscriber_id (array)
-
subsidiary_id (array)
-
tags
Supported sort params
-
amount
-
amount_credited
-
amount_credited_with_tax
-
amount_paid
-
amount_tax
-
amount_with_tax
-
amount_written_off
-
company_name
-
created_at
-
credited
-
custom_fields
-
deleted_at
-
delivery_on
-
discount
-
invoiced_on
-
last_activity_at
-
number
-
pay_on
-
purchase_order_number
-
sent_on
Filter operations are supported on this endpoint.
Invoicing flow
Manual workflow
Step 1: Create Draft Invoice
-
Endpoint:
POST /api/v2/invoices -
Creates invoice in draft state with generated ID
Step 2: Add Line Items
-
Endpoint:
POST /api/v2/line_items -
Each line item is validated and created individually
Step 3: Create Invoice Attributions
-
Endpoint:
POST /api/v2/invoice_attributions -
Links invoice to specific budgets with amount allocation
-
Validates budget and invoice have same currency
-
Updates associated time entries and expenses to link them to the attribution
Workflow using line item generator
Step 1: Create Draft Invoice
- Same as manual workflow
Step 2: Preview Line Items (Optional)
-
Endpoint:
GET /api/v2/invoices/:id/preview -
Test different invoicing methods and parameters
-
Returns computed line items and invoice attributions without persisting
-
Use same parameters as generation step
Step 3: Generate Line Items and Attributions
-
Endpoint:
POST /api/v2/line_items/generate -
Creates all line items and invoice attributions in a single operation
-
Automatically handles grouping, calculations, and positioning
GET /api/v2/invoices
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": [
{
"id": "25",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "a074ad4f3d9082b5b71d1fb0c001114d",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:06.028+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:06.028+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:06.028+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "658"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/invoices?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/invoices?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}Get invoicesGET/api/v2/invoices
GET /api/v2/invoices/27
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "27",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "b7056f559dce3b0ef2d4c1e899154c23",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:06.403+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:06.403+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:06.403+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "660"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/invoices
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"invoiced_on": "2025-11-15",
"pay_on": "2025-11-25",
"currency": "EUR",
"bank_account_id": 1,
"bank_account_details": {
"bank_name": "Test Bank",
"number": "HR123456789"
}
},
"relationships": {
"company": {
"data": {
"type": "companies",
"id": "1809"
}
},
"subsidiary": {
"data": {
"type": "subsidiaries",
"id": "774"
}
},
"document_type": {
"data": {
"type": "document_types",
"id": "696"
}
},
"issuer_id": {
"data": {
"type": "people",
"id": "2543"
}
}
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "29",
"type": "invoices",
"attributes": {
"number": null,
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": null,
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "690738ce56464852cb4b9e1d88c18fc2",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:06.723+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:06.723+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": true,
"last_activity_at": "2025-11-15T05:06:06.723+01:00",
"creation_options": null,
"payment_terms": 10,
"bank_account_details": {
"bank_name": "Test Bank",
"number": "HR123456789"
},
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "661"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/invoices
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"invoiced_on": ""
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/currency"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/invoiced_on"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/company"
}
}
]
}Create an invoicePOST/api/v2/invoices
- invoiced_on
date(required) Example: 2018-01-01invoiced on
- currency
string(required) Example: EURcurrency
- company_id
number(required) Example: 1company id
- subsidiary_id
number(optional) Example: 1subsidiary id, required if subsidiary feature enabled
- invoice_type_id
number(optional) Example: 2invoice type id, required if credit note
- document_type_id
number(required) Example: 1document type id
- issuer_id
number(optional) Example: 100ID of invoice issuer; if nothing is sent, creator will be set as issuer
PATCH /api/v2/invoices/34
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"number": "02/2017"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "34",
"type": "invoices",
"attributes": {
"number": "02/2017",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "b0339ac5e383336d9160df7346df4940",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:07.955+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:07.978+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": true,
"last_activity_at": "2025-11-15T05:06:07.956+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "665"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/invoices/36
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"invoiced_on": ""
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/invoiced_on"
}
}
]
}DELETE /api/v2/invoices/37
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonPATCH /api/v2/invoices/40/export
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "tax_rates_not_mapped",
"title": "Invalid Attribute",
"detail": "Tax rates not mapped",
"source": {
"pointer": "data/attributes/tax_rate"
}
}
]
}PATCH /api/v2/invoices/41/export
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"id": "1",
"type": "invoices",
"attributes": {
"company_reference_id": "115"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "41",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "275d09fcfae022f12c76742f0c664045",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:10.272+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:10.272+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:10.272+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "672"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/invoices/42/export
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"id": "1",
"type": "invoices",
"attributes": {
"company_reference_id": null
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "42",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "2a535e388fc2283545bc300e73e9c4ad",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:10.419+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:10.419+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:10.419+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "673"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/invoices/43/export
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"id": "1",
"type": "invoices"
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "43",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "caf2400b0b75f8c3cfe122f9d17dc4b4",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:10.561+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:10.561+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:10.561+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "674"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Exports an invoicePATCH/api/v2/invoices/{id}/export
- id
number(required) Example: 1invoice id
PATCH /api/v2/invoices/45/export_update
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "feature unavailable",
"source": {
"pointer": "data/attributes/export_to_accounting"
}
}
]
}Updates an exported invoicePATCH/api/v2/invoices/{id}/export_update
- id
number(required) Example: 1invoice id
PATCH /api/v2/invoices/47/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"to": [
"test@email.com"
],
"cc": [
"test@productive.io",
"test-2@productive.io"
],
"bcc": [
"mail@something.com"
],
"subject": "Mail title",
"body": "Lorem ipsum dolor si amet",
"e_invoice_url": "https://einvoice-files-test.productive.io/test.xml"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "47",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": "2025-11-15",
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "6b68a24bb73decdaac914395919e41f2",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:11.378+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:11.446+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:11.378+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "678"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/invoices/53/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"to": [
"invalid mail"
]
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "invalid mail is not an email",
"source": {
"pointer": "data/attributes/to"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/subject"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/body"
}
}
]
}PATCH /api/v2/invoices/54/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"to": [
"random_email@mail.com"
],
"cc": [
"random_email_cc@mail.com"
],
"bcc": [
"random_email_bcc@mail.com"
],
"subject": "Test Email",
"body": "This is a test email"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "403",
"code": "restricted_email_in_trialing",
"title": "Access Denied",
"detail": "When in trial you can send emails only to yourself",
"source": {}
}
]
}PATCH /api/v2/invoices/55/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"to": [
"test@email.com"
],
"cc": [
"test@productive.io",
"test-2@productive.io"
],
"bcc": [
"mail@something.com"
],
"subject": "Mail title",
"body": "Lorem ipsum dolor si amet"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "55",
"type": "invoices",
"attributes": {
"number": "2016/01",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": "2025-11-15",
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": null,
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "b89f869fdc293e31e7f82809508fce32",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:14.465+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:14.532+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:14.465+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "686"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Sends an invoicePATCH/api/v2/invoices/{id}/send
- id
number(required) Example: 1invoice id
PATCH /api/v2/invoices/67/finalize
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {
"number": "05/2021"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "67",
"type": "invoices",
"attributes": {
"number": "05/2021",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": "2025-11-15T05:06:17.757+01:00",
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "76073492848c7a552c533e9e90efcc72",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:17.737+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:17.763+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:17.737+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "696"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/invoices/69/finalize
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "invoices",
"attributes": {}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "69",
"type": "invoices",
"attributes": {
"number": "0-CLIE1276-1",
"subject": null,
"invoiced_on": "2025-11-15",
"sent_on": null,
"pay_on": "2025-11-25",
"delivery_on": null,
"paid_on": null,
"finalized_on": "2025-11-15",
"finalized_at": "2025-11-15T05:06:18.833+01:00",
"discount": null,
"tax1_name": null,
"tax1_value": null,
"tax2_name": null,
"tax2_value": null,
"deleted_at": null,
"tag_list": [],
"note": null,
"footer": null,
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_invoice_url": null,
"company_reference_id": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "e8b05eab15bc3680352fc19d52f628b8",
"purchase_order_number": null,
"created_at": "2025-11-15T05:06:18.810+01:00",
"exchange_rate": "1.25",
"exchange_date": "2025-11-15",
"custom_fields": null,
"updated_at": "2025-11-15T05:06:18.842+01:00",
"sample_data": false,
"pay_on_relative": false,
"invoice_type_id": 1,
"credited": false,
"line_item_tax": false,
"last_activity_at": "2025-11-15T05:06:18.810+01:00",
"creation_options": {},
"payment_terms": 10,
"bank_account_details": null,
"invoice_template_id": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"amount": 0,
"amount_default": 0,
"amount_normalized": 0,
"amount_tax": 0,
"amount_tax_default": 0,
"amount_tax_normalized": 0,
"amount_with_tax": 0,
"amount_with_tax_default": 0,
"amount_with_tax_normalized": 0,
"amount_paid": 0,
"amount_paid_default": 0,
"amount_paid_normalized": 0,
"amount_written_off": 0,
"amount_written_off_default": 0,
"amount_written_off_normalized": 0,
"amount_unpaid": 0,
"amount_unpaid_default": 0,
"amount_unpaid_normalized": 0,
"amount_credited": 0,
"amount_credited_default": 0,
"amount_credited_normalized": 0,
"amount_credited_with_tax": 0,
"amount_credited_with_tax_default": 0,
"amount_credited_with_tax_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "698"
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
},
"company": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"subsidiary": {
"meta": {
"included": false
}
},
"parent_invoice": {
"meta": {
"included": false
}
},
"issuer": {
"meta": {
"included": false
}
},
"bank_account": {
"meta": {
"included": false
}
},
"invoice_attributions": {
"meta": {
"included": false
}
},
"custom_field_people": {
"meta": {
"included": false
}
},
"custom_field_attachments": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Finalizes an invoicePATCH/api/v2/invoices/{id}/finalize
- id
number(required) Example: 1invoice id
GET /api/v2/invoices/72/preview?budget_ids[]=685&display_format={budget}&invoicing_by=budget&invoicing_method=percentage&percentage=50
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/json; charset=utf-8Body
{
"data": [
{
"budget_id": "685",
"service_id": null,
"service_type_id": "367",
"service_type_name": "test name",
"description": "test name",
"type": "regular",
"currency": "EUR",
"discount": null,
"amount": 50000,
"amount_rounded": 50000,
"object_type": "line_item",
"invoice_id": "72",
"unit_id": "2",
"unit_name": "Piece",
"quantity": 0.5,
"unit_price": 100000,
"position": 1
},
{
"object_type": "invoice_attribution",
"invoice_id": "72",
"budget_id": "685",
"amount": 50000,
"date_from": null,
"date_to": null
}
]
}GET /api/v2/invoices/74/preview?budget_ids[]=686&display_format={budget}&invoicing_by=budget&invoicing_method=percentage
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/percentage"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is not a number",
"source": {
"pointer": "data/attributes/percentage"
}
}
]
}Preview invoiceGET/api/v2/invoices/{id}/preview
The preview endpoint lets you simulate invoice line item generation without persisting any changes. It returns the exact line items and invoice attributions that would be created for a given invoice based on the selected invoicing method and options.
-
Builds line items using the same logic as the line items “generate” method
-
Returns data only, does not modify the invoice
- id
number(required) Example: 1invoice id
- budget_ids
array(required) Example: %5B1%2C+3%5Darray of budget ids
- invoicing_method
string(required) Example: percentagepossible values: uninvoiced_time_and_expenses, uninvoiced_amount, percentage
- invoicing_by
string(optional) Example: servicepossible values: service/budget; required for invoicing method uninvoiced_amount or percentage
- percentage
number(optional) Example: 50percentage of budget revenue; required for invoicing method percentage
- display_format
string(required) Example: %7Bservice%7Ddisplay format
- expense_display_format
string(optional) Example: %7Bexpense%7Ddisplay format for expenses
- locale
string(optional) Example: en_USlocale; required for invoicing method uninvoiced_time_and_expenses
- date_from
date(optional) Example: 2024-04-01date from
- date_to
date(optional) Example: 2024-05-01date to
Generated by aglio on 15 Nov 2025