The Sales invoices API is a background functionality of a web client at Profit365 > Sales > Invoices.
Content:Resource information
Url |
https://api.profit365.eu/1.6/sales/invoices
|
Authentication | required |
Access level | company |
Response | JSON / XML |
Class | Business entity |
List invoices
A view is currently only way how to list invoices. Before getting involved, read more about the view. Invoices view contains general data joined with partners, ordners and accounts; also balance to date and some more. A pagination is used.
Url |
https://api.profit365.eu/1.6/sales/invoices/{page} |
||
Method | GET | ||
Params |
|
||
Example | https://api.profit365.eu/1.6/sales/invoices/1 |
Create new invoice
Creating an invoice is a advanced process. Profit 365 has to keep accounting, tax (or legal) and system integrity and consistency of an invoice. It is ensured by several built-in routines which are executed or excluded from execution based on uploaded data.
We have selected two main cases which describe the diference best.
- Records of invoices. You upload invoices that have already been created, printed and sent to customer in other application or system. In such case Profit 365 only fills missing system and accounting data, and turn uploaded invoice into a full invoice record. This is done without modifying any number, sum, value or tax data. Accounting and system consistency is ensured.
Example: upload invoices from a standalone invoicing service. - Creation of invoices. You create new invoice based on business data (product, amount, invoiced sum). Profit 365 then processes simple data into full invoice record, including sums recalculation, bonuses, pricelists, VAT. Accounting, TAX and system consisntency is ensured.
Example: upload orders from eshop, turn them into invoices and get back a printable output for customer.
Both methods are available at same URL (see above). The difference is amount and structure of the data you are sending to API. POST data which include Rows and VAT are considered as Records of invoice.
Parameters for insert are listed here.
Url |
https://api.profit365.eu/1.6/sales/invoices |
Method | POST |
Content | A new invoice data |
Example | POST https://api.profit365.eu/1.6/sales/invoices
|
Update invoice
An existing invoice can be updated, if its business state allows such operation. When updating an invoice, submit all the data, not just fields that have changed.
Url |
https://api.profit365.eu/1.6/sales/invoices/{id} |
||
Method | PUT | ||
Params |
|
||
Content | An updated invoice data | ||
Example | PUT https://api.profit365.eu/1.6/sales/invoices/8f19cc10-458d-4cc2-8b84-f4f6a2abc3e6
|
Invoice data
ordnerId required |
ID of an ordner where the invoice is stored. (SK: šanón) Type: GUID |
request, response |
warehouseId required |
ID of a warehouse. Type: GUID |
request, response |
dateCreated required |
Date when invoice was issued (business date not system date) Type: DateTime |
request, response |
rows required |
A collection of invoice's rows. The invoice may contain one or multiple rows. Each row represents exactly one invoiced item. See row data Type: Array |
request, response |
recordNumber optional |
A unique number of the invoice. When inserting, empty record number will be generated by the counter. When updating, empty record number wont be generated. Duplicate record number will be denied. Type: String |
request, response |
tags optional |
An Array of tags helps to search, group and link invoices Type: String Array |
request, response |
partnerId optional |
Customer ID from a business partners list Type: GUID |
request, response |
partnerDetail optional |
Billing address / info of the partner Type: String |
request, response |
partnerAddress optional |
Delivery address / info of the partner Type: String |
request, response |
partnerCountry optional |
Registration / residency country of the partner. Two letter country code (ISO 3166-1 alpha-2). Case-insensitive. Type: String (2) |
request, response |
partnerNumber3 optional |
VAT registration number of the partner, if any. Type: String |
request, response |
deliveryTypeId optional |
ID of a delivery type Type: GUID |
request, response |
paymentTypeId optional |
ID of a payment type Type: GUID |
request, response |
bankAccountId optional |
ID of one of the company bank accounts Type: GUID |
request, response |
symbolVariable optional |
Variable symbol for the payment Type: String |
request, response |
symbolConstant optional |
Constant symbol for the payment Type: String |
request, response |
symbolSpecific optional |
Specific symbol for the payment Type: String |
request, response |
dateAccounting optional |
A accounting date for the invoice. A period, when not set, is selected by dateAccounting. Type: DateTime |
request, response |
dateDelivery optional |
A delivery date for the invoice. VAT Period is generated by dateDelivery. Type: DateTime |
request, response |
periodId optional |
A accounting period for the invoice. If not set, system will find period by date Accounting. Type: DateTime |
request, response |
dateValidTo optional |
A due date for the invoice. Type: DateTime |
request, response |
commentAboveItems optional |
A comment above items. Type: string |
request, response |
commentBelowItems optional |
A comment bellow items. Type: string |
request, response |
vatID optional |
ID of VAT code. Must be of type 'O' - output (sales). If not supplied, code will be selected based on vatCode. Type: GUID |
request, response |
vatCode optional |
Code of VAT code. Must be of type 'O' - output (sales). For regular sales, must be valid for creditor's VAT-administering country, as set in vatNumber. For OSS (One Stop Shop), vatCode must be valid for partnerCountry, which must be set. If vatCode is not supplied, VAT code will be selected based on vatRate. Case-sensitive. Type: String |
request, response |
vatNumber optional |
VAT registration number of creditor. Must start with two-letter country code (ISO 3166-1 alpha-2). If not supplied, VAT registration number of own company will be used, if any. Type: String |
request, response |
vatRate optional |
VAT rate in percent. VAT code with supplied rate will be selected, based on vatNumber and partnerNumber3, if any. For OSS (One Stop Shop), partnerCountry must be set. If not supplied, default VAT code will be used. Type: Decimal |
request, response |
vatParagraphID optional |
ID of VAT paragraph. Must be valid for supplied VAT code, if any. Otherwise, default paragraph for VAT code will be used. Type: GUID |
request, response |
bonusPercent optional |
Bonus (discount) for a whole invoice in percent. Type: Decimal |
request, response |
orderRecordNo optional |
Record number of the related order. Type: string |
request, response |
warehouseRecordNo optional |
Record number of the related warehouse isuue card. Type: string |
request, response |
costCenterId optional |
ID of a Cost center. Type: GUID |
request, response |
costUnitId optional |
ID of a Cost unit. Type: GUID |
request, response |
personId optional |
ID of a Person. Type: GUID |
request, response |
projectId optional |
ID of a Project. Type: GUID |
request, response |
Invoice row data
quantity required |
A quantity of an invoiced item. Required value, must be other than zero. Type: Number |
request, response |
price required |
A price per unit. This property is conditionally required - either price or priceBrutto must have a value. Type: Number |
request, response |
priceBrutto required |
A price per unit including taxes (VAT, etc). This property is conditionally required - either price or priceBrutto must have a value. Type: Number |
request, response |
itemId optional |
ID of an item from price list. Type: GUID |
request, response |
code optional |
A free text field. If an itemID is used, will be automatically filled by Item's Code. If invoicing an item that is not listed in system, fill manually. Type: GUID |
request, response |
name optional |
A free text field. If an itemID is used, will be automatically filled by Item's Name. If invoicing an item that is not listed in system, fill manually. Type: GUID |
request, response |
vatID optional |
ID of VAT code. Must be of type 'O' - output (sales). If not supplied, code will be selected based on vatCode. Type: GUID |
request, response |
vatCode optional |
Code of VAT code. Must be of type 'O' - output (sales). For regular sales, must be valid for creditor's VAT-administering country, as set in invoice vatNumber. For OSS (One Stop Shop), vatCode must be valid for invoice partnerCountry, which must be set. If vatCode is not supplied, VAT code will be selected based on vatRate. Case-sensitive. Type: String |
request, response |
vatRate optional |
VAT rate in percent. VAT code with supplied rate will be selected, based on invoice vatNumber and partnerNumber3, if any. For OSS (One Stop Shop), invoice partnerCountry must be set. If not supplied, VAT code of invoice will be used. Type: Decimal |
request, response |
vatParagraphID optional |
ID of VAT paragraph. Must be valid for supplied VAT code, if any. If not supplied, vatParagraphID of invoice will be used. Otherwise, default paragraph for VAT code will be used. Type: GUID |
request, response |
New invoice data
A new invoice data extends a standard invoice data with custom properties. A new invoice data are available only in case when inserting new invoice.
ordnerCode optional |
Code of an ordner where is the invoice stored, alternative to ordnerID. Type: String |
request |
warehouseCode optional |
Code of a warehouse, alternative to warehouseID. Type: String |
request |
New invoice row data
itemCode optional |
Code of an item, alternative to itemID. Type: String |
request |
unitCode optional |
Code of a unit, alternative to unitID. Type: String |
request |
Get an invoice printout
Url |
https://api.profit365.eu/1.6/reports/{reportId}?output=pdf&{invoiceId} |
||||
Method | GET | ||||
Headers | Accept is required request header. Allowed values are: "application/pdf". | ||||
Params |
|
||||
Example | https://api.profit365.eu/1.6/reports/3051?output=pdf&recordID=648af587-bf97-46ea-a176-d71c543feddf |
- Pubished at 4/26/2016 2:36:01 PM
- Last edited 10/5/2020 7:25:25 AM