In this article, you can read about how to retrieve invoices, credit notes, invoice PDFs, credit note PDFs, invoice attachments, and invoice orders via the API, as well as how to insert and delete invoice/credit note export logs and manage orders.
Get Invoices
GET
https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoice&page=1Retrieving invoices is done through the GET method. Use this to download invoices from your Recman account.
Note
If an invoice has an attached object, it can be downloaded separately using the invoiceAttachment scope (see below).
| URL | https://api.recman.io/v2/get/ |
| Scope | invoice |
| Page | Page number, 1000 invoices per page |
| Parameters | invoiceId, invoiceIds, minInvoiceId, exported, invoiceSystemId |
PARAMS
| key | {{api_key}} |
| scope | invoice |
| page | 1 |
Get Credit Notes
GET
https://api.recman.io/v2/get/?key={{api_key}}&
scope=creditNote&page=1Retrieving credit notes is done through the GET method. Use this to download credit notes from your Recman account.
| URL | https://api.recman.io/v2/get/ |
| Scope | creditNote |
| Page | Page number, 1000 credit notes per page |
| Parameters | creditNoteId, creditNoteIds, minCreditNoteId, exported, creditNoteSystemId |
PARAMS
| key | {{api_key}} |
| scope | creditNote |
| page | 1 |
Get Invoice PDF
GET
https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoicePdf&invoiceId=508098Retrieving an invoice PDF is done through the GET method.
Note
The parameters languageId and layoutId will be set automatically based on what is default on the customer and department, if not set manually.
| URL | https://api.recman.io/v2/get/ |
| Scope | invoicePdf |
| Operation | GET |
| Parameters | invoiceId, languageId, layoutId |
PARAMS
| key | {{api_key}} |
| scope | invoicePdf |
| invoiceId | 508098 |
Get Credit Note PDF
GET
https://api.recman.io/v2/get/?key={{api_key}}&
scope=creditNotePdf&creditNoteId=48726Retrieving a credit note PDF is done through the GET method.
Note
The parameters languageId and layoutId will be set automatically based on what is default on the customer and department, if not set manually.
| URL | https://api.recman.io/v2/get/ |
| Scope | creditNotePdf |
| Operation | GET |
| Parameters | creditNoteId, languageId, layoutId |
PARAMS
| key | {{api_key}} |
| scope | creditNotePdf |
| creditNoteId | 48726 |
Get Invoice Attachment
GET
https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoiceAttachment&invoiceAttachmentId=145510Retrieving an invoice attachment is done through the GET method.
| URL | https://api.recman.io/v2/get/ |
| Scope | invoiceAttachment |
| Operation | GET |
| Parameters | invoiceAttachmentId |
PARAMS
| key | {{api_key}} |
| scope | invoiceAttachment |
| invoiceAttachmentId | 145510 |
| invoiceId | 907888 |
Get Invoice Orders
GET
https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoiceOrderGet a list of invoice orders through the GET method.
PARAMS
| key | {{api_key}} |
| scope | invoiceOrder |
Insert / Delete Invoice Export Log
POST
https://api.recman.io/v2/post/The POST method is used for inserting and deleting invoice export logs.
| URL POST | https://api.recman.io/v2/post/ |
| Scope | invoiceExportLog |
| Operation | insert / delete |
Fields
| Field | Description |
|---|---|
| invoiceId integer | Invoice ID. Required on operation: insert |
| userId integer | User ID. Required on operation: insert |
| invoiceSystemId integer | Invoice system ID. Required on operation: insert |
| invoiceExportLogId integer | Invoice export log ID. Required on operation: delete |
Request Body — Insert
| key | {{api_key}} |
| scope | invoiceExportLog |
| operation | insert |
| data.invoiceId | 423562 |
| data.userId | 13236 |
| data.invoiceSystemId | 755682 |
Request Body — Delete
| key | {{api_key}} |
| scope | invoiceExportLog |
| operation | delete |
| data.invoiceExportLogId | 321312 |
Insert / Delete Credit Note Export Log
POST
https://api.recman.io/v2/post/The POST method is used for inserting and deleting credit note export logs.
| URL POST | https://api.recman.io/v2/post/ |
| Scope | creditNoteExportLog |
| Operation | insert / delete |
Fields
| Field | Description |
|---|---|
| creditNoteId integer | Credit Note ID. Required on operation: insert |
| userId integer | User ID. Required on operation: insert |
| invoiceSystemId integer | Invoice system ID. Required on operation: insert |
| creditNoteExportLogId integer | Credit note export log ID. Required on operation: delete |
Request Body — Insert
| key | {{api_key}} |
| scope | creditNoteExportLog |
| operation | insert |
| data.creditNoteId | 423562 |
| data.userId | 13236 |
| data.invoiceSystemId | 755682 |
Create Order
POST
The POST method is used for creating an invoice order.
| URL | https://api.recman.io/v2/post/ |
| Scope | invoiceOrder |
| Operation | insert (the only operation supported for this scope) |
Note
The projectId field is required. The project must be active and belong to your subscription.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | integer | Required | None | Project ID. |
| name | string | Optional | null | Order name. Tags are stripped and the value is trimmed. An empty value is saved as null. |
| orderDate | string | Optional | Today's date | Order date. Format: Y-m-d. |
| invoiceDate | string | Optional | null | Invoice date. Format: Y-m-d or none. |
| dueDate | string | Optional | null | Due date. Format: Y-m-d or none. |
| internalNote | string | Optional | null | Internal comment. An empty value is saved as null. |
| invoiceNote | string | Optional | null | Note for the invoice. An empty value is saved as null. |
| invoiceUserId | integer | Optional | 0 | ID of the invoice co-worker. |
| invoiceable | boolean | Optional | true | Whether the order can be invoiced. |
| currencyId | integer | Optional | The project's invoice currency | Currency ID. |
| projectNo | string | Optional | The project's number | Project number. |
| contactPersonId | integer | Optional | The project's invoice contact, otherwise 0 | Contact person ID. Must be an active contact of the project's customer. |
| offerId | integer | Optional | 0 | Offer ID. The offer must belong to the project. |
| responsibleUserId | integer | Optional | The project's responsible co-worker | ID of the responsible co-worker. Must be an active user. |
Rules
- Only
insertis supported for theinvoiceOrderscope. You cannot update or delete an order with this scope. - The order number, customer, department, customer credit days and created date are set by the system and cannot be sent in the request.
- When the order is created, the response returns the ID of the new order (
invoiceOrderId).
Insert Order Line
POST
The POST method is used for adding a line to an existing invoice order.
| URL | https://api.recman.io/v2/post/ |
| Scope | invoiceOrderLine |
| Operation | insert |
Note
The invoiceOrderId, productNumber and description fields are required. The order must not be invoiced yet.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| invoiceOrderId | integer | Required | None | Invoice order ID. |
| productNumber | integer | Required | None | Product number. This is the product number, not the product ID. |
| description | string | Required | None | Line description. |
| note | string | Optional | Empty string | Line note. |
| qty | number | Optional | The product's quantity | Quantity. |
| price | number | Optional | The product's price | Unit price. |
| vatPercent | number | Optional | The product's tax | VAT in percent, from 0 to 100. |
When the line is created, the response returns the ID of the new line (invoiceOrderLineId).
Update Order Line
POST
The POST method is used for updating a line on an existing invoice order.
| URL | https://api.recman.io/v2/post/ |
| Scope | invoiceOrderLine |
| Operation | update |
Note
The invoiceOrderLineId field is required. The parent order must not be invoiced yet. Fields that you do not send keep their current values.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| invoiceOrderLineId | integer | Required | None | Invoice order line ID. |
| productNumber | integer | Optional | Current value | Product number. This is the product number, not the product ID. |
| description | string | Optional | Current value | Line description. |
| note | string | Optional | Current value | Line note. |
| qty | number | Optional | Current value | Quantity. |
| price | number | Optional | Current value | Unit price. |
| vatPercent | number | Optional | Current value | VAT in percent, from 0 to 100. |
Note
If the values you send are identical to the stored values, nothing is changed and the request returns the error cannot update invoice order line.
Delete Order Line
POST
The POST method is used for deleting a line from an invoice order.
| URL | https://api.recman.io/v2/post/ |
| Scope | invoiceOrderLine |
| Operation | delete |
Note
The invoiceOrderLineId field is required. The parent order must not be invoiced yet.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| invoiceOrderLineId | integer | Required | Invoice order line ID. |
What's next
Continue with the Paycheck and Payroll articles, or the Salary Matrix and Cost Center articles, all part of the Economy series.