Update an invoice.
Supports sales and sales order invoices in unfinished state, and expense claim, purchase, purchase order and travel invoices in unfinished and received states. Note that modifying invoice tax, discount, currency, accounting or row information can cause the adjoined ledger receipt to be recreated with a new ID. <br/><br/> The version field is also required for this endpoint.
Request
- Base URL: https://pts-api.procountor.com/api
- URL: https://pts-api.procountor.com/api/invoices/{invoiceId}
- Auth: HTTP bearer
Path parameters
Invoice identifier
Request body
Unique identifier of the invoice. Generated by Procountor and present in the object returned.
Technical ID for the business partner. Used to link the invoice to a customer or supplier in the business partner register. If supplied, the company must have this partner ID in the corresponding register. This field is not editable in PUT /invoices endpoint.
Invoice type. Note that this affects validation requirements. PERIODIC_TAX_RETURN is supported only by GET /invoices endpoint. It's not supported by PUT and POST /invoices endpoints.
Invoice status. A new invoice created through the API will have its status set as UNFINISHED. Updating invoice is possible when its status is UNFINISHED. Updating expense claim, purchase, purchase order and travel invoice is possible when the status is UNFINISHED or RECEIVED. PUT /invoices endpoint is not able to change invoice status.
Invoice date. This is synonymous to billing date.
Date of the latest payment transaction related to the invoice. Set automatically when payments are made and can't be modified directly.
Invoice discount percentage. Scale: 4.
Order reference of the invoice. This will be copied to the payment as message if no reference code is specified.
Invoice number generated by Procountor. For custom invoice numbers, see the originalInvoiceNumber property.
Invoice VAT status. Required for all invoices except travel invoices and expense claims.
Invoice number from the biller in an external system.
First day of the delivery period.
Last day of the delivery period.
Delivery method for the goods. SALES_INVOICE and SALES_ORDER do not support type OTHER.
Delivery instructions.
Channel of distribution for the invoice. Values EDIFACT and PAPER_INVOICE are not allowed for POST /invoices and PUT /invoices endpoints.
Penal interest rate. Scale: 2.
Language of the invoice. Required for sales invoices and sales orders, otherwise ignored.
SALES_INVOICE and SALES_ORDER only. ID of invoice template.
Invoice notes containing additional information. Visible on the invoice. Use \n as line break.
Country code describing which country's VAT standards are being used. Usage of foreign VAT settings must be agreed on separately with Procountor. Required if the company uses foreign VATs. Example value: SWEDEN. See Address.country in POST/PUT /invoices for a list of allowable values
ID of the ledger receipt linked to this invoice. A ledger receipt is linked to every invoice for holding its accounting information. For defining ledger accounts, dimensions or VAT status regarding the invoice, modify the ledger receipt. See PUT /ledgerreceipts for more info.
Invoice notes (seller's/buyer's notes). Not visible on the invoice. Use \n as line break.
SALES_INVOICE and SALES_ORDER only. ID for external financing agreement. The bankAccount.accountNumber specified must match the one used by the specified financing agreement. Financing agreements cannot be used with cash payments.
SALES_INVOICE and SALES_ORDER only. Additional notes about external financing agreement.
Only for invoice type PERIODIC_TAX_RETURN. Ignored for other types. Contains the total sum of invoice. POST and PUT operation cannot assign/modify value of this property.
Order number. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Agreement number. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Accounting code. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Delivery site. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Tender reference. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Buyer reference. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Seller reference. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Invoice version. This field is required in the PUT /invoices/{invoiceId} endpoint.
Invoice owner's user ID.
It marks invoice as an offer. It is applicable only to SALES_ORDER type of invoices.
Example request
{
"status": "UNFINISHED",
"counterParty": {
"counterPartyAddress": {
"country": "SWEDEN"
}
},
"billingAddress": {
"country": "SWEDEN"
},
"deliveryAddress": {
"country": "SWEDEN"
},
"paymentInfo": {
"currency": "EUR",
"bankReferenceCode": "26013"
},
"vatCountry": "SWEDEN",
"attachments": [
{
"name": "Picture.jpg"
}
]
}Response
The invoice was successfully updated.
Unique identifier of the invoice. Generated by Procountor and present in the object returned.
Technical ID for the business partner. Used to link the invoice to a customer or supplier in the business partner register. If supplied, the company must have this partner ID in the corresponding register. This field is not editable in PUT /invoices endpoint.
Invoice type. Note that this affects validation requirements. PERIODIC_TAX_RETURN is supported only by GET /invoices endpoint. It's not supported by PUT and POST /invoices endpoints.
Invoice status. A new invoice created through the API will have its status set as UNFINISHED. Updating invoice is possible when its status is UNFINISHED. Updating expense claim, purchase, purchase order and travel invoice is possible when the status is UNFINISHED or RECEIVED. PUT /invoices endpoint is not able to change invoice status.
Invoice date. This is synonymous to billing date.
Date of the latest payment transaction related to the invoice. Set automatically when payments are made and can't be modified directly.
Invoice discount percentage. Scale: 4.
Order reference of the invoice. This will be copied to the payment as message if no reference code is specified.
Invoice number generated by Procountor. For custom invoice numbers, see the originalInvoiceNumber property.
Invoice VAT status. Required for all invoices except travel invoices and expense claims.
Invoice number from the biller in an external system.
First day of the delivery period.
Last day of the delivery period.
Delivery method for the goods. SALES_INVOICE and SALES_ORDER do not support type OTHER.
Delivery instructions.
Channel of distribution for the invoice. Values EDIFACT and PAPER_INVOICE are not allowed for POST /invoices and PUT /invoices endpoints.
Penal interest rate. Scale: 2.
Language of the invoice. Required for sales invoices and sales orders, otherwise ignored.
SALES_INVOICE and SALES_ORDER only. ID of invoice template.
Invoice notes containing additional information. Visible on the invoice. Use \n as line break.
Country code describing which country's VAT standards are being used. Usage of foreign VAT settings must be agreed on separately with Procountor. Required if the company uses foreign VATs. Example value: SWEDEN. See Address.country in POST/PUT /invoices for a list of allowable values
ID of the ledger receipt linked to this invoice. A ledger receipt is linked to every invoice for holding its accounting information. For defining ledger accounts, dimensions or VAT status regarding the invoice, modify the ledger receipt. See PUT /ledgerreceipts for more info.
Invoice notes (seller's/buyer's notes). Not visible on the invoice. Use \n as line break.
SALES_INVOICE and SALES_ORDER only. ID for external financing agreement. The bankAccount.accountNumber specified must match the one used by the specified financing agreement. Financing agreements cannot be used with cash payments.
SALES_INVOICE and SALES_ORDER only. Additional notes about external financing agreement.
Only for invoice type PERIODIC_TAX_RETURN. Ignored for other types. Contains the total sum of invoice. POST and PUT operation cannot assign/modify value of this property.
Order number. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Agreement number. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Accounting code. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Delivery site. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Tender reference. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Buyer reference. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Seller reference. Valid only in Finnish environments for SALES_INVOICE and PURCHASE_INVOICE.
Invoice version. This field is required in the PUT /invoices/{invoiceId} endpoint.
Invoice owner's user ID.
It marks invoice as an offer. It is applicable only to SALES_ORDER type of invoices.
Example response
{
"status": "UNFINISHED",
"counterParty": {
"counterPartyAddress": {
"country": "SWEDEN"
}
},
"billingAddress": {
"country": "SWEDEN"
},
"deliveryAddress": {
"country": "SWEDEN"
},
"paymentInfo": {
"currency": "EUR",
"bankReferenceCode": "26013"
},
"vatCountry": "SWEDEN",
"attachments": [
{
"name": "Picture.jpg"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.