API

API

API Token

You need API token for all queries. The token is connected with the user and the organisation, meaning that users can have multiple tokens if they have more than one organisation in ERPLY Books.

API Structure

All the methods are REST based.
Base url: https://accounting.erply.com/api
If your API token is paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs then your requests should look something like this:
https://accounting.erply.com/api/REQUEST_TYPE?token=paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs

The Content-Type header should be set to application/json or application/xml, although we strongly recommend using the JSON format. You can also specify the response type by adding either .json or .xml right before the start of the query string, for example:
https://accounting.erply.com/api/customers.json?token=paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs

GET and POST are allowed with all request types. If you’d like to delete or update an item, you have to provide the item’s id in the url like this:
https://accounting.erply.com/api/REQUEST_TYPE/ITEM_ID?token=paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs

Custom Types

To make different queries you may need to add different types (document type, currency, language etc). You have to use custom types set by ERPLY Books. See them here.

Report Generator

To access ERPLY Books’ report generator through the API, click here.

Requests

Available Request Types

GETPOSTPUTDELETEREQUEST_TYPE
(goes to URL)
Account Entriesaccount_entries
Accountsaccounts
Articlesarticles
Customerscustomers
InvoicesAPI invoices
Paymentspayments
Projectsprojects
Transaction Entriestransaction_entries

Request URL

GET, POST

GET and POST requests don’t require an ID.
URL example: https://accounting.erply.com/api/invoices?token=API_Token

PUT, DELETE

PUT and DELETE requests do require an ID.
URL example: https://accounting.erply.com/api/invoices/INVOICE_ID?token=API_Token

Methods

AccountEntries

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
incomeTypeStringINCOME_TYPE
dateFromDateFormat: 2012-12-29T00:00:00
dateToDateFormat: 2012-12-29T00:00:00
projectIdlongProject ID (internal)
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
AccountEntryInfoidlong
AccountEntryInfoaccountIdlongAccount ID – Is Set According to an Account Number
AccountEntryInfotransactionEntryIdlongTransaction ID
AccountEntryInfodescriptionStringDescription of Transaction’s row (not to mix up with Description of Transaction)
AccountEntryInfocreditSumBigDecimalCredit Sum
AccountEntryInfodebitSumBigDecimalDebit Sum
AccountEntryInfoopDateDateTransaction Date
AccountEntryInfocurrencyCodeStringCURRENCY
AccountEntryInfotypeCodeStringType of Transaction (must be left empty)
AccountEntryInfoaccountNumberStringAccount Number

Accounts

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
dateStringFormat: 2012-12-29T00:00:00
dateForProfitStringFormat: 2012-12-29T00:00:00
projectIdlongProject ID (internal)
showOnlyIncomebooleanShow Only Profit and Loss Statement Accounts
removeAutomaticTransactionsbooleanRemove Year Ending Transactions
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
AccountInfoidlongAccount ID (internal)
AccountInfonumberStringAccount Number
AccountInfonameStringAccount Name
AccountInfosaldoSumBigDecimalAccount Saldo Sum
AccountInfoincomeTypeCodeStringINCOME_TYPE
AccountInfobalanceTypeCodeStringBALANCE_TYPE
AccountInfocashFlowTypeCodeStringCASH_FLOW_TYPE
AccountInfotypeCodeStringACCOUNT_TYPE
AccountInfodescriptionStringAccount Description
AccountInfodefaultPercentBigDecimalAccount Default Percent
AccountInfodefaultTaxFreeSumBigDecimal
AccountInfocurrencyCodeStringCURRENCY
AccountInfopartnerAccountIdlongAccount ID (from ERPLY)
AccountInfoaccountIdentifierString

Tax Rates

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
TaxRateInfoidlongTax Rate ID (internal)
TaxRateInfodescriptionStringTax Rate Description
TaxRateInfopercentBigDecimalTax Percent
TaxRateInfotypeCodeStringSee TAX_RATE types
TaxRateInfopartnerTaxRateIdlongTax Rate ID (from ERPLY)
TaxRateInfodebitAccountIdlongTax Debit Account ID
TaxRateInfocreditAccountIdlongTax Credit Account ID

