Reckon One API v1

API change history

A new generation, modular cloud accounting solution that scales with your business – perfect for startups.

02 Core > Activity Statements by ID

This endpoint allows you to retrieve detailed information from a single Activity Statement by sending its ID to the API endpoint.

Try it

Request

Request URL

Request parameters

  • string
  • string

Request headers

  • string
    Subscription key which provides access to this API. Found in your Profile.
  • string
    OAuth 2.0 access token obtained from IdentityServer. Supported grant types: Implicit.

Request body

Responses

200 OK

You will get this detailed response if the Activity Statement is retrieved successfully.

Representations

{"BASPreferences":{"AmountTaxstatus":2,"CashbookID":"00000000-0000-0000-0000-000000000000","IncludeFBT":true,"IncludeFTC":true,"IncludeLCT":true,"IncludePAYGIOption1":true,"IncludePAYGIOption2":false,"IncludePAYGW":true,"IncludeWET":true,"ReportingPeriodType":"ee46dd06-3bde-4009-abac-ed0a78f927fa"},"CashbookId":"35ab8405-cf6f-4dc4-b703-1ccf40c5c234","CompanyName":"ABC Company","Data":[{"Error":null,"Label":"W5","Value":null,"Xbrl":null},{"Error":null,"Label":"5A","Value":null,"Xbrl":null},{"Error":null,"Label":"W3","Value":null,"Xbrl":null},{"Error":null,"Label":"7C","Value":null,"Xbrl":null},{"Error":null,"Label":"T9","Value":null,"Xbrl":null},{"Error":null,"Label":"9b","Value":null,"Xbrl":null},{"Error":null,"Label":"W2","Value":"0","Xbrl":null},{"Error":null,"Label":"1F","Value":null,"Xbrl":null},{"Error":null,"Label":"7D","Value":null,"Xbrl":null},{"Error":null,"Label":"W1","Value":"0","Xbrl":null},{"Error":null,"Label":"1C","Value":"390","Xbrl":null},{"Error":null,"Label":"T8","Value":null,"Xbrl":null},{"Error":null,"Label":"G11","Value":"450","Xbrl":null},{"Error":null,"Label":"9","Value":"1345","Xbrl":null},{"Error":null,"Label":"F2","Value":null,"Xbrl":null},{"Error":null,"Label":"1B","Value":"101","Xbrl":null},{"Error":null,"Label":"W4","Value":null,"Xbrl":null},{"Error":null,"Label":"1D","Value":null,"Xbrl":null},{"Error":null,"Label":"6B","Value":null,"Xbrl":null},{"Error":null,"Label":"8B","Value":"101","Xbrl":null},{"Error":null,"Label":"7","Value":null,"Xbrl":null},{"Error":null,"Label":"T4","Value":null,"Xbrl":null},{"Error":null,"Label":"G1","Value":"12049","Xbrl":null},{"Error":null,"Label":"8A","Value":"1446","Xbrl":null},{"Error":null,"Label":"G10","Value":"619","Xbrl":null},{"Error":null,"Label":"F4","Value":null,"Xbrl":null},{"Error":null,"Label":"G2","Value":null,"Xbrl":null},{"Error":null,"Label":"5B","Value":null,"Xbrl":null},{"Error":null,"Label":"1E","Value":null,"Xbrl":null},{"Error":null,"Label":"F1","Value":null,"Xbrl":null},{"Error":null,"Label":"T7","Value":null,"Xbrl":null},{"Error":null,"Label":"9a","Value":"1345","Xbrl":null},{"Error":null,"Label":"1A","Value":"1056","Xbrl":null},{"Error":null,"Label":"G3","Value":"2140","Xbrl":null},{"Error":null,"Label":"F3","Value":null,"Xbrl":null},{"Error":null,"Label":"6A","Value":null,"Xbrl":null},{"Error":null,"Label":"4","Value":null,"Xbrl":null}],"GSTReportId":"17444bf7-9aab-4dfe-967e-d5ac2dac9ea9","LegalName":"ABC Company","Lodgement":{"CashbookId":"35ab8405-cf6f-4dc4-b703-1ccf40c5c234","Description":"Annual report 2013/2014 with all options (PAYG1) nnnnn","DocumentId":null,"DueDate":null,"EndDate":"2014-06-30T00:00:00","GSTReportId":"17444bf7-9aab-4dfe-967e-d5ac2dac9ea9","IsAmendment":false,"LodgeDate":null,"LodgementStatus":1,"LodgementType":0,"PeriodInDays":0,"ReceiptNumber":null,"StartDate":"2013-07-01T00:00:00"},"ReportType":1,"Template":{"Option":1,"TemplateRowDataList":[{"DataType":1,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"ABC Company","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":2,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":null,"Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":3,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Supplies and Acquisitions","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Goods and Services Tax (GST): Option 1","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"G1","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Total Sales and Income & other","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":24,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Amounts include GST?","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"G2","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Exports","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"G3","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Other GST free supplies","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"G10","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Capital Acquisition","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"G11","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Other Acquisition","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":3,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Taxes and Amounts Withheld","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"PAYG tax withheld","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"W1","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Total salary, wages and other payments","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"W2","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Amount withheld from payments shown at W1","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"W4","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Amount withheld where no ABN is quoted","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"W3","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Other amounts withheld (excluding any amount shown at W2 or W4)","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"W5","Rules":"W2 + W4 + W3","RuleLabels":["W2","W4","W3"],"Dependency":null,"Description":"Total amounts withheld (W2 + W4 + W3)","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Option 1: Pay a PAYG instalment amount quarterly","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"T7","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"ATO calculated PAYG instalment","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":5,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"If you are varying your amount, complete T8, T9, T4","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"T8","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Estimated tax for the year","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":16,"Label":"T9","Rules":null,"RuleLabels":null,"Dependency":"T4","Description":"Varied amount payable for the quarter","Error":"* T4 is required","SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":17,"Label":"T4","Rules":null,"RuleLabels":null,"Dependency":"T9","Description":"Reason for variation","Error":"* T9 is required","SelectionList":[{"Display":"","Value":""},{"Display":"21 Change in investments","Value":"21"},{"Display":"22 Current business structure not continuing","Value":"22"},{"Display":"23 Significant change in trading conditions","Value":"23"},{"Display":"24 Internal business restructure","Value":"24"},{"Display":"25 Change in legislation or product mix","Value":"25"},{"Display":"26 Financial market changes","Value":"26"},{"Display":"27 Use of income tax losses","Value":"27"},{"Display":"33 Consolidations","Value":"33"}],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Fringe Benefits Tax","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"F1","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"ATO calculated fringe benefits tax instalment","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":5,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"If you are varying your amount, complete F2, F3, F4","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":15,"Label":"F2","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Estimated total fringe benefits tax","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":16,"Label":"F3","Rules":null,"RuleLabels":null,"Dependency":"F4","Description":"Varied fringe benefits tax instalment","Error":"* F4 is required","SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":17,"Label":"F4","Rules":null,"RuleLabels":null,"Dependency":"F3","Description":"Reason for fringe benefits tax","Error":"* F3 is required","SelectionList":[{"Display":"","Value":""},{"Display":"22 Current business structure not continuing","Value":"22"},{"Display":"30 Change in fringe benefits for employees","Value":"30"},{"Display":"31 Change in employees with fringe benefits","Value":"31"},{"Display":"32 Fringe benefits rebate now claimed","Value":"32"}],"IsEditable":true,"IsVisible":true},{"DataType":3,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Debits and Credits","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Amounts you owe the ATO","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"1A","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Goods and services tax payable","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"1C","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Wine equalisation tax payable","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"1E","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Luxury car tax payable","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"4","Rules":"W5","RuleLabels":["W5"],"Dependency":null,"Description":"PAYG tax withheld","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"5A","Rules":"T9 >= 0 || T9 * 0 || T7 || T11","RuleLabels":["T9","T7","T11"],"Dependency":null,"Description":"PAYG income tax instalment","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"6A","Rules":"F3 >= 0 || F3 * 0 || F1","RuleLabels":["F3","F1"],"Dependency":null,"Description":"Fringe benefits tax instalment","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"7","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Deferred company/fund instalment","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"7C","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Fuel tax credit over claim (Don't claim in litres)","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"8A","Rules":"1A + 1C + 1E + 4 + 5A + 6A + 7 + 7C","RuleLabels":["1A","1C","1E","4","5A","6A","7","7C"],"Dependency":null,"Description":"Calculated as 1A + 1C + 1E + 4 + 5A + 6A + 7 + 7C","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":12,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":null,"Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Amounts the ATO owes you","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"1B","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Credit for goods and services tax paid","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"1D","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Wine equalisation tax refundable","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"1F","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Luxury car tax refundable","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"5B","Rules":"T9 < 0","RuleLabels":["T9"],"Dependency":null,"Description":"Credit from PAYG income tax instalment variation","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"6B","Rules":"F3 < 0","RuleLabels":["F3"],"Dependency":null,"Description":"Credit arising from reduced fringe","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":7,"Label":"7D","Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Fuel tax credit (Don't claim in litres)","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":14,"Label":"8B","Rules":"1B + 1D + 1F + 5B + 6B + 7D","RuleLabels":["1B","1D","1F","5B","6B","7D"],"Dependency":null,"Description":"Calculated as 1B + 1D + 1F + 5B + 6B + 7D","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":12,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":null,"Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":4,"Label":null,"Rules":null,"RuleLabels":null,"Dependency":null,"Description":"Payment or Refund","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":6,"Label":"9","Rules":"[ 8A - 8B ]","RuleLabels":["8A","8B"],"Dependency":null,"Description":"Your payment or refund amount","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":false},{"DataType":19,"Label":"9a","Rules":"9 >= 0","RuleLabels":["9"],"Dependency":null,"Description":"Your payable amount","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true},{"DataType":20,"Label":"9b","Rules":"9 < 0","RuleLabels":["9"],"Dependency":null,"Description":"Your refund amount","Error":null,"SelectionList":[],"IsEditable":true,"IsVisible":true}]},"TemplateId":"4d3b0436-0837-4d1b-bb88-e3249428e4a2","Total":1345.0}

400 Bad Request

You will get this response if you send a HTTP instead of HTTPS request or there was something wrong in the payload that you posted

401 Unauthorized

You will get this response if the user is not authorised

500 Internal Server Error

You will get this response if there is a error on our end. Please email reckonapi@reckon.com if this continues

Code samples

@ECHO OFF

curl -v -X GET "https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}"
-H "Ocp-Apim-Subscription-Key: {subscription key}"
-H "Authorization: {access token}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");
            client.DefaultRequestHeaders.Add("Authorization", "{access token}");

            var uri = "https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}");


            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");
            request.setHeader("Authorization", "{access token}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
                xhrObj.setRequestHeader("Authorization","{access token}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    [_request setValue:@"{access token}" forHTTPHeaderField:@"Authorization"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
    'Authorization' => '{access token}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('api.reckon.com')
    conn.request("GET", "/R1/{cashbookId}/activitystatements/{gstReportId}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('api.reckon.com')
    conn.request("GET", "/R1/{cashbookId}/activitystatements/{gstReportId}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://api.reckon.com/R1/{cashbookId}/activitystatements/{gstReportId}')

request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request headers
request['Authorization'] = '{access token}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body