get https://secure.fusebill.com/v1/customers//customerArActivities?query=startDate:;endDate:
This call allows you to get the list of Transactions for a specific customer. The list can be filtered to a specific date range using query parameters. The query parameters are optional and passing in no parameters will give you all transactions.
Path Parameters
Property | Type | Description |
---|---|---|
customerId | Integer | This is the Customer ID of the customer for whom you want to retrieve the Transactions. This is included in the URI of the request. |
This call supports date filtering (Read More)
&query=parameterName:Value
Parameter Name | Acceptable Values | Parameter Name | Acceptable Values |
---|---|---|---|
endDate | DateTime | startDate | DateTime |
This call supports pagination (Read More)
&pageSize=100&pageNumber=0
This call supports sorting (Read More)
&sortOrder=Ascending
or &sortOrder=Descending
&sortExpression=expression
Examples
curl -X GET "https://secure.fusebill.com/v1/customers/{customerId}/customerArActivities?query=startDate:2017-01-01T00:00:00.000Z;endDate:2017-01-25T00:00:00.000Z" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//query parameter
int customerId = {customerId};
string startDate = "2017-01-01T00:00:00.000Z";
string endDate = "2017-01-30T00:00:00.000Z";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers/" + customerId + "/customerArActivities?query=startDate:"+startDate+";endDate:"+endDate);
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
result = streamReader.ReadToEnd();
}
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://secure.fusebill.com/v1/customers/{id}/customerArActivities?query=startDate:2017-01-01T00:00:00.000Z;endDate:2017-01-25T00:00:00.000Z', headers=headers)
print(r.content)
Response
[
{
"effectiveTimestamp":"2017-01-24T20:07:22",
"transactionType":"Charge",
"name":"Monthly Charge",
"description":null,
"productCode":"monthlycharge",
"paymentActivityId":null,
"reference":null,
"manualReference": null,
"quantity":1.000000,
"unitPrice":15.990000,
"arDebit":15.9900,
"arCredit":0.0000,
"glCode":null,
"invoiceAllocations":[
{
"invoiceId":110742,
"invoiceNumber":74,
"amount":15.99,
"outstandingBalance":15.9900,
"invoiceTotal":15.9900,
"uri":"https://secure.fusebill.com/v1/invoices/110742"
}
],
"associatedId":7573304,
"id":7573304,
"uri":"https://secure.fusebill.com/v1/invoices/110742"
},
{
"effectiveTimestamp":"2017-01-16T21:07:38",
"transactionType":"Payment",
"name":"Credit Card (Visa ending in 1111)",
"description":null,
"productCode":null,
"paymentActivityId":114639,
"reference":"aiu5749q",
"quantity":1.000000,
"unitPrice":10.000000,
"arDebit":0.0000,
"arCredit":10.0000,
"glCode":null,
"invoiceAllocations":[
],
"associatedId":7327933,
"id":7327933,
"uri":"https://secure.fusebill.com/v1/payments/7327933-783"
}
]
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "Customer with id 123 not found."
}
]
}