Articles

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
keywordStringPart of Article Name
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
ArticleInfoidlongArticle ID (internal)
ArticleInfonameStringArticle Name
ArticleInfocodeStringArticle Code
ArticleInfounitCodeStringArticle Unit Code
ArticleInfoexpenseAccountIdlongArticle Expense Accound ID
ArticleInfoassetAccountIdlongAsset Account ID
ArticleInforevenueAccountIdlongArticle Revenue Account ID
ArticleInfobasePriceBigDecimalArticle Price
ArticleInfoextraChargeBigDecimalArticle Extra Charge Added
ArticleInfovatPercentBigDecimalArticle VAT Percent (20, not 0.2)
ArticleInfoinfoStringArticle Info
ArticleInfotypeCodeStringARTICLE_TYPE
ArticleInfodebitTurnoverBigDecimalArticle Debit Turnover
ArticleInfocreditTurnoverBigDecimalArticle Credit Turnover
ArticleInfosaldoBigDecimalArticle Saldo
ArticleInfocostOfGoodsSoldBigDecimal
ArticleInfopartnerArticleIdlongArticle ID (from ERPLY)
ArticleInfotaxRateIdlongArticle Tax Rate ID (internal)
ArticleInfolifespanValueBigDecimalAsset Lifespan Value

Customers

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
keywordStringPart of Customer Name/Code
sortByString
noSuppliersbooleanDon’t Show Suppliers
includeEmployeesbooleanInclude Employees
noCustomersbooleanDon’t Show Customers
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
CustomerInfoidlongCustomer ID (internal)
CustomerInfonameStringCustomer Name
CustomerInfocodeStringCustomer Code
CustomerInforegistrationCodeStringCustomer Registration Code
CustomerInfolegalAddressStringCustomer Legal Address
CustomerInfolegalCountryCodeStringCustomer Country Code
CustomerInfolegalPostcodeStringCustomer Legal Postcode
CustomerInfodeadlineDaysintDays to Deadline
CustomerInfodiscountBigDecimalCustomer Discont Percent
CustomerInfopenaltyBigDecimalCustomer Penalty Percent
CustomerInforeferenceNumberStringCustomer Reference Number
CustomerInfosupplierReferenceNumberStringSupplier Reference Number
CustomerInfovatNumberStringCustomer VAT Nr
CustomerInfoactualAddressStringCustomer Actual Address
CustomerInfoactualPostcodeStringCustomer Actual Postcode
CustomerInfoactualCountryCodeStringCustomer Actual Country Code
CustomerInfoemailStringCustomer E-mail
CustomerInfophone1StringCustomer phone1
CustomerInfophone2StringCustomer phone2
CustomerInfofaxStringCustomer fax
CustomerInfowebsiteStringCustomer Website
CustomerInfocontactPersonIdlongContact Person ID
CustomerInfocontactPersonNameStringContact Person Name
CustomerInfocontactPersonEmailStringContact Person E-mail
CustomerInfocontactPersonPhoneStringContact Person Phone
CustomerInfoinfoStringCustomer Info
CustomerInfopartnerCustomerIdlongCustomer ID (from ERPLY)
CustomerInfopartnerSupplierIdlongSupplier ID (from ERPLY)
CustomerInfobankNameStringBank Name
CustomerInfobankAccountNumberStringBank Account Number
CustomerInfobankIbanStringBank IBAN
CustomerInfobankSwiftStringBank Swift
CustomerInfobankIdentificatorStringBank Identificatior
CustomerInfocustomerbooleanIs Customer?
CustomerInfosupplierbooleanIs Supplier?
CustomerInfoentityTypeCodeStringENTITY_TYPE

Examples

GET

Using this request with the optional keyword parameter:https://accounting.erply.com/api/customers.json?token=paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs&keyword=kuusepuu
Returns clients in an array.

PUT

