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
Name | Description |
---|---|
month | The month in YYYY-MM format for which you want to search billing data. |
invnumber | Invoice number for which you want to search billing data. |
pid | Profile ID (customer number). Optional for month based search to limit the search to a single customer; mandatory for invoice based search. |
callgrouping | Optional 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:
Key | Description |
---|---|
id | Record’s unique ID. |
pid | The PID to which the record belongs. |
tag | A tag that you can set for your customers. This may help you identify the customer profile in your system. |
date | The date and time on which the record was generated. |
type | The type of record. |
product | The product name of the record. |
description | A 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. |
src | Only 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. |
dst | Only has a value in call related records. It contains the number which was called. If callgrouping is enabled, this field is to be ignored. |
amountbuy | Your per unit price in €. If you get commissions on the record, they are automatically calculated in this field. |
amount | A recommended price in € to bill your customer. |
count | The number of records in case of a grouping by enabling callgrouping , otherwise this field is to be ignored. |
quantity | Quantity or minutes in the case of call related records. |
totalbuy | The total of amountbuy * quantity. |
total | The total of amount * quantity. |
invoice | Our 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. |