API in ERPLY Books
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://api.erplybooks.com/api
If your API token is paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs
then your requests should have header:
X-API-TOKEN: paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs
.
Another alternative is using the url query parameter (less secure), if necessary (to test some requests in the browser, for example) by adding ?token=paejtblf2q2j6jvt4pscbm4jc2nsicjhmtqm9bqs
to the end of the request URL.
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://api.erplybooks.com/api/customers.json
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://api.erplybooks.com/api/REQUEST_TYPE/ITEM_ID
Custom Types with API
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 through the API
API Requests
Available Request Types with API
GET | POST | PUT | DELETE | REQUEST_TYPE (goes to URL) | |
---|---|---|---|---|---|
Account Entries | ![]() | account_entries | |||
Accounts | ![]() | ![]() | ![]() | ![]() | accounts |
Articles | ![]() | ![]() | ![]() | ![]() | articles |
Customers | ![]() | customers | |||
Invoices | ![]() | ![]() | ![]() | ![]() | invoices |
Payments | ![]() | ![]() | ![]() | ![]() | payments |
Projects | ![]() | ![]() | ![]() | ![]() | projects |
Transaction Entries | ![]() | ![]() | ![]() | ![]() | transaction_entries |
API Methods
AccountEntries
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
incomeType | String | INCOME_TYPE | |
dateFrom | Date | Format: 2012-12-29T00:00:00 | |
dateTo | Date | Format: 2012-12-29T00:00:00 | |
projectId | long | Project ID (internal) | |
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
AccountEntryInfo | id | long | ||
AccountEntryInfo | accountId | long | Account ID – Is Set According to an Account Number | ![]() |
AccountEntryInfo | transactionEntryId | long | Transaction ID | |
AccountEntryInfo | description | String | Description of Transaction’s row (not to mix up with Description of Transaction) | ![]() |
AccountEntryInfo | creditSum | BigDecimal | Credit Sum | ![]() |
AccountEntryInfo | debitSum | BigDecimal | Debit Sum | ![]() |
AccountEntryInfo | opDate | Date | Transaction Date | ![]() |
AccountEntryInfo | currencyCode | String | CURRENCY | ![]() |
AccountEntryInfo | typeCode | String | Type of Transaction (must be left empty) | |
AccountEntryInfo | accountNumber | String | Account Number |
Accounts
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
date | String | Format: 2012-12-29T00:00:00 | |
dateForProfit | String | Format: 2012-12-29T00:00:00 | |
projectId | long | Project ID (internal) | |
showOnlyIncome | boolean | Show Only Profit and Loss Statement Accounts | |
removeAutomaticTransactions | boolean | Remove Year Ending Transactions | |
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
AccountInfo | id | long | Account ID (internal) | |
AccountInfo | number | String | Account Number | ![]() |
AccountInfo | name | String | Account Name | ![]() |
AccountInfo | saldoSum | BigDecimal | Account Saldo Sum | |
AccountInfo | incomeTypeCode | String | INCOME_TYPE | ![]() |
AccountInfo | balanceTypeCode | String | BALANCE_TYPE | ![]() |
AccountInfo | cashFlowTypeCode | String | CASH_FLOW_TYPE | ![]() |
AccountInfo | typeCode | String | ACCOUNT_TYPE | ![]() |
AccountInfo | description | String | Account Description | |
AccountInfo | defaultPercent | BigDecimal | Account Default Percent | |
AccountInfo | defaultTaxFreeSum | BigDecimal | ||
AccountInfo | currencyCode | String | CURRENCY | ![]() |
AccountInfo | partnerAccountId | long | Account ID (from ERPLY) | |
AccountInfo | accountIdentifier | String |
Tax Rates
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
TaxRateInfo | id | long | Tax Rate ID (internal) | |
TaxRateInfo | description | String | Tax Rate Description | ![]() |
TaxRateInfo | percent | BigDecimal | Tax Percent | ![]() |
TaxRateInfo | typeCode | String | See TAX_RATE types | ![]() |
TaxRateInfo | partnerTaxRateId | long | Tax Rate ID (from ERPLY) | |
TaxRateInfo | debitAccountId | long | Tax Debit Account ID | |
TaxRateInfo | creditAccountId | long | Tax Credit Account ID |
Articles
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
keyword | String | Part of Article Name | |
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
ArticleInfo | id | long | Article ID (internal) | |
ArticleInfo | name | String | Article Name | ![]() |
ArticleInfo | code | String | Article Code | |
ArticleInfo | unitCode | String | Article Unit Code | |
ArticleInfo | expenseAccountId | long | Article Expense Accound ID | |
ArticleInfo | assetAccountId | long | Asset Account ID | |
ArticleInfo | revenueAccountId | long | Article Revenue Account ID | |
ArticleInfo | basePrice | BigDecimal | Article Price | |
ArticleInfo | extraCharge | BigDecimal | Article Extra Charge Added | |
ArticleInfo | vatPercent | BigDecimal | Article VAT Percent (20, not 0.2) | ![]() |
ArticleInfo | info | String | Article Info | |
ArticleInfo | typeCode | String | ARTICLE_TYPE | ![]() |
ArticleInfo | debitTurnover | BigDecimal | Article Debit Turnover | |
ArticleInfo | creditTurnover | BigDecimal | Article Credit Turnover | |
ArticleInfo | saldo | BigDecimal | Article Saldo | |
ArticleInfo | costOfGoodsSold | BigDecimal | ||
ArticleInfo | partnerArticleId | long | Article ID (from ERPLY) | |
ArticleInfo | taxRateId | long | Article Tax Rate ID (internal) | ![]() |
ArticleInfo | lifespanValue | BigDecimal | Asset Lifespan Value |
Customers
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
keyword | String | Part of Customer Name/Code | |
sortBy | String | ||
noSuppliers | boolean | Don’t Show Suppliers | |
includeEmployees | boolean | Include Employees | |
noCustomers | boolean | Don’t Show Customers | |
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
CustomerInfo | id | long | Customer ID (internal) | |
CustomerInfo | name | String | Customer Name | ![]() |
CustomerInfo | code | String | Customer Code | |
CustomerInfo | registrationCode | String | Customer Registration Code | |
CustomerInfo | legalAddress | String | Customer Legal Address | |
CustomerInfo | legalCountryCode | String | Customer Country Code | |
CustomerInfo | legalPostcode | String | Customer Legal Postcode | |
CustomerInfo | deadlineDays | int | Days to Deadline | |
CustomerInfo | discount | BigDecimal | Customer Discont Percent | |
CustomerInfo | penalty | BigDecimal | Customer Penalty Percent | |
CustomerInfo | referenceNumber | String | Customer Reference Number | |
CustomerInfo | supplierReferenceNumber | String | Supplier Reference Number | |
CustomerInfo | vatNumber | String | Customer VAT Nr | |
CustomerInfo | actualAddress | String | Customer Actual Address | |
CustomerInfo | actualPostcode | String | Customer Actual Postcode | |
CustomerInfo | actualCountryCode | String | Customer Actual Country Code | |
CustomerInfo | String | Customer E-mail | ||
CustomerInfo | phone1 | String | Customer phone1 | |
CustomerInfo | phone2 | String | Customer phone2 | |
CustomerInfo | fax | String | Customer fax | |
CustomerInfo | website | String | Customer Website | |
CustomerInfo | contactPersonId | long | Contact Person ID | |
CustomerInfo | contactPersonName | String | Contact Person Name | |
CustomerInfo | contactPersonEmail | String | Contact Person E-mail | |
CustomerInfo | contactPersonPhone | String | Contact Person Phone | |
CustomerInfo | info | String | Customer Info | |
CustomerInfo | partnerCustomerId | long | Customer ID (from ERPLY) | |
CustomerInfo | partnerSupplierId | long | Supplier ID (from ERPLY) | |
CustomerInfo | bankName | String | Bank Name | |
CustomerInfo | bankAccountNumber | String | Bank Account Number | |
CustomerInfo | bankIban | String | Bank IBAN | |
CustomerInfo | bankSwift | String | Bank Swift | |
CustomerInfo | bankIdentificator | String | Bank Identificatior | |
CustomerInfo | customer | boolean | Is Customer? | |
CustomerInfo | supplier | boolean | Is Supplier? | |
CustomerInfo | entityTypeCode | String | ENTITY_TYPE |
Examples
GET
Using this request with the optional keyword parameter:https://api.erplybooks.com/api/customers
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://api.erplybooks.com/api/customers/992205
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://api.erplybooks.com/api/customers
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 NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
dateFrom | String | Format: 2012-12-29T00:00:00 | |
dateTo | String | Format: 2012-12-29T00:00:00 | |
transactionDateFrom | String | Format: 2012-12-29T00:00:00 | |
transactionDateTo | String | Format: 2012-12-29T00:00:00 | |
customerId | long | ||
keyword | String | ||
userId | long | ||
description | String | ||
documentType | String | DOCUMENT_TYPE | ![]() |
projectId | long | ||
number | String | ||
sort | String | ||
isPaidInvolved | boolean | ||
isOverdueInvolved | boolean | ||
preventWaybills | boolean | ||
searchUnpaidWithCertainDate | boolean | ||
dontCalculateToLocalCurrency | boolean | ||
showOnlyPrepayments | boolean | ||
documentStatusType | String | DOCUMENT_STATUS_TYPE | |
start | int | ||
limit | int | by default 100 |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
InvoiceInfo | id | long | ||
InvoiceInfo | number | String | Invoice Number | ![]() |
InvoiceInfo | customerId | long | Customer id | |
InvoiceInfo | customerName | String | Customer Name | ![]() |
InvoiceInfo | date | Date | Invoice Date | ![]() |
InvoiceInfo | currencyCode | String | CURRENCY | ![]() |
InvoiceInfo | discountPercent | BigDecimal | Discount Percent | |
InvoiceInfo | languageCode | String | Language Code | ![]() |
InvoiceInfo | vatPercent | BigDecimal | VAT Percent (20, not 0.2) | |
InvoiceInfo | referenceNumber | String | Reference Number | |
InvoiceInfo | deadlineDate | Date | Deadline Date | |
InvoiceInfo | creatorName | String | Creator Name | |
InvoiceInfo | modifierName | String | Modifier Name | |
InvoiceInfo | sumNoVat | BigDecimal | Sum without VAT | |
InvoiceInfo | taxSum | BigDecimal | VAT Sum | |
InvoiceInfo | sumWithVat | BigDecimal | Sum with VAT | |
InvoiceInfo | sumPaid | BigDecimal | Sum Paid | |
InvoiceInfo | sumLeftToPay | BigDecimal | Sum left to pay | |
InvoiceInfo | invoiceTextsInfoId | long | Template id | |
InvoiceInfo | penaltyPercent | BigDecimal | Penalty Percent | |
InvoiceInfo | roundedSum | BigDecimal | Rounded Sum | |
InvoiceInfo | vatTotalRoundedSum | BigDecimal | VAT rounded sum | |
InvoiceInfo | currencyRate | BigDecimal | Currency Rate | |
InvoiceInfo | typeCode | String | DOCUMENT_TYPE | |
InvoiceInfo | hash | String | Hash that can be used to query for invoice from third parties | |
InvoiceInfo | projectId | long | Project ID (Margn internal ID) | |
InvoiceInfo | code | String | Code. For sales invoice S14…, for purchase P14… | |
InvoiceInfo | transactionDate | Date | Date of Transactio | |
InvoiceInfo | note | String | Additional note for the invoice | |
InvoiceInfo | printedInfo | String | Printed Info | |
InvoiceInfo | referringIdentifier | String | External link or other identifier | |
InvoiceInfo | actionId | |||
InvoiceInfo | partnerDocumentId | long | Document ID from ERPLY | |
InvoiceInfo | activityId | long | ||
InvoiceInfo | documentStatusTypeCode | String | DOCUMENT_STATUS_TYPE | |
InvoiceInfo | vatTotalsByTaxRate | |||
InvoiceInfo | discountSum | |||
InvoiceInfo | rows | List <InvoiceArticleInfo> | Array of invoice rows (InvoiceArticleInfo) | ![]() |
InvoiceInfo | payments | List <PaymentInfo> | ||
InvoiceInfo | customer | CustomerInfo |
API examples
GET
Either id or documentType is always required!
Using id: https://api.erplybooks.com/api/invoices/2575151
Returns a “rows” array that contains all of the articles from this id.
Using documentType: https://api.erplybooks.com/api/invoices
In this case, “rows”=null.
DELETE
Id is required!
https://api.erplybooks.com/api/invoices/2575151
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://api.erplybooks.com/api/invoices/2575151
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://api.erplybooks.com/api/invoices
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 NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
documentId | long | ||
expenseAccountId | long | ||
dateFrom | Date | Format: 2012-12-29T00:00:00 | |
dateTo | Date | Format: 2012-12-29T00:00:00 | |
projectId | long | ||
userId | long | ||
customerId | long | ||
description | String | ||
documentType | String | DOCUMENT_TYPE | ![]() |
articleId | long | ||
rowType | String | ||
articleType | String | ||
getReimbursement | boolean | ||
getFixedAssets | boolean | ||
sort | String | ||
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
InvoiceArticleInfo | id | long | ||
InvoiceArticleInfo | articleId | long | Article ID (internal) | ![]() |
InvoiceArticleInfo | articleName | String | Article Name | ![]() |
InvoiceArticleInfo | unitCode | String | UNIT | |
InvoiceArticleInfo | code | String | ||
InvoiceArticleInfo | quantity | BigDecimal | Quantity | ![]() |
InvoiceArticleInfo | price | BigDecimal | Price of Article | ![]() |
InvoiceArticleInfo | discount | BigDecimal | Discount Percent | |
InvoiceArticleInfo | extraCharge | BigDecimal | Extra Charge Percent | |
InvoiceArticleInfo | vatPercent | BigDecimal | VAT Percent (20, not 0.2) | ![]() |
InvoiceArticleInfo | vatAccountId | long | VAT Account ID (internal) | ![]() |
InvoiceArticleInfo | expenseAccountId | long | Expense Account ID (internal) | ![]() |
InvoiceArticleInfo | revenueAccountId | long | Revenue Account ID (internal) | ![]() |
InvoiceArticleInfo | debtAccountId | long | Debt Account ID (internal) | |
InvoiceArticleInfo | transactionEntryId | long | Transaction ID (internal) | |
InvoiceArticleInfo | transactionDate | Date | Format: 2012-12-29T00:00:00 | ![]() |
InvoiceArticleInfo | invoiceId | long | Invoice ID (internal) | |
InvoiceArticleInfo | customerId | long | Customer ID (internal) | |
InvoiceArticleInfo | customerName | String | Customer Name | |
InvoiceArticleInfo | invoiceNumber | String | Invoice Nr | |
InvoiceArticleInfo | registrationCode | String | Registration Code | |
InvoiceArticleInfo | referringIdentifier | String | ||
InvoiceArticleInfo | typeCode | String | ARTICLE_ROW_TYPE | |
InvoiceArticleInfo | projectId | long | Project ID (internal) | |
InvoiceArticleInfo | taxRateId | long | Tax Rate ID (internal) | ![]() |
Payments
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
dateFrom | String | Format: 2012-12-29T00:00:00 | |
dateTo | String | Format: 2012-12-29T00:00:00 | |
entityId | long | ||
isIncome | boolean | ||
getEverything | boolean | ||
documentId | long | ||
type | String | ||
paymentType | String | PAYMENT_TYPE | ![]() |
showOnlyPrepayments | boolean | ||
documentStatusType | String | ||
accountId | long | Account ID (internal) | |
projectId | long | Project ID (internal) | |
description | String | Payment Description | |
sortBy | String | ||
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
PaymentInfo | id | long | Payment ID (internal) | |
PaymentInfo | opDate | Date | Format: 2012-12-29T00:00:00 | ![]() |
PaymentInfo | invoiceId | long | Invoice ID (internal) | ![]() |
PaymentInfo | transactionIdentifier | String | ||
PaymentInfo | transactionEntryId | long | ||
PaymentInfo | sumPaid | BigDecimal | Sum Paid | ![]() |
PaymentInfo | sumWithVat | BigDecimal | Sum With VAT | |
PaymentInfo | currencyCode | String | Currency Code | ![]() |
PaymentInfo | typeCode | String | PAYMENT_TYPE | ![]() |
PaymentInfo | accountId | long | Account ID | |
PaymentInfo | customerName | String | Customer Name | |
PaymentInfo | number | String | ||
PaymentInfo | referenceNumber | String | Reference Number | |
PaymentInfo | archivingId | String | Archiving ID | |
PaymentInfo | note | String | Note | |
PaymentInfo | code | String | Code | |
PaymentInfo | badDebt | boolean | Undoubtful income | |
PaymentInfo | partnerPaymentId | long | Payment ID (from ERPLY) | |
PaymentInfo | customerId | long | Customer ID (internal) | ![]() |
PaymentInfo | originalSum | BigDecimal | Original Sum | |
PaymentInfo | partnerDocumentId | long | Document ID (from ERPLY) | |
PaymentInfo | imported | boolean | Is imported from EPRLY | |
PaymentInfo | documentStatusTypeCode | String | DOCUMENT_STATUS_TYPE | |
PaymentInfo | statusChangeDatetime | Date | Date of change of Documen’ts Status | |
PaymentInfo | currencyRate | |||
PaymentInfo | projectId | long | Project ID (internal) | |
PaymentInfo | entityName | |||
PaymentInfo | parentPaymentId |
API Examples
GET
PaymentType is required!
Using id: https://api.erplybooks.com/api/payments
DELETE
Id is required!
https://api.erplybooks.com/api/payments/2575151
PUT
Used to update data. Id is required.
https://api.erplybooks.com/api/payments/2575151
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://api.erplybooks.com/api/payments
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 NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
ProjectInfo | id | long | Project ID (internal) | |
ProjectInfo | name | String | Project Name | ![]() |
ProjectInfo | validFromDatetime | Date | Project Valid From (Format: 2012-12-29T00:00:00) | |
ProjectInfo | validToDatetime | Date | Project Valid To (Format: 2012-12-29T00:00:00) | |
ProjectInfo | description | String | Description | |
ProjectInfo | affirmed | boolean | Affirmed | |
ProjectInfo | partnerProjectId | long | Project ID (external) | |
ProjectInfo | mainProjectId | long | Parent Project ID |
TransactionEntries
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
typeCode | String | ||
dateFrom | Date | Format: 2012-12-29T00:00:00 | |
dateTo | Date | Format: 2012-12-29T00:00:00 | |
transactionDateFrom | Date | Format: 2012-12-29T00:00:00 | |
transactionDateTo | Date | Format: 2012-12-29T00:00:00 | |
description | String | Transaction Code or Description | |
projectId | long | Project ID (internal) | |
documentId | long | Document ID (internal) | |
sort | String | ||
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
TransactionEntryInfo | id | long | Transaction ID (Internal) | |
TransactionEntryInfo | opDate | Date | Format: 2012-12-29T00:00:00 | ![]() |
TransactionEntryInfo | code | String | Registration Code | |
TransactionEntryInfo | description | String | Description of Transaction | ![]() |
TransactionEntryInfo | sum | BigDecimal | Total Sum of Transaction’s rows – filled automatically | |
TransactionEntryInfo | typeCode | String | TRANSACTION_TYPE | ![]() |
TransactionEntryInfo | projectId | long | Project ID if necessary | |
TransactionEntryInfo | accountEntries | List <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 through API
Parameters for GET Queries
PARAMETER NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
dateFrom | String | Format: 2012-12-29T00:00:00 | |
isOverdue | boolean | ||
getByContact | boolean | ||
getEverything | boolean | ||
showCustomers | boolean | ||
documentId | String | Project ID (internal) | |
keyword | String | ||
typeOfPrintout | String | ||
currencyCode | String | CURRENCY | |
getByTransactionDate | boolean | ||
partnerCustomerId | String | ||
start | int | ||
limit | int |
Response
FIELD NAME | TYPE | DESCRIPTION | REQUIRED | |
---|---|---|---|---|
APIAgedDebtsInfo | payerId | long | Payment ID (internal) | |
APIAgedDebtsInfo | name | String | payer name | |
APIAgedDebtsInfo | registrationCode | String | Registration code | |
APIAgedDebtsInfo | vatNumber | String | VAT nr | |
APIAgedDebtsInfo | country | String | payer country | |
APIAgedDebtsInfo | String | payer email | ||
APIAgedDebtsInfo | typeCode | String | Type of Transaction | |
APIAgedDebtsInfo | prepayments | int | Prepayments made by payer | |
APIAgedDebtsInfo | totalDebt | int | Total number of invoices that aren’t payed | |
APIAgedDebtsInfo | notYetDueDebt | int | Total number of invoices that aren’t gone over deadline but are unpaid | |
APIAgedDebtsInfo | aged7 | int | Number of invoices that are gone over for less than 8 days | |
APIAgedDebtsInfo | aged15 | int | Number of invoices that are gone over for more than 7days but less than 16 days | |
APIAgedDebtsInfo | aged30 | int | Number of invoices that are gone over for more than 15days but less than 31 days | |
APIAgedDebtsInfo | aged60 | int | Number of invoices that are gone over for more than 30 days but less than 61 days | |
APIAgedDebtsInfo | aged90 | int | Number of invoices that are gone over for more than 60 days but less than 91 days | |
APIAgedDebtsInfo | aged180 | int | Number of invoices that are gone over for more than 90 days but less than 180 days | |
APIAgedDebtsInfo | aged360 | int | Number of invoices that are gone over for more than 180 days but less than 361 days | |
APIAgedDebtsInfo | agedAllOther | int | Number of invoices that are gone over for more than 360 days | |
APIAgedDebtsInfo | lastMonth0 | int | Number of invoices that are gone over for less than 1 Month | |
APIAgedDebtsInfo | lastMonth1 | int | Number of invoices that are gone over for 1 to 2 months | |
APIAgedDebtsInfo | lastMonth2 | int | Number of invoices that are gone over for 2 to 3 months | |
APIAgedDebtsInfo | lastMonth3 | int | Number of invoices that are gone over for 3 to 4 months | |
APIAgedDebtsInfo | lastMonth4 | int | Number of invoices that are gone over for 4 to 5 months | |
APIAgedDebtsInfo | lastMonthAllOther | int | Number of invoices that are gone over for more than 5 months |
EXAMPLE:
GET
https://api.erplybooks.com/api/reports/aged
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://api.erplybooks.com/api/attachments
Json:{"documentId":DocumentID,"filename":"FileName.png","base64":"data:image/png;base64,XXXXX"}
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 NAME | TYPE | DESCRIPTION | REQUIRED |
---|---|---|---|
id | long | Attachment ID (internal) | |
documentId | long | Document ID (internal) | |
partnerDocumentId | String | Document ID (From ERPLY) | |
attributeId | long | ||
filename | String | Name of the file | |
base64 | String | File in base 64 formating |