getSalesDocumentActualReportsDataset

Get an Actual Reports dataset for a sales document.

This API call returns basically the same result as back office sends to Actual Reports. The only difference is in VAT components and attributes - spaces in parameter names have been replaced with underscores.

This dataset is intended to be placed into an HTML template; each of these fields is a fragment of HTML and may contain HTML tags.

If you need to use this data in a non-HTML context, you should decode it appropriately:

  1. Replace <br> tags with newlines.
  2. Strip all other HTML tags.
  3. Decode HTML entities.


Most of the date, number and currency fields are referred to as being returned in a "localized format". This means that the values are formatted according to account settings, as defined in back office, in the Settings → Configuration module.

Input parameters

Parameter name Description Possible value Required
salesDocumentID

Invoice ID.

integer yes
lang

Data language.

If omitted, API will return item names in the default language of your Erply account.
Possible values:
  • 'eng' - English
  • 'spa' - Spanish
  • 'ger' - German
  • 'swe' - Swedish
  • 'fin' - Finnish
  • 'rus' - Russian
  • 'est' - Estonian
  • 'lat' - Latvian
  • 'lit' - Lithuanian
  • 'gre' - Greek
string

Response

Field name Type Description
documentNumber string Invoice, receipt, order or quote number. Except for quotes, document number is assigned when document is confirmed, and thus unconfirmed documents do not have a number. Example: "14000105".
notes string Notes to be printed on the sales document or receipt.
privateNotes string Information about the document, for internal use and handling. These should not be displayed on a printout that is delivered to the customer.
penalty string

Invoice late fee: a percentage of invoice total that will be additionally collected per day after invoice due date, while the invoice is still unpaid. A numeric value (an integer or a decimal), for example 2 or 2.5 — or an empty string.

Erply does not automatically collect the fee, or increase invoice total; if you want to collect a late fee, you need to manually issue a separate invoice for it.

documentName string Document type (in selected language) and document number, joined together. Example: "Receipt 14000105".
documentDate string Document issue date, in localized format. Example: "05/16/2019".
documentTime string Document issue time — currently always returned as "hh:mm:ss", but may potentially be changed to a localized format.
logoOnInvoicesURL string URL of a company logo, for A4 / Letter-sized printouts. You must upload the logo in Erply back office, in the Settings → Configuration module.
logoOnReceiptsURL string URL of a company logo, for receipt-sized printouts. You must upload the logo in Erply back office, in the Settings → Configuration module.
paymentType string Payment method specified on the document (in selected language). You may show it on a printout in case you want to emphasize what payment method was agreed with the customer. Sales documents in Erply can be associated with multiple payments of any type, so this field is not a reliable indicator of how the invoice was actually paid.
cashReceiptGreeting string Contents of the field "Message in receipt footer" from Settings → Configuration → Receipt printouts, or from location card. (The latter overrides the former.)
zeroVatRateNotice string The text "Application of 0% VAT rate is based on Council Directive 2006/112/EC of 28 November 2006.", for intra-EU invoices. Empty if not applicable.
factoringNoticeOnInvoice string Contents of the field "Factoring notice on the invoice" from Settings → Configuration → Sales document printouts, if sales document customer has been marked as a customer who pays via factoring.
shippingDate string Field "Shipping date" on the document, in localized format. Example: "05/16/2019".
validUntilDate string Only for quotes — the date until which the quote is valid. The date is in localized format. Example: "05/16/2019".
deadlineDate string Invoice due date, in localized format. Returned for all documents except quotes. Quotes cannot be "paid" and thus do not have a concept of a payment deadline. Example: "05/16/2019".
paymentDeadlineNumberOfDays string In how many days since issuance the invoice will be due. The value is returned as a number, with the word "days" (in currently selected language) appended to it. Example: "20 days"
warehouseName string Store / location name.
registerName string Name of the register (point of sale), if the document was issued from a register.
fiscalDeviceNumber string Fiscal device number for the register, configured on register form.
* *

Customer information.

