Economy: Retrieving Invoices, Credit Notes, PDFs, Attachments, Managing Export Logs and Orders via the API

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=1

Retrieving 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).

URLhttps://api.recman.io/v2/get/
Scopeinvoice
PagePage number, 1000 invoices per page
ParametersinvoiceId, invoiceIds, minInvoiceId, exported, invoiceSystemId

PARAMS

key{{api_key}}
scopeinvoice
page1

Get Credit Notes

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=creditNote&page=1

Retrieving credit notes is done through the GET method. Use this to download credit notes from your Recman account.

URLhttps://api.recman.io/v2/get/
ScopecreditNote
PagePage number, 1000 credit notes per page
ParameterscreditNoteId, creditNoteIds, minCreditNoteId, exported, creditNoteSystemId

PARAMS

key{{api_key}}
scopecreditNote
page1

Get Invoice PDF

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoicePdf&invoiceId=508098

Retrieving 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.

URLhttps://api.recman.io/v2/get/
ScopeinvoicePdf
OperationGET
ParametersinvoiceId, languageId, layoutId

PARAMS

key{{api_key}}
scopeinvoicePdf
invoiceId508098

Get Credit Note PDF

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=creditNotePdf&creditNoteId=48726

Retrieving 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.

URLhttps://api.recman.io/v2/get/
ScopecreditNotePdf
OperationGET
ParameterscreditNoteId, languageId, layoutId

PARAMS

key{{api_key}}
scopecreditNotePdf
creditNoteId48726

Get Invoice Attachment

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoiceAttachment&invoiceAttachmentId=145510

Retrieving an invoice attachment is done through the GET method.

URLhttps://api.recman.io/v2/get/
ScopeinvoiceAttachment
OperationGET
ParametersinvoiceAttachmentId

PARAMS

key{{api_key}}
scopeinvoiceAttachment
invoiceAttachmentId145510
invoiceId907888

Get Invoice Orders

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=invoiceOrder

Get a list of invoice orders through the GET method.

PARAMS

key{{api_key}}
scopeinvoiceOrder

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 POSThttps://api.recman.io/v2/post/
ScopeinvoiceExportLog
Operationinsert / delete

Fields

FieldDescription
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}}
scopeinvoiceExportLog
operationinsert
data.invoiceId423562
data.userId13236
data.invoiceSystemId755682

Request Body — Delete

key{{api_key}}
scopeinvoiceExportLog
operationdelete
data.invoiceExportLogId321312

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 POSThttps://api.recman.io/v2/post/
ScopecreditNoteExportLog
Operationinsert / delete

Fields

FieldDescription
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}}
scopecreditNoteExportLog
operationinsert
data.creditNoteId423562
data.userId13236
data.invoiceSystemId755682

Create Order

POST

The POST method is used for creating an invoice order.

URLhttps://api.recman.io/v2/post/
ScopeinvoiceOrder
Operationinsert (the only operation supported for this scope)

Note

The projectId field is required. The project must be active and belong to your subscription.

Fields

FieldTypeRequiredDefaultDescription
projectIdintegerRequiredNoneProject ID.
namestringOptionalnullOrder name. Tags are stripped and the value is trimmed. An empty value is saved as null.
orderDatestringOptionalToday's dateOrder date. Format: Y-m-d.
invoiceDatestringOptionalnullInvoice date. Format: Y-m-d or none.
dueDatestringOptionalnullDue date. Format: Y-m-d or none.
internalNotestringOptionalnullInternal comment. An empty value is saved as null.
invoiceNotestringOptionalnullNote for the invoice. An empty value is saved as null.
invoiceUserIdintegerOptional0ID of the invoice co-worker.
invoiceablebooleanOptionaltrueWhether the order can be invoiced.
currencyIdintegerOptionalThe project's invoice currencyCurrency ID.
projectNostringOptionalThe project's numberProject number.
contactPersonIdintegerOptionalThe project's invoice contact, otherwise 0Contact person ID. Must be an active contact of the project's customer.
offerIdintegerOptional0Offer ID. The offer must belong to the project.
responsibleUserIdintegerOptionalThe project's responsible co-workerID of the responsible co-worker. Must be an active user.

Rules

  • Only insert is supported for the invoiceOrder scope. 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.

URLhttps://api.recman.io/v2/post/
ScopeinvoiceOrderLine
Operationinsert

Note

The invoiceOrderId, productNumber and description fields are required. The order must not be invoiced yet.

Fields

FieldTypeRequiredDefaultDescription
invoiceOrderIdintegerRequiredNoneInvoice order ID.
productNumberintegerRequiredNoneProduct number. This is the product number, not the product ID.
descriptionstringRequiredNoneLine description.
notestringOptionalEmpty stringLine note.
qtynumberOptionalThe product's quantityQuantity.
pricenumberOptionalThe product's priceUnit price.
vatPercentnumberOptionalThe product's taxVAT 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.

URLhttps://api.recman.io/v2/post/
ScopeinvoiceOrderLine
Operationupdate

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

FieldTypeRequiredDefaultDescription
invoiceOrderLineIdintegerRequiredNoneInvoice order line ID.
productNumberintegerOptionalCurrent valueProduct number. This is the product number, not the product ID.
descriptionstringOptionalCurrent valueLine description.
notestringOptionalCurrent valueLine note.
qtynumberOptionalCurrent valueQuantity.
pricenumberOptionalCurrent valueUnit price.
vatPercentnumberOptionalCurrent valueVAT 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.

URLhttps://api.recman.io/v2/post/
ScopeinvoiceOrderLine
Operationdelete

Note

The invoiceOrderLineId field is required. The parent order must not be invoiced yet.

Fields

FieldTypeRequiredDescription
invoiceOrderLineIdintegerRequiredInvoice 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.

Was this article helpful?
0 out of 0 found this helpful