Used to update data.
The id in the URL and JSON component must match. Both id and name are required fields.
https://accounting.erply.com/api/customers/992205.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

JSON: {"id":992205,"name":"Aita-Leida Kuusepuu", "legalAddress":"Uus Aadress 14"}

POST

Used to create new customers.
Id must be 0! All id’s are generated automatically.
https://accounting.erply.com/api/customers.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

JSON: {"id":0, "name":"Aita-Leida Jõgi", "code":null, "registrationCode":null, "legalAddress":"Uus Aadress 14", "legalCountryCode":null, "legalPostcode":null, "deadlineDays":0, "discount":0.0000, "penalty":0.0000, "referenceNumber":null, "supplierReferenceNumber":null, "vatNumber":null, "actualAddress":null, "actualPostcode":null, "actualCountryCode":null, "email":null, "phone1":null, "phone2":null, "fax":null, "website":null, "contactPersonId":0, "contactPersonName":null, "contactPersonEmail":null, "contactPersonPhone":null, "info":null, "partnerCustomerId":0, "partnerSupplierId":0, "bankName":null, "bankAccountNumber":null, "bankIban":null, "bankSwift":null, "bankIdentificator":null, "customer":false, "supplier":false, "entityTypeCode":"ENTITY_TYPE_LEGAL"}

Invoices

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
dateFromStringFormat: 2012-12-29T00:00:00
dateToStringFormat: 2012-12-29T00:00:00
transactionDateFromStringFormat: 2012-12-29T00:00:00
transactionDateToStringFormat: 2012-12-29T00:00:00
customerIdlong
keywordString
userIdlong
descriptionString
documentTypeStringDOCUMENT_TYPE
projectIdlong
numberString
sortString
isPaidInvolvedboolean
isOverdueInvolvedboolean
preventWaybillsboolean
searchUnpaidWithCertainDateboolean
dontCalculateToLocalCurrencyboolean
showOnlyPrepaymentsboolean
documentStatusTypeStringDOCUMENT_STATUS_TYPE
startint
limitintby default 100

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
InvoiceInfoidlong
InvoiceInfonumberStringInvoice Number
InvoiceInfocustomerIdlongCustomer id
InvoiceInfocustomerNameStringCustomer Name
InvoiceInfodateDateInvoice Date
InvoiceInfocurrencyCodeStringCURRENCY
InvoiceInfodiscountPercentBigDecimalDiscount Percent
InvoiceInfolanguageCodeStringLanguage Code
InvoiceInfovatPercentBigDecimalVAT Percent (20, not 0.2)
InvoiceInforeferenceNumberStringReference Number
InvoiceInfodeadlineDateDateDeadline Date
InvoiceInfocreatorNameStringCreator Name
InvoiceInfomodifierNameStringModifier Name
InvoiceInfosumNoVatBigDecimalSum without VAT
InvoiceInfotaxSumBigDecimalVAT Sum
InvoiceInfosumWithVatBigDecimalSum with VAT
InvoiceInfosumPaidBigDecimalSum Paid
InvoiceInfosumLeftToPayBigDecimalSum left to pay
InvoiceInfoinvoiceTextsInfoIdlongTemplate id
InvoiceInfopenaltyPercentBigDecimalPenalty Percent
InvoiceInforoundedSumBigDecimalRounded Sum
InvoiceInfovatTotalRoundedSumBigDecimalVAT rounded sum
InvoiceInfocurrencyRateBigDecimalCurrency Rate
InvoiceInfotypeCodeStringDOCUMENT_TYPE
InvoiceInfohashStringHash that can be used to query for invoice from third parties
InvoiceInfoprojectIdlongProject ID (Margn internal ID)
InvoiceInfocodeStringCode. For sales invoice S14…, for purchase P14…
InvoiceInfotransactionDateDateDate of Transactio
InvoiceInfonoteStringAdditional note for the invoice
InvoiceInfoprintedInfoStringPrinted Info
InvoiceInforeferringIdentifierStringExternal link or other identifier
InvoiceInfoactionId
InvoiceInfopartnerDocumentIdlongDocument ID from ERPLY
InvoiceInfoactivityIdlong
InvoiceInfodocumentStatusTypeCodeStringDOCUMENT_STATUS_TYPE
InvoiceInfovatTotalsByTaxRate
InvoiceInfodiscountSum
InvoiceInforowsList <InvoiceArticleInfo>Array of invoice rows (InvoiceArticleInfo)
InvoiceInfopaymentsList <PaymentInfo>
InvoiceInfocustomerCustomerInfo