If the customer is a person, please keep in mind that as per the General Data Protection Regulation (GDPR), information listed on a document printout must be kept to the necessary minimum. Erply's standard printouts have a number of controls in Settings → Configuration → Receipt printouts; the fields below, however, always contain the data. Even if you disable those settings, API will still give you a data set containing all fields.

Note that the semantic meaning of "customer" may vary depending on your account settings. If you are looking to display the payer and receiver of goods separately, and want your printout integration to work on any Erply account, take a look at the payer* and shipTo* fields below.

customerName string Full name of the customer.
customerCode string Customer's company code, or a person's national ID, as entered on customer card.
customerPhone string Customer's phone number, as entered on customer card.
customerEmail string Customer's email address, as entered on customer card.
customerMobile string Customer's mobile phone number, as entered on customer card.
customerFax string Customer's fax number, as entered on customer card.
customerVatNumber string Customer's VAT number / Tax Identification Number, as entered on customer card.
customerManager string Name of the employee who has been designated as the customer manager, formatted as "Firstname Lastname".
customerLoyaltyCardCode string Customer's loyalty number, as entered on customer card.
customerBankName string Name of the customer's bank, as entered on customer card.
customerBankAccountNumber string Customer's bank account number, as entered on customer card.
customerGroup string Name of the customer group the customer has been placed into.
* *

Customer address.

The specific address selected on the sales document — or if no address has been selected, the customer's oldest non-archived address.

Address is provided in three formats:

  1. Each address component separately.
  2. As one multi-line field ("customerAddressFull").
  3. As up to 4 "label lines", where address components are grouped together by line.

customerAddressStreetAndBuilding string First line of the address: street and building.
customerAddressAddressLine2 string In certain countries only: the "line 2" of an address, which may be used for apartment or suite number.
customerAddressTownOrCity string Town or city.
customerAddressPostalCode string Postal code.
customerAddressCountry string Country, as entered on customer card.
customerAddressState string In certain countries only: state or province.
customerAddressFull string Full address, address lines separated with <br> tags.
customerAddressLabelLine1 string
customerAddressLabelLine2 string
customerAddressLabelLine3 string
customerAddressLabelLine4 string
* * Customer's contact person, if one has been specified on the sales document.
customerContactName string Contact person's name, formatted as "Firstname Lastname".
customerContactEmail string Contact person's email address, as entered on contact card.
customerContactPhone string Contact person's phone number, as entered on contact card.
customerContactMobile string Contact person's mobile phone number, as entered on contact card.
customerContactFax string Contact person's fax number, as entered on contact card.
* *

Payer information.

Depending on your account settings,

  1. "payer" might either be synonymous with "customer" (in which case the customer* and payer* fields contain identical data), or
  2. "payer" is an optional field in addition to "customer", and may or may not be specified. Regardless, the fields below are be populated with appropriate information.

payerName string Full name of the payer.
payerCode string Payer's company code, or a person's national ID, as entered on customer card.
payerPhone string Payer's phone number, as entered on customer card.
payerEmail string Payer's email address, as entered on customer card.
payerMobile string Payer's mobile phone number, as entered on customer card.
payerFax string Payer's fax number, as entered on customer card.
payerVatNumber string Payer's VAT number / Tax Identification Number, as entered on customer card.
payerManager string Name of the employee who has been designated as the customer manager, formatted as "Firstname Lastname".
payerLoyaltyCardCode string Payer's loyalty number, as entered on customer card.
payerBankName string Name of the customer's bank, as entered on customer card.
payerBankAccountNumber string Payer's bank account number, as entered on customer card.
payerGroup string Name of the customer group the customer has been placed into.
* *

Payer address.

The specific address selected on the sales document — or if no address has been selected, the payer's oldest non-archived address.

Address is provided in three formats:

  1. Each address component separately.
  2. As one multi-line field ("customerAddressFull").
  3. As up to 4 "label lines", where address components are grouped together by line.

payerAddressStreetAndBuilding string First line of the address: street and building.
payerAddressAddressLine2 string In certain countries only: the "line 2" of an address, which may contain apartment or suite number.
payerAddressTownOrCity string Town or city.
payerAddressPostalCode string Postal code.
payerAddressCountry string Country, as entered on customer card.
payerAddressState string In certain countries only: state or province.
payerAddressFull string Full address, address lines separated with <br> tags.
* *

