Get Credit Purchases

This request returns information on credit purchases. Information include amount of credits, money paid, payment method, date, and whether invoice option was used.

HTTP Request

URL Method Description
url="http://www.tellody.com/CampaignCloud/CreditsController/PaymentHistory?page=<integer>&per_page=<integer>" GET Get all transactions for purchased credits

HTML Parameters

Name Description
page Page=0 defines the first page in the UI. This parameter should be set to zero in html so that the response will return all entries or the X most recent entries where X corresponds to the value set using "per_page" parameter
per_page This can be set to any integer to limit the number of returned entries in the defined page. An unrealistic number can be set to retrieve all transactions when page=0

Sample Request

PythonOther


#HTTP request header
header = {"Content-Application" : "application/json"}
#get credits spent
url="http://www.tellody.com/CampaignCloud/CreditsController/PaymentHistory?page=0&per_page=2"
response = my_session.get(url).json()
print(json.dumps(response,ensure_ascii=False))

Sample Response

The result will return a list of spent credit transactions along with the relevant details.

The most useful information that are returned regarding a spent credit transaction is: amount of credits spent, transaction status, timestamp and service configuration details including message content, service type (e.g. BULK) and campaign status (e.g. ENDED).


  {
   "extras":null,
   "data":[
      {
         "amount":4.9,
         "months":null,
         "paymentMethod":"Paypal",
         "cardLastDigits":null,
         "accountType":null,
         "invoiceHistory":null,
         "paymentId":12,
         "date":{
            "millis":1437556984000,
            "minuteOfDay":743,
            "centuryOfEr
a":20,
            "weekOfWeekyear":30,
            "dayOfMonth":22,
            "zone":{
               "uncachedZone":{
                  "cachable":true,
                  "fixed":false,
                  "id":"Europe/Athens"
               },
               "fixed":false,
               "id":"Europe/Athens"
            },
            "yearOfCentury":15,
            "equalNow":false,
            "hourOfDay":12,
            "afterNo
w":false,
            "dayOfYear":203,
            "year":2015,
            "era":1,
            "weekyear":2015,
            "millisOfDay":44584000,
            "minuteOfHour":23,
            "yearOfEra":2015,
            "monthOfYear":7,
            "chronology":{
               "zone":{
                  "uncachedZone":{
                     "cachable":true,
                     "fixed":false,
                     "id":"Eu
rope/Athens"
                  },
                  "fixed":false,
                  "id":"Europe/Athens"
               }
            },
            "secondOfMinute":4,
            "millisOfSecond":0,
            "secondOfDay":44584,
            "beforeNow":true,
            "dayOfWeek":3
         },
         "credits":100.0
      },
      {
         "amount":4.9,
         "months":null,
         "paymentMethod":"Paypal",
         "ca
rdLastDigits":null,
         "accountType":null,
         "invoiceHistory":null,
         "paymentId":11,
         "date":{
            "millis":1437040720000,
            "minuteOfDay":778,
            "centuryOfEra":20,
            "weekOfWeekyear":29,
            "dayOfMonth":16,
            "zone":{
               "uncachedZone":{
                  "cachable":tr
ue,
                  "fixed":false,
                  "id":"Europe/Athens"
               },
               "fixed":false,
               "id":"Europe/Athens"
            },
            "yearOfCentury":15,
            "equalNow":false,
            "hourOfDay":12,
            "afterNow":false,
            "dayOfYear":197,
            "year":2015,
            "era":1,
            "weekyear":2015,
            "millisOfDay":46            720000,
            "minuteOfHour":58,
            "yearOfEra":2015,
            "monthOfYear":7,
            "chronology":{
               "zone":{
                  "uncachedZone":{
                     "cachable":true,
                     "fixed":false,
                     "id":"Europe/Athens"
                  },
                  "fixed":false,
                  "id":"Europe/Athens"
               }
            },
            "secondOfMinute":40,
            "millisOfS
econd":0,
            "secondOfDay":46720,
            "beforeNow":true,
            "dayOfWeek":4
         },
         "credits":100.0
      }
   ],
   "count":12
}
	

Errors

In case of an error information may be derived by the HTTP Status in the result of each request. (e.g. HTTP 400 – Bad Request)

Back to Top