Search

getBillingStatements

Retrieve all recurring billings that have been set up in ERPLY.

A recurring billing indicates that customer should get a monthly (yearly) invoice for the indicated services, at the indicated price.

After the billing has been set up, recurring invoices need to be manually created and sent from back office Sales → Recurring billing, at the beginning or at the end of a month, as appropriate.

Alternatively, invoices can also be created over API with the saveSalesDocument call, and associated with the billing via the “billingStatementID” field.

Input parameters

Parameter nameDescriptionPossible valueRequired
billingStatementIDBilling statement ID.Integer
billingStatementNumberBilling statement number.Integer
customerIDCustomer ID.Integer
startDateFromISO date (yyyy-mm-dd)
startDateToISO date (yyyy-mm-dd)
endDateFromISO date (yyyy-mm-dd)
endDateToISO date (yyyy-mm-dd)
active0 or 1.Integer
searchAttributeNameSearch from attribute name.searchAttributeName and searchAttributeValue have to be specified bothString
searchAttributeValueSearch from attribute valueString
changedSinceRetrieve only items that have been added or modified since the specified timestamp. Use it to keep a local database in sync with ERPLY.Integer (Unix timestamp)
recordsOnPageNumber of records API should return. By default 20, at most 100.Integer
pageNoAPI returns at most recordsOnPage items at a time. To retrive the next recordsOnPage items, send a new request with pageNo incremented by one. By default, API returns "page 1".Integer

Response

Field nameTypeDescription
billingStatementIDIntegerID of billing statement.
billingStatementNumberIntegerNumber of billing statement.
customerIDIntegerCustomer ID.
customerNameStringCustomer name.
customerAddressIDIntegerCustomer address ID.
payerIDIntegerPayer ID.
payerNameStringPayer name.
payerAddressIDIntegerPayer address ID.
startDateISO date (yyyy-mm-dd)
endDateISO date (yyyy-mm-dd)
paymentDaysIntegerPayment period.
productIDIntegerID of the product.
serviceIDIntegerID of the service.
serviceNameOnInvoicesStringService name as displayed on invoices.
activeInteger
currencyCodeStringCurrency code.
vatrateIDIntegerID of VAT rate.
customerSpecialPriceDecimalCustomer special price.
employeeIDIntegerID of the employee, who is set as the creator of the billing statement.
sendByEmailInteger
makeSeparateInvoiceInteger
additionalInvoiceNotesStringAdditional text printed on invoices.
notesStringNotes.
billingStatementPeriodStringPeriod of billing statement. Possible values: "MONTH", "QUARTER", "HALFYEAR", "YEAR", "3MONTHS", "4MONTHS".
billingStatementTimeStringTime of billing statement. Possible values: "WHEN_PERIOD_STARTS", "WHEN_PERIOD_ENDS", "BASED_ON_METERED_READINGS".
lastReadingDecimalLast reading.
lastReadingDateISO date (yyyy-mm-dd)Date of last reading.
lastModifiedUnix timestamp.
attributesArrayAdditional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value