Recipient (Ship To) information.

Recipient of goods is the opposite of payer.

Depending on your account settings,

  1. "recipient of goods" might either be synonymous with "customer" (in which case the customer* and shipTo* fields contain identical data), or
  2. "recipient of goods" is an optional field in addition to "customer", and may or may not be specified. Regardless, the fields below are be populated with appropriate information.

shipToName string Full name of the recipient (Ship To).
shipToCode string Recipient's company code, or a person's national ID, as entered on customer card.
shipToPhone string Recipient's phone number, as entered on customer card.
shipToEmail string Recipient's email address, as entered on customer card.
shipToMobile string Recipient's mobile phone number, as entered on customer card.
shipToFax string Recipient's fax number, as entered on customer card.
shipToVatNumber string Recipient's VAT number / Tax Identification Number, as entered on customer card.
shipToManager string Name of the employee who has been designated as the customer manager, formatted as "Firstname Lastname".
shipToLoyaltyCardCode string Recipient's loyalty number, as entered on customer card.
* *

Ship To address.

The specific address selected on the sales document — or if no address has been selected, the recipient's oldest non-archived address.

Address is provided in three formats:

  1. Each address component separately.
  2. As one multi-line field ("shipToAddressFull").
  3. As up to 4 "label lines", where address components are grouped together by line.