Examples

GET

Either id or documentType is always required!
Using id: https://accounting.erply.com/api/invoices/2575151.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr
Returns a “rows” array that contains all of the articles from this id.
Using documentType: https://accounting.erply.com/api/invoices.json? token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr&documentType=DOCUMENT_SELL
In this case, “rows”=null.

DELETE

Id is required!
https://accounting.erply.com/api/invoices/2575151.json? token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

PUT

Used to replace data. All previous data is deleted and replaced with data from AccountEntryInfo.
Must have an id at the end of the URL!
https://accounting.erply.com/api/invoices/2575151.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

JSON: {"id":2575151, "number":"3", "customerId":720951, "customerName":null, "date":"2015-02-25T11:42:08", "currencyCode":"CURRENCY_EUR", "discountPercent":0.000000, "languageCode":"LANGUAGE_ET", "vatPercent":0.0000, "referenceNumber":"", "deadlineDate":"2015-03-04T11:42:08", "creatorName":null, "modifierName":null, "sumNoVat":0.77, "taxSum":null, "sumWithVat":0.92400000, "sumPaid":1.200000000000, "sumLeftToPay":null, "invoiceTextsInfoId":31516, "penaltyPercent":0.5000, "roundedSum":0, "vatTotalRoundedSum":0, "currencyRate":null, "typeCode":"DOCUMENT_SELL", "hash":"444d22ca30249a93b2db424ba976299a", "projectId":0, "code":"S15020002", "transactionDate":"2015-02-25T12:00:00", "note":"", "printedInfo":"", "referringIdentifier":"", "actionId":0, "partnerDocumentId":0, "activityId":0, "documentStatusTypeCode":"STATUS_CONFIRMED", "vatTotalsByTaxRate":null, "discountSum":null, "rows":[{"id":0, "articleId":118240, "articleName":"Kohv", "unitCode":null, "code":"", "quantity":1.000000, "price":1.000000, "discount":23.300000, "extraCharge":0.000000, "vatPercent":20.000000, "vatAccountId":583312, "expenseAccountId":583344, "revenueAccountId":583335, "debtAccountId":583291, "transactionEntryId":7710727, "transactionDate":"2015-02-25T12:00:00", "invoiceId":2575151, "customerId":0, "customerName":null, "invoiceNumber":null, "registrationCode":null, "referringIdentifier":null, "typeCode":"ARTICLE_ROW_SELL", "projectId":0, "taxRateId":31949, "activityItemId":0, "residualValue":0.000000}], "payments":null, "customer":null}

POST

