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.

To get the "billed until" date for each recurring billing, see API call getBilledUntilDate.

Input parameters

Parameter name Description Possible value Required
billingStatementID  Billing statement ID.  Integer    
billingStatementNumber  Billing statement number.  Integer    
customerID  Customer ID.  Integer    
startDateFrom    ISO date (yyyy-mm-dd)    
startDateTo    ISO date (yyyy-mm-dd)    
endDateFrom    ISO date (yyyy-mm-dd)    
endDateTo    ISO date (yyyy-mm-dd)    
active  0 or 1.  Integer    
searchAttributeName  Search from attribute name.searchAttributeName and searchAttributeValue have to be specified both  String    
searchAttributeValue  Search from attribute value  String    
changedSince  Retrieve 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)    
recordsOnPage  Number of records API should return. By default 20, at most 100.  Integer    
pageNo  API 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 name Type Description
billingStatementID  Integer  ID of billing statement.  
billingStatementNumber  Integer  Number of billing statement.  
customerID  Integer  Customer ID.  
customerName  String  Customer name.  
customerAddressID  Integer  Customer address ID.  
payerID  Integer  Payer ID.  
payerName  String  Payer name.  
payerAddressID  Integer  Payer address ID.  
startDate  ISO date (yyyy-mm-dd)    
endDate  ISO date (yyyy-mm-dd)    
paymentDays  Integer  Payment period.  
productID  Integer  ID of the product.  
serviceID  Integer  ID of the service.  
serviceNameOnInvoices  String  Service name as displayed on invoices.  
active  Integer    
currencyCode  String  Currency code.  
vatrateID  Integer  ID of VAT rate.  
customerSpecialPrice  Decimal  Customer special price.  
employeeID  Integer  ID of the employee, who is set as the creator of the billing statement.  
sendByEmail  Integer    
makeSeparateInvoice  Integer    
additionalInvoiceNotes  String  Additional text printed on invoices.  
notes  String  Notes.  
billingStatementPeriod  String  Period of billing statement. Possible values: "MONTH", "QUARTER", "HALFYEAR", "YEAR", "3MONTHS", "4MONTHS".  
billingStatementTime  String  Time of billing statement. Possible values: "WHEN_PERIOD_STARTS", "WHEN_PERIOD_ENDS", "BASED_ON_METERED_READINGS".  
lastReading  Decimal  Last reading.  
lastReadingDate  ISO date (yyyy-mm-dd)  Date of last reading.  
lastModified  Unix timestamp.    
attributes  Array  Additional attributes. Each item looks like this:

Field nameTypeDescription
attributeNameStringAttribute name
attributeTypeStringAttribute type
attributeValueStringAttribute value