shipToAddressStreetAndBuilding string First line of the address: street and building.
shipToAddressAddressLine2 string In certain countries only: the "line 2" of an address, which may contain apartment or suite number.
shipToAddressTownOrCity string Town or city.
shipToAddressPostalCode string Postal code.
shipToAddressCountry string Country, as entered on customer card.
shipToAddressState string In certain countries only: state or province.
shipToAddressFull string Full address, address lines separated with <br> tags.
shipToAddressLabelLine1 string
shipToAddressLabelLine2 string
shipToAddressLabelLine3 string
shipToAddressLabelLine4 string
* * End of customer information</strong
referenceNumber string
companyName string
companyAddressAddressLine2 string
companyAddressTownOrCity string
companyAddressPostalCode string
companyAddressCountry string
companyAddressState string
companyAddressFull string
companyPhone string
companyFax string
companyEmail string
companyWeb string
companyRegCode string
companyVatNumber string
companyNotes string
companyAccountNumber string
companyBank string
companySWIFT string
companyIBAN string
companyAccountNumber2 string
companyBank2 string
companySWIFT2 string
companyIBAN2 string
employeeName string
employeeJobTitle string
employeePhone string
employeeFax string
employeeMobile string
employeeEmail string
shipmentPackedBy string
packedByJobTitle string
packedByPhone string
packedByFax string
packedByMobile string
packedByEmail string
currency string
currencySymbol string
deliveryType Boolean
projectName string
status string
paymentStatus string
applianceSerialNumber string This field is returned only when the "Appliances" module is installed.
applianceReference string This field is returned only when the "Appliances" module is installed.
vehicleLicencePlate string This field is returned only when the "Cars" module is installed.
vehicleMileage string This field is returned only when the "Cars" module is installed.
vehicleReference string This field is returned only when the "Cars" module is installed.
documentRows array
Field nameTypeDescription
noInteger
codeString
code2String
code3String
EANString
supplierCodeString
titleString
productGroupString
categoryString
brandString
supplierString
priorityGroupString
manufacturerString
countryOfOriginString
countryOfOriginCodeString
usualDeliveryTimeString
descriptionString
longDescriptionString
productNameString
salesForPeriodString
amountString
unitString
finalNetPriceString
finalPriceWithVATString
finalNetPriceWithCurrencyString
finalPriceWithVATWithCurrencyString
rowNetTotalString
rowNetTotalWithCurrencyString
rowVATString
rowVATWithCurrencyString
rowTotalString
rowTotalWithCurrencyString
discountString
vatRateString
originalNetPriceString
originalPriceWithVATInteger
originalNetPriceWithCurrencyString
originalPriceWithVATWithCurrencyString
locationInWarehouseString
imageURL1String
imageURL2String
imageURL3String
packagesString
amountInStockInteger
amountReservedInteger
amountAvailableInteger
productLengthString
productLengthWithUnitString
productWidthString
productWidthWithUnitString
productHeightString
productHeightWithUnitString
productVolumeString
productVolumeWithUnitString
productNetWeightString
productNetWeightWithUnitString
productGrossWeightString
productGrossWeightWithUnitString
netWeightString
netWeightWithUnitsString
grossWeightString
grossWeightWithUnitsString
dimension1NameString
dimension1ValueString
dimension1CodeString
dimension2NameString
dimension2ValueString
dimension2CodeString
dimension3NameString
dimension3ValueString
dimension3CodeString
parameter1NameString
parameter1ValueString
parameter2NameString
parameter2ValueString
parameter3NameString
parameter3ValueString
parameter4NameString
parameter4ValueString
parameter5NameString
parameter5ValueString
parameter6NameString
parameter6ValueString
parameter7NameString
parameter7ValueString
parameter8NameString
parameter8ValueString
parameter9NameString
parameter9ValueString
parameter10NameString
parameter10ValueString
reasonCodeString
realPercentageDiscountString
realDiscountBasePriceString
realDiscountBasePriceWithCurrencyString
vatComponent_{componentName}_{componentType}_nameStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_name
vatComponent_{componentName}_{componentType}_typeStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_type
vatComponent_{componentName}_{componentType}_amountOfTaxDoubleThese fields are returned only if module "VAT rate components" is installed. For example: vatComponent_my_tax_CITY_amountOfTax
vatComponent_{componentName}_ {componentType}_amountOfTaxWithCurrencyStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_amountOfTaxWithCurrency
matrixRows array
Field nameTypeDescription
noInteger
codeString
code2String
code3String
EANString
supplierCodeString
titleString
productGroupString
categoryString
brandString
supplierString
priorityGroupString
manufacturerString
countryOfOriginString
countryOfOriginCodeString
usualDeliveryTimeString
descriptionString
longDescriptionString
productNameString
salesForPeriodString
amountString
unitString
finalNetPriceString
finalPriceWithVATString
finalNetPriceWithCurrencyString
finalPriceWithVATWithCurrencyString
rowNetTotalInteger
rowNetTotalWithCurrencyString
rowVATInteger
rowVATWithCurrencyString
rowTotalInteger
rowTotalWithCurrencyString
discountString
vatRateString
originalNetPriceString
originalPriceWithVATInteger
originalNetPriceWithCurrencyString
originalPriceWithVATWithCurrencyString
locationInWarehouseString
imageURL1String
imageURL2String
imageURL3String
packagesString
amountInStockInteger
amountReservedInteger
amountAvailableInteger
productLengthString
productLengthWithUnitString
productWidthString
productWidthWithUnitString
productHeightString
productHeightWithUnitString
productVolumeString
productVolumeWithUnitString
productNetWeightString
productNetWeightWithUnitString
productGrossWeightString
productGrossWeightWithUnitString
netWeightString
netWeightWithUnitsString
grossWeightString
grossWeightWithUnitsString
dimension1NameString
dimension1ValueString
dimension1CodeString
dimension2NameString
dimension2ValueString
dimension2CodeString
dimension3NameString
dimension3ValueString
dimension3CodeString
parameter1NameString
parameter1ValueString
parameter2NameString
parameter2ValueString
parameter3NameString
parameter3ValueString
parameter4NameString
parameter4ValueString
parameter5NameString
parameter5ValueString
parameter6NameString
parameter6ValueString
parameter7NameString
parameter7ValueString
parameter8NameString
parameter8ValueString
parameter9NameString
parameter9ValueString
parameter10NameString
parameter10ValueString
reasonCodeString
realPercentageDiscountString
realDiscountBasePriceString
realDiscountBasePriceWithCurrencyString
tablesArray
vatComponent_{componentName}_{componentType}_nameStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_name
vatComponent_{componentName}_{componentType}_typeStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_type
vatComponent_{componentName}_{componentType}_amountOfTaxDoubleThese fields are returned only if module "VAT rate components" is installed. For example: vatComponent_my_tax_CITY_amountOfTax
vatComponent_{componentName}_ {componentType}_amountOfTaxWithCurrencyStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_amountOfTaxWithCurrency
documentRowsWithComponents array
Field nameTypeDescription
noInteger
codeString
code2String
code3String
EANString
supplierCodeString
titleString
productGroupString
categoryString
brandString
supplierString
priorityGroupString
manufacturerString
countryOfOriginString
countryOfOriginCodeString
usualDeliveryTimeString
descriptionString
longDescriptionString
productNameString
salesForPeriodString
amountString
unitString
finalNetPriceString
finalPriceWithVATString
finalNetPriceWithCurrencyString
finalPriceWithVATWithCurrencyString
rowNetTotalString
rowNetTotalWithCurrencyString
rowVATString
rowVATWithCurrencyString
rowTotalString
rowTotalWithCurrencyString
discountString
vatRateString
originalNetPriceString
originalPriceWithVATInteger
originalNetPriceWithCurrencyString
originalPriceWithVATWithCurrencyString
locationInWarehouseString
imageURL1String
imageURL2String
imageURL3String
packagesString
amountInStockInteger
amountReservedInteger
amountAvailableInteger
productLengthString
productLengthWithUnitString
productWidthString
productWidthWithUnitString
productHeightString
productHeightWithUnitString
productVolumeString
productVolumeWithUnitString
productNetWeightString
productNetWeightWithUnitString
productGrossWeightString
productGrossWeightWithUnitString
netWeightString
netWeightWithUnitsString
grossWeightString
grossWeightWithUnitsString
dimension1NameString
dimension1ValueString
dimension1CodeString
dimension2NameString
dimension2ValueString
dimension2CodeString
dimension3NameString
dimension3ValueString
dimension3CodeString
parameter1NameString
parameter1ValueString
parameter2NameString
parameter2ValueString
parameter3NameString
parameter3ValueString
parameter4NameString
parameter4ValueString
parameter5NameString
parameter5ValueString
parameter6NameString
parameter6ValueString
parameter7NameString
parameter7ValueString
parameter8NameString
parameter8ValueString
parameter9NameString
parameter9ValueString
parameter10NameString
parameter10ValueString
reasonCodeString
realPercentageDiscountString
realDiscountBasePriceString
realDiscountBasePriceWithCurrencyString
vatComponent_{componentName}_{componentType}_nameStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_name
vatComponent_{componentName}_{componentType}_typeStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_type
vatComponent_{componentName}_{componentType}_amountOfTaxDoubleThese fields are returned only if module "VAT rate components" is installed. For example: vatComponent_my_tax_CITY_amountOfTax
vatComponent_{componentName}_ {componentType}_amountOfTaxWithCurrencyStringThese fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_amountOfTaxWithCurrency
advancePaymentNetTotal string Appears on prepayment invoices. The amount that customer is required to pay in advance (before the order will be confirmed, or before the goods can be shipped). Net total (the prepayment amount without tax). Numeric string, with 2 decimal places, in localized format.
advancePaymentVatTotal string Appears on prepayment invoices. The amount that customer is required to pay in advance (before the order will be confirmed, or before the goods can be shipped). Tax total (prepayment sales tax / VAT). Numeric string, with 2 decimal places, in localized format.
advancePaymentTotal string Appears on prepayment invoices. The amount that customer is required to pay in advance (before the order will be confirmed, or before the goods can be shipped). Total (the prepayment amount with tax included). Numeric string, with 2 decimal places, in localized format.
advancePaymentNetTotalWithCurrency string Same as previous, but with currency symbol prepended/appended to the amount.
advancePaymentVatTotalWithCurrency string Same as previous, but with currency symbol prepended/appended to the amount.
advancePaymentTotalWithCurrency string Same as previous, but with currency symbol prepended/appended to the amount.
netTotal Integer/Decimal Sales document net total, as an integer/float value.
vatTotal Integer/Decimal Sales document tax total, as an integer/float value.
rounding Integer/Decimal