Id must be 0 in all cases! All id’s are automatically generated.https://accounting.erply.com/api/invoices.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr
JSON: {"id":0, "number":null, "customerId":0, "customerName":"NEW CUSTOMER NAME LTD", "date":"2015-02-25T11:42:08", "currencyCode":"CURRENCY_EUR", "discountPercent":0.000000, "languageCode":"LANGUAGE_ET", "vatPercent":0.0000, "referenceNumber":"", "deadlineDate":"2015-03-04T11:42:08", "creatorName":null, "modifierName":null, "sumNoVat":0.77, "taxSum":null, "sumWithVat":0.92400000, "sumPaid":1.200000000000, "sumLeftToPay":null, "invoiceTextsInfoId":31516, "penaltyPercent":0.5000, "roundedSum":0, "vatTotalRoundedSum":0, "currencyRate":null, "typeCode":"DOCUMENT_SELL", "hash":"444d22ca30249a93b2db424ba976299a", "projectId":0, "code":"S15020002", "transactionDate":"2015-02-25T12:00:00", "note":"", "printedInfo":"", "referringIdentifier":"", "actionId":0, "partnerDocumentId":0, "activityId":0, "documentStatusTypeCode":"STATUS_CONFIRMED", "vatTotalsByTaxRate":null, "discountSum":null, "rows":[{"id":0, "articleId":118240, "articleName":"Kohv", "unitCode":null, "code":"", "quantity":1.000000, "price":1.000000, "discount":23.300000, "extraCharge":0.000000, "vatPercent":20.000000, "vatAccountId":0, "expenseAccountId":0, "revenueAccountId":583335, "debtAccountId":0, "transactionEntryId":0, "transactionDate":"2015-02-25T12:00:00", "invoiceId":2575151, "customerId":0, "customerName":null, "invoiceNumber":null, "registrationCode":null, "referringIdentifier":null, "typeCode":"ARTICLE_ROW_SELL", "projectId":0, "taxRateId":31949, "activityItemId":0, "residualValue":0.000000}], "payments":null, "customer":null}

InvoiceArticleInfo

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
documentIdlong
expenseAccountIdlong
dateFromDateFormat: 2012-12-29T00:00:00
dateToDateFormat: 2012-12-29T00:00:00
projectIdlong
userIdlong
customerIdlong
descriptionString
documentTypeStringDOCUMENT_TYPE
articleIdlong
rowTypeString
articleTypeString
getReimbursementboolean
getFixedAssetsboolean
sortString
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
InvoiceArticleInfoidlong
InvoiceArticleInfoarticleIdlongArticle ID (internal)
InvoiceArticleInfoarticleNameStringArticle Name
InvoiceArticleInfounitCodeStringUNIT
InvoiceArticleInfocodeString
InvoiceArticleInfoquantityBigDecimalQuantity
InvoiceArticleInfopriceBigDecimalPrice of Article
InvoiceArticleInfodiscountBigDecimalDiscount Percent
InvoiceArticleInfoextraChargeBigDecimalExtra Charge Percent
InvoiceArticleInfovatPercentBigDecimalVAT Percent (20, not 0.2)
InvoiceArticleInfovatAccountIdlongVAT Account ID (internal)
InvoiceArticleInfoexpenseAccountIdlongExpense Account ID (internal)
InvoiceArticleInforevenueAccountIdlongRevenue Account ID (internal)
InvoiceArticleInfodebtAccountIdlongDebt Account ID (internal)
InvoiceArticleInfotransactionEntryIdlongTransaction ID (internal)
InvoiceArticleInfotransactionDateDateFormat: 2012-12-29T00:00:00
InvoiceArticleInfoinvoiceIdlongInvoice ID (internal)
InvoiceArticleInfocustomerIdlongCustomer ID (internal)
InvoiceArticleInfocustomerNameStringCustomer Name
InvoiceArticleInfoinvoiceNumberStringInvoice Nr
InvoiceArticleInforegistrationCodeStringRegistration Code
InvoiceArticleInforeferringIdentifierString
InvoiceArticleInfotypeCodeStringARTICLE_ROW_TYPE
InvoiceArticleInfoprojectIdlongProject ID (internal)
InvoiceArticleInfotaxRateIdlongTax Rate ID (internal)

