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 Double 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