Sales document rounding, as an integer/float value. Rounding may be manually applied by the user, or automatically applied if a rounding rule has been activated from Settings → Configuration: round to closest 0.05, round to closest 0.10, or round to full currency units.

total Integer/Decimal
netTotalWithCurrency string Sales document net total. Numeric string, with 2 decimal places, in localized format, with currency symbol prepended/appended to the amount.
vatTotalWithCurrency string Sales document tax total. Numeric string, with 2 decimal places, in localized format, with currency symbol prepended/appended to the amount.
roundingWithCurrency string Sales document rounding. Numeric string, with 2 decimal places, in localized format, with currency symbol prepended/appended to the amount.
totalWithCurrency string Sales document total (net total + tax total + optional rounding). Numeric string, with 2 decimal places, in localized format, with currency symbol prepended/appended to the amount.
totalDiscountSum string

Informative value: how much "net discount" (total amount of money) has been given to the customer in this transaction.

How this number gets calculated may depend on how the sales document was exactly created. For POS transactions, the total discount typically excludes price list discounts, and includes promotions and manual discounts.

Numeric string, with 2 decimal places, in localized format.

The "net discount" value should be used in a context where sales document calculation is based on net prices: in B2B invoicing, or in US/Canadian retail.

totalDiscountSumWithVAT string

