Description

This function gives you a list of what we invoiced to your customers.

URL

Month based search: /invoices/getBillingData?month=YYYY-MM[&pid=PID][&callgrouping=0|1]
Invoice based search: /invoices/getBillingData?invnumber=X&pid=PID[&callgrouping=0|1]

Parameters

NameDescription
monthThe month in YYYY-MM format for which you want to search billing data.
invnumberInvoice number for which you want to search billing data.
pidProfile ID (customer number). Optional for month based search to limit the search to a single customer; mandatory for invoice based search.
callgroupingOptional parameter. Set to 1 to group call records by destination. In a month based search without giving a PID, the grouping is done by PID and then by destination.

Return

This function returns a JSON string in the form of
{"return":{"code":XXX,"message":"...","data":[record1,record2,...]}}
code is a HTTP status code and message is a descriptive text about the returned code.
If code is 200, there’ll be a key called data in the return which is a JSON encoded array of records which themselves are arrays with these keys:

KeyDescription
idRecord’s unique ID.
pidThe PID to which the record belongs.
tagA tag that you can set for your customers. This may help you identify the customer profile in your system.
dateThe date and time on which the record was generated.
typeThe type of record.
productThe product name of the record.
descriptionA description of the product. For call related records, this contains the destination name (e.g. “Luxembourg mobile”). For other records, it may be a MAC address or serial number or a descriptive text.
srcOnly has a value in call related records. It contains the number which started the call. If callgrouping is enabled, this field is to be ignored.
dstOnly has a value in call related records. It contains the number which was called. If callgrouping is enabled, this field is to be ignored.
amountbuyYour per unit price in €. If you get commissions on the record, they are automatically calculated in this field.
amountA recommended price in € to bill your customer.
countThe number of records in case of a grouping by enabling callgrouping, otherwise this field is to be ignored.
quantityQuantity or minutes in the case of call related records.
totalbuyThe total of amountbuy * quantity.
totalThe total of amount * quantity.
invoiceOur invoice reference. The syntax is *PID*INVNUMBER* and is seen on all our invoice PDFs. You can use the INVNUMBER of these references in this API as described above.

en_USEnglish