> For the complete documentation index, see [llms.txt](https://knowledge.out-smart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledge.out-smart.com/openapi/invoices.md).

# Invoices

## Get invoice

> This api is used to fetch generated invoices from WorkorderApp.\
> The result can be filtered by using the advanced filter. As described in the introduction section.\
> \
> \| Parameter                 | Description                                                                                           |\
> \|---------------------------|-------------------------------------------------------------------------------------------------------|\
> \| inv\_id                    | Unique invoice ID  number of the invoice                                                              |\
> \| inv\_worksheet\_id          | Worksheet ID that is used to generate this invoice                                                    |\
> \| inv\_quo\_id                | Quotation ID that is used to generate this invoice                                                    |\
> \| inv\_inv\_id                | Parent invoice ID. Used when creating a credit invoice.                                               |\
> \| inv\_type                  | Invoice type, can be DEBIT, CREDIT, CONCEPT\_DEBIT or CONCEPT\_CREDIT                                   |\
> \| inv\_currency\_code         | ISO 4217 currency code                                                                                |\
> \| inv\_currency\_symbol       | Currency symbol shown in the UI                                                                       |\
> \| inv\_description           | Description of the invoice                                                                            |\
> \| inv\_invoice\_debtor\_nr     | Debtor number of the assigned relation                                                                |\
> \| inv\_invoice\_debtor\_name   | Debtor name of the assigned relation                                                                  |\
> \| inv\_invoice\_debtor\_email  | Debtor e-mail of the assigned relation                                                                |\
> \| inv\_number\_numeric        | Invoice number numeric value                                                                          |\
> \| inv\_number\_formatted      | Pretty formatted invoice number                                                                       |\
> \| inv\_status                | Invoice status, can be OPEN, PAYED, OVERDUE, REMINDER\_1, REMINDER\_2, REMINDER\_3 or ...                |\
> \| inv\_reference             | Reference, example purchase order number workorder number                                             |\
> \| inv\_date                  | Invoice date                                                                                          |\
> \| inv\_due\_date              | Invoice due date                                                                                      |\
> \| inv\_due\_days              | Amount of due days. This days are added to the inv\_date to calculate the inv\_due\_date.                |\
> \| inv\_terms                 | Terms shown in the footer of the PDF.                                                                 |\
> \| inv\_header                | Header shown on top of the PDF.                                                                       |\
> \| inv\_amount                | Total amount including VAT.                                                                           |\
> \| inv\_amount\_excl           | Total amount excluding VAT.                                                                           |\
> \| inv\_balance               | Total amounts of the transactions registered to this invoice.                                         |\
> \| inv\_user\_create           | User who created this invoice                                                                         |\
> \| inv\_user\_mutate           | User who mutated this invoice                                                                         |\
> \| inv\_user\_send             | User who marked this invoice as send.                                                                 |\
> \| inv\_timestamp\_create      | Timestamp of creation                                                                                 |\
> \| inv\_timestamp\_mutate      | Timestamp of mutating                                                                                 |\
> \| inv\_timestamp\_payed       | Timestamp when the invoice was marked as payed (inv\_amount equal to inv\_balance)                      |\
> \| inv\_timestamp\_send        | Timestamp of marking the invoice as send.                                                             |\
> \| iln\_lines                 | Array of invoice lines.                                                                               |\
> \| invoice\_debtor            | Invoice debtor.                                                                                       |\
> \| pdf                       | Temporary PDF url.                                                                                    |\
> \| ubl                       | Temporary ubl 2.0 url.                                                                                |\
> \
> Invoice line parameters\
> \
> \| Parameter             | Description                                      |\
> \|-----------------------|--------------------------------------------------|\
> \| iln\_id                | Line ID                                          |\
> \| iln\_inv\_id            | Invoice Id                                       |\
> \| iln\_order             | Position of the line                             |\
> \| iln\_material\_code     | Material code                                    |\
> \| iln\_material\_hourtype | Hourtype code                                    |\
> \| iln\_description       | Line description                                 |\
> \| iln\_amount            | Line amount                                      |\
> \| iln\_price             | Item price                                       |\
> \| iln\_vat\_percentage    | Vat percentage                                   |\
> \| iln\_discount          | Discount percentage                              |\
> \| iln\_total             | Total price excluding vat and discount           |\
> \| iln\_total\_discount    | Calculated discount amount                       |\
> \| iln\_total\_vat         | Calculated vat amount                            |\
> \| iln\_total\_excl        | Total price excluding vat and including discount |\
> \| iln\_total\_incl        | Total price including vat and including discount |

```json
{"openapi":"3.1.0","info":{"title":"OpenApi","version":"1.0.0"},"servers":[{"url":"{{api_url}}"},{"url":"https://www.werkbonapp.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/invoices/":{"get":{"summary":"Get invoice","parameters":[{"name":"token","in":"query","schema":{"type":"string"}},{"name":"software_token","in":"query","schema":{"type":"string"}},{"name":"key","in":"query","schema":{"type":"string"}},{"name":"value","in":"query","schema":{"type":"string"}},{"name":"operator","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Response_200"}},"tags":["Invoices"],"description":"This api is used to fetch generated invoices from WorkorderApp.\nThe result can be filtered by using the advanced filter. As described in the introduction section.\n\n| Parameter                 | Description                                                                                           |\n|---------------------------|-------------------------------------------------------------------------------------------------------|\n| inv_id                    | Unique invoice ID  number of the invoice                                                              |\n| inv_worksheet_id          | Worksheet ID that is used to generate this invoice                                                    |\n| inv_quo_id                | Quotation ID that is used to generate this invoice                                                    |\n| inv_inv_id                | Parent invoice ID. Used when creating a credit invoice.                                               |\n| inv_type                  | Invoice type, can be DEBIT, CREDIT, CONCEPT_DEBIT or CONCEPT_CREDIT                                   |\n| inv_currency_code         | ISO 4217 currency code                                                                                |\n| inv_currency_symbol       | Currency symbol shown in the UI                                                                       |\n| inv_description           | Description of the invoice                                                                            |\n| inv_invoice_debtor_nr     | Debtor number of the assigned relation                                                                |\n| inv_invoice_debtor_name   | Debtor name of the assigned relation                                                                  |\n| inv_invoice_debtor_email  | Debtor e-mail of the assigned relation                                                                |\n| inv_number_numeric        | Invoice number numeric value                                                                          |\n| inv_number_formatted      | Pretty formatted invoice number                                                                       |\n| inv_status                | Invoice status, can be OPEN, PAYED, OVERDUE, REMINDER_1, REMINDER_2, REMINDER_3 or ...                |\n| inv_reference             | Reference, example purchase order number workorder number                                             |\n| inv_date                  | Invoice date                                                                                          |\n| inv_due_date              | Invoice due date                                                                                      |\n| inv_due_days              | Amount of due days. This days are added to the inv_date to calculate the inv_due_date.                |\n| inv_terms                 | Terms shown in the footer of the PDF.                                                                 |\n| inv_header                | Header shown on top of the PDF.                                                                       |\n| inv_amount                | Total amount including VAT.                                                                           |\n| inv_amount_excl           | Total amount excluding VAT.                                                                           |\n| inv_balance               | Total amounts of the transactions registered to this invoice.                                         |\n| inv_user_create           | User who created this invoice                                                                         |\n| inv_user_mutate           | User who mutated this invoice                                                                         |\n| inv_user_send             | User who marked this invoice as send.                                                                 |\n| inv_timestamp_create      | Timestamp of creation                                                                                 |\n| inv_timestamp_mutate      | Timestamp of mutating                                                                                 |\n| inv_timestamp_payed       | Timestamp when the invoice was marked as payed (inv_amount equal to inv_balance)                      |\n| inv_timestamp_send        | Timestamp of marking the invoice as send.                                                             |\n| iln_lines                 | Array of invoice lines.                                                                               |\n| invoice_debtor            | Invoice debtor.                                                                                       |\n| pdf                       | Temporary PDF url.                                                                                    |\n| ubl                       | Temporary ubl 2.0 url.                                                                                |\n\nInvoice line parameters\n\n| Parameter             | Description                                      |\n|-----------------------|--------------------------------------------------|\n| iln_id                | Line ID                                          |\n| iln_inv_id            | Invoice Id                                       |\n| iln_order             | Position of the line                             |\n| iln_material_code     | Material code                                    |\n| iln_material_hourtype | Hourtype code                                    |\n| iln_description       | Line description                                 |\n| iln_amount            | Line amount                                      |\n| iln_price             | Item price                                       |\n| iln_vat_percentage    | Vat percentage                                   |\n| iln_discount          | Discount percentage                              |\n| iln_total             | Total price excluding vat and discount           |\n| iln_total_discount    | Calculated discount amount                       |\n| iln_total_vat         | Calculated vat amount                            |\n| iln_total_excl        | Total price excluding vat and including discount |\n| iln_total_incl        | Total price including vat and including discount |"}}}}
```

## Update invoice

> This api is used to fetch update invoices. Any of the parameters can be added as a URL parameter with the new value.

```json
{"openapi":"3.1.0","info":{"title":"OpenApi","version":"1.0.0"},"servers":[{"url":"{{api_url}}"},{"url":"https://www.werkbonapp.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/invoices/":{"put":{"summary":"Update invoice","parameters":[{"name":"token","in":"query","schema":{"type":"string"}},{"name":"software_token","in":"query","schema":{"type":"string"}},{"name":"inv_id","in":"query","description":"Invoice id is required","schema":{"type":"integer"}},{"name":"inv_external_reference","in":"query","schema":{"type":"string"}},{"name":"inv_reference","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Response_200"}},"tags":["Invoices"],"description":"This api is used to fetch update invoices. Any of the parameters can be added as a URL parameter with the new value."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledge.out-smart.com/openapi/invoices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