Informative value: how much "discount with tax" (total amount of money) has been given to the customer in this transaction.

How this number gets calculated may depend on how the sales document was exactly created. For POS transactions, the total discount typically excludes price list discounts, and includes promotions and manual discounts.

Numeric string, with 2 decimal places, in localized format.

The "discount with tax" value should be used in a context where sales document calculation is based on prices with VAT, ie. in non-US retail.

totalDiscountSumWithCurrency string Same as previous, but with currency symbol prepended/appended to the amount.
totalDiscountSumWithVATWithCurrency string Same as previous, but with currency symbol prepended/appended to the amount.
totalDiscountPercent string
vatTotalsByRate array
Field nameTypeDescription
rateString
nameString
totalInteger
totalWithCurrencyString
netTotalString
netTotalWithCurrencyString
advancePaymentVatTotalsByRate array
Field nameTypeDescription
rateString
nameString
totalString
totalWithCurrencyString
reverseVatTotal string
reverseVatTotalWithCurrency string
advancePaymentReverseVatTotal string
advancePaymentReverseVatTotalWithCurrency string
sumWithWords string
totalNetWeight string
totalNetWeightWithUnits string
totalGrossWeight string
totalGrossWeightWithUnits string
totalAmount string
payments array
Field nameTypeDescription
dateString
timeString
dateTimeString
currencyString
typeString
payerNameString
infoString
sumString
paidString
changeString
sumWithCurrencyString
paidWithCurrencyString
changeWithCurrencyString
cardNumberString
cardTypeString
cardHolderString
authorizationCodeString
referenceNumberString
paidTotal string
invoiceBalance string
paidTotalWithCurrency string
invoiceBalanceWithCurrency string
baseDocuments string
currentDateTime string
currentDate string
currentTime string
remainingTaxableNetTotal string
remainingTaxableVatTotal string
remainingTaxableTotal string
remainingTaxableNetTotalWithCurrency string
remainingTaxableVatTotalWithCurrency string
remainingTaxableTotalWithCurrency string
vatComponent_{componentName}_{componentType}_name string These fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_name
vatComponent_{componentName}_{componentType}_type string These fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_type
vatComponent_{componentName}_ {componentType}_amountOfTax number These fields are returned only if module "VAT rate components" is installed.For example: vatComponent_my_tax_CITY_amountOfTax
vatComponent_{componentName}_ {componentType}_amountOfTaxWithCurrency string These fields are returned only if module "VAT rate components" is installed.
For example: vatComponent_my_tax_CITY_amountOfTaxWithCurrency
attribute_{attributeName} string For example: attribute_deliverytype_id