Payments

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
dateFromStringFormat: 2012-12-29T00:00:00
dateToStringFormat: 2012-12-29T00:00:00
entityIdlong
isIncomeboolean
getEverythingboolean
documentIdlong
typeString
paymentTypeStringPAYMENT_TYPE
showOnlyPrepaymentsboolean
documentStatusTypeString
accountIdlongAccount ID (internal)
projectIdlongProject ID (internal)
descriptionStringPayment Description
sortByString
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
PaymentInfoidlongPayment ID (internal)
PaymentInfoopDateDateFormat: 2012-12-29T00:00:00
PaymentInfoinvoiceIdlongInvoice ID (internal)
PaymentInfotransactionIdentifierString
PaymentInfotransactionEntryIdlong
PaymentInfosumPaidBigDecimalSum Paid
PaymentInfosumWithVatBigDecimalSum With VAT
PaymentInfocurrencyCodeStringCurrency Code
PaymentInfotypeCodeStringPAYMENT_TYPE
PaymentInfoaccountIdlongAccount ID
PaymentInfocustomerNameStringCustomer Name
PaymentInfonumberString
PaymentInforeferenceNumberStringReference Number
PaymentInfoarchivingIdStringArchiving ID
PaymentInfonoteStringNote
PaymentInfocodeStringCode
PaymentInfobadDebtbooleanUndoubtful income
PaymentInfopartnerPaymentIdlongPayment ID (from ERPLY)
PaymentInfocustomerIdlongCustomer ID (internal)
PaymentInfooriginalSumBigDecimalOriginal Sum
PaymentInfopartnerDocumentIdlongDocument ID (from ERPLY)
PaymentInfoimportedbooleanIs imported from EPRLY
PaymentInfodocumentStatusTypeCodeStringDOCUMENT_STATUS_TYPE
PaymentInfostatusChangeDatetimeDateDate of change of Documen’ts Status
PaymentInfocurrencyRate
PaymentInfoprojectIdlongProject ID (internal)
PaymentInfoentityName
PaymentInfoparentPaymentId

Examples

GET

PaymentType is required!
Using id: https://accounting.erply.com/api/payments.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr&paymentType=INVOICE_PAYMENT

DELETE

Id is required!
https://accounting.erply.com/api/payments/2575151.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

PUT

Used to update data. Id is required.
https://accounting.erply.com/api/payments/2575151.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

JSON: {"id":2749305, "opDate":"2014-04-14T12:00:00", "invoiceId":2622468, "transactionIdentifier":null, "transactionEntryId":7782152, "sumPaid":10.000000, "sumWithVat":null, "currencyCode":"CURRENCY_EUR", "typeCode":"INVOICE_PAYMENT", "accountId":583287, "customerName":null, "number":null, "referenceNumber":null, "archivingId":"", "note":"", "code":null, "badDebt":false, "partnerPaymentId":477, "customerId":725113, "originalSum":10.000000, "partnerDocumentId":0, "imported":true, "documentStatusTypeCode":"STATUS_CONFIRMED", "statusChangeDatetime":"2014-04-14T12:00:00", "currencyRate":null, "projectId":0, "entityName":null, "parentPaymentId":0}

POST

Id must be 0 in all cases! All id’s are automatically generated.https://accounting.erply.com/api/payments.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

JSON:
{
"id":0, "opDate":"2012-09-26T12:00:00", "invoiceId":2460653, "transactionIdentifier":null, "transactionEntryId":7665466, "sumPaid":120.000000, "sumWithVat":null, "currencyCode":"CURRENCY_EUR", "typeCode":"INVOICE_PAYMENT", "accountId":583287, "customerName":null, "number":null, "referenceNumber":null, "archivingId":"2012092600236540", "note":"Invoice nr 2", "code":null, "badDebt":false, "partnerPaymentId":0, "customerId":700373, "originalSum":435.560000, "partnerDocumentId":0, "imported":false, "documentStatusTypeCode":"STATUS_CONFIRMED", "statusChangeDatetime":"2012-09-26T12:00:00", "currencyRate":null, "projectId":0, "entityName":"Client 2", "parentPaymentId":0
}

 

Projects

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
ProjectInfoidlongProject ID (internal)
ProjectInfonameStringProject Name
ProjectInfovalidFromDatetimeDateProject Valid From (Format: 2012-12-29T00:00:00)
ProjectInfovalidToDatetimeDateProject Valid To (Format: 2012-12-29T00:00:00)
ProjectInfodescriptionStringDescription
ProjectInfoaffirmedbooleanAffirmed
ProjectInfopartnerProjectIdlongProject ID (external)
ProjectInfomainProjectIdlongParent Project ID

TransactionEntries

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
typeCodeString
dateFromDateFormat: 2012-12-29T00:00:00
dateToDateFormat: 2012-12-29T00:00:00
transactionDateFromDateFormat: 2012-12-29T00:00:00
transactionDateToDateFormat: 2012-12-29T00:00:00
descriptionStringTransaction Code or Description
projectIdlongProject ID (internal)
documentIdlongDocument ID (internal)
sortString
startint
limitint

Response

FIELD NAMETYPEDESCRIPTIONREQUIRED
TransactionEntryInfoidlongTransaction ID (Internal)
TransactionEntryInfoopDateDateFormat: 2012-12-29T00:00:00
TransactionEntryInfocodeStringRegistration Code
TransactionEntryInfodescriptionStringDescription of Transaction
TransactionEntryInfosumBigDecimalTotal Sum of Transaction’s rows – filled automatically
TransactionEntryInfotypeCodeStringTRANSACTION_TYPE
TransactionEntryInfoprojectIdlongProject ID if necessary
TransactionEntryInfoaccountEntriesList <AccountEntryInfo>Rows of Transaction in one Object

Invoices

If you want to send invoices to ERPLY Books, then you don’t have to do an integration. Use purchase inbox to send invoices. You can find that module in “Purchase” > “Purchase inbox”. Use email address from “Settings” > “Configuration” to send emails to purchase inbox. You can find more information here.

Reports

Parameters for GET Queries

PARAMETER NAMETYPEDESCRIPTIONREQUIRED
dateFromStringFormat: 2012-12-29T00:00:00
isOverdueboolean
getByContactboolean
getEverythingboolean
showCustomersboolean
documentIdStringProject ID (internal)
keywordString
typeOfPrintoutString
currencyCodeStringCURRENCY
getByTransactionDateboolean
partnerCustomerIdString
startint
limitint

 

Response

 

FIELD NAMETYPEDESCRIPTIONREQUIRED
APIAgedDebtsInfopayerIdlongPayment ID (internal)
APIAgedDebtsInfonameStringpayer name
APIAgedDebtsInforegistrationCodeStringRegistration code
APIAgedDebtsInfovatNumberStringVAT nr
APIAgedDebtsInfocountryStringpayer country
APIAgedDebtsInfoemailStringpayer email
APIAgedDebtsInfotypeCodeStringType of Transaction
APIAgedDebtsInfoprepaymentsintPrepayments made by payer
APIAgedDebtsInfototalDebtintTotal number of invoices that aren’t payed
APIAgedDebtsInfonotYetDueDebtintTotal number of invoices that aren’t gone over deadline but are unpaid
APIAgedDebtsInfoaged7intNumber of invoices that are gone over for less than 8 days
APIAgedDebtsInfoaged15intNumber of invoices that are gone over for more than 7days but less than 16 days
APIAgedDebtsInfoaged30intNumber of invoices that are gone over for more than 15days but less than 31 days
APIAgedDebtsInfoaged60intNumber of invoices that are gone over for more than 30 days but less than 61 days
APIAgedDebtsInfoaged90intNumber of invoices that are gone over for more than 60 days but less than 91 days
APIAgedDebtsInfoaged180intNumber of invoices that are gone over for more than 90 days but less than 180 days
APIAgedDebtsInfoaged360intNumber of invoices that are gone over for more than 180 days but less than 361 days
APIAgedDebtsInfoagedAllOtherintNumber of invoices that are gone over for more than 360 days
APIAgedDebtsInfolastMonth0intNumber of invoices that are gone over for less than 1 Month
APIAgedDebtsInfolastMonth1intNumber of invoices that are gone over for 1 to 2 months
APIAgedDebtsInfolastMonth2intNumber of invoices that are gone over for 2 to 3 months
APIAgedDebtsInfolastMonth3intNumber of invoices that are gone over for 3 to 4 months
APIAgedDebtsInfolastMonth4intNumber of invoices that are gone over for 4 to 5 months
APIAgedDebtsInfolastMonthAllOtherintNumber of invoices that are gone over for more than 5 months

 

EXAMPLE:

GET

https://accounting.erply.com/api/reports/aged.json?token=dujfrhkg935vs2t4kmbgmrrpck61qubsvbbjf3qr

 

JSON:

{"items":[{"id":3136916,"customerId":3136916,"partnerCustomerId":"0","overdueInvoiceDays":0,"daysToDeadline":7,"invoiceId":0,"customerIds":[3136916],"payerId":0,"name":"CUSTOMERNAME","registrationCode":null,"vatNumber":null,"country":null,"email":null,"typeCode":null,"prepayments":0,"totalDebt":38.500000,"notYetDueDebt":38.500000,"aged7":0,"aged15":0,"aged30":0,"aged60":0,"aged90":0,"aged180":0,"aged360":0,"agedAllOther":0,"lastMonth0":38.500000,"lastMonth1":0,"lastMonth2":0,"lastMonth3":0,"lastMonth4":0,"lastMonthAllOther":0},{"id":3137841,"customerId":3137841,"partnerCustomerId":"0","overdueInvoiceDays":6,"daysToDeadline":7,"invoiceId":0,"customerIds":[3137841],"payerId":0,"name":"CUSTOMERNAME2","registrationCode":"","vatNumber":"","country":"","email":"","typeCode":null,"prepayments":0,"totalDebt":26.000000,"notYetDueDebt":13.000000,"aged7":13.000000,"aged15":0,"aged30":0,"aged60":0,"aged90":0,"aged180":0,"aged360":0,"agedAllOther":0,"lastMonth0":26.000000,"lastMonth1":0,"lastMonth2":0,"lastMonth3":0,"lastMonth4":0,"lastMonthAllOther":0},{"id":3139631,"customerId":3139631,"partnerCustomerId":"0","overdueInvoiceDays":5,"daysToDeadline":7,"invoiceId":0,"customerIds":[3139631],"payerId":0,"name":" CUSTOMERNAME3","registrationCode":"","vatNumber":"","country":"","email":"","typeCode":null,"prepayments":0,"totalDebt":12.000000,"notYetDueDebt":11.000000,"aged7":1.000000,"aged15":0,"aged30":0,"aged60":0,"aged90":0,"aged180":0,"aged360":0,"agedAllOther":0,"lastMonth0":12.000000,"lastMonth1":0,"lastMonth2":0,"lastMonth3":0,"lastMonth4":0,"lastMonthAllOther":0},{"id":3139597,"customerId":3139597,"partnerCustomerId":"0","overdueInvoiceDays":5,"daysToDeadline":7,"invoiceId":0,"customerIds":[3139597],"payerId":0,"name":"CUSTOMERNAME4","registrationCode":"","vatNumber":"","country":"","email":"","typeCode":null,"prepayments":0,"totalDebt":8.800000,"notYetDueDebt":0,"aged7":8.800000,"aged15":0,"aged30":0,"aged60":0,"aged90":0,"aged180":0,"aged360":0,"agedAllOther":0,"lastMonth0":8.800000,"lastMonth1":0,"lastMonth2":0,"lastMonth3":0,"lastMonth4":0,"lastMonthAllOther":0}],"totalCount":4}

 

ATTACHMENTS

POST

URL: https://accounting.erply.com/api/attachments?token=API_Token
Json:
{&quot;documentId&quot;:DocumentID,&quot;filename&quot;:&quot;FileName.png&quot;,&quot;base64&quot;:&quot;data:image/png;base64,XXXXX&quot;}
To attach file to document what has document ID of DocumentID. Filename is the filename the file is
saved as “Filename.png”. XXXXX is where you add file in base64 format.

 

RESPONSE

 

FIELD NAMETYPEDESCRIPTIONREQUIRED
idlongAttachment ID (internal)
documentIdlongDocument ID (internal)
partnerDocumentIdStringDocument ID (From ERPLY)
attributeIdlong
filenameStringName of the file
base64StringFile in base 64 formating