List all account charts

Retrieves a list of all the available account charts.

Examples

Request

curl -X GET "https://api.fortnox.se/3/accountcharts" \
     -H "Client-Secret: 3Er4kHXZTJ" \
     -H "Content-Type: application/json" \
     -H "Access-Token: 61cf63ae-4ab9-4a95-9db5-753781c4f41f" \
     -H "Accept: application/json" \
     -m 30 \
     -v \

Response

{
    "AccountCharts": [
        {
            "Name": "Bas 2012"
        },
        {
            "Name": "Bas 2010"
        },
        {
            "Name": "Bas 2009"
        },
        {
            "Name": "Bas 2008"
        },
        {
            "Name": "Bas 2007"
        },
        {
            "Name": "Bas 2004"
        }
    ]
}

Request

// Request: Account Charts (https://api.fortnox.se/3/accountcharts)

$ch = curl_init("https://api.fortnox.se/3/accountcharts");

// Headers

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
	"Client-Secret: 3Er4kHXZTJ",
	"Content-Type: application/json",
	"Access-Token: 61cf63ae-4ab9-4a95-9db5-753781c4f41f",
	"Accept: application/json",
));

// Send synchronously

curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);

// Failure
if ($result === FALSE)
{
	echo "cURL Error: " . curl_error($ch);
}

// Success
else
{
	echo "Request completed: " . $result;
}

curl_close($ch);

Response

{
    "AccountCharts": [
        {
            "Name": "Bas 2012"
        },
        {
            "Name": "Bas 2010"
        },
        {
            "Name": "Bas 2009"
        },
        {
            "Name": "Bas 2008"
        },
        {
            "Name": "Bas 2007"
        },
        {
            "Name": "Bas 2004"
        }
    ]
}

Request

require 'uri'
require 'net/https'

# Request: Account Charts (https://api.fortnox.se/3/accountcharts)

uri = URI.parse("https://api.fortnox.se/3/accountcharts")
http = Net::HTTP.new(uri.host, uri.port)
http.read_timeout = 30
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
request = Net::HTTP::Get.new(uri.request_uri)

# Headers

request["Client-Secret"] = "3Er4kHXZTJ"
request["Content-Type"] = "application/json"
request["Access-Token"] = "61cf63ae-4ab9-4a95-9db5-753781c4f41f"
request["Accept"] = "application/json"

# Send synchronously

response = http.request(request)

Response

{
    "AccountCharts": [
        {
            "Name": "Bas 2012"
        },
        {
            "Name": "Bas 2010"
        },
        {
            "Name": "Bas 2009"
        },
        {
            "Name": "Bas 2008"
        },
        {
            "Name": "Bas 2007"
        },
        {
            "Name": "Bas 2004"
        }
    ]
}

Request

import httplib

# Request: Account Charts (https://api.fortnox.se/3/accountcharts)

connection = httplib.HTTPSConnection('api.fortnox.se', 443, timeout = 30)

# Headers

headers = {"Client-Secret":"3Er4kHXZTJ",
           "Content-Type":"application/json",
           "Access-Token":"61cf63ae-4ab9-4a95-9db5-753781c4f41f",
           "Accept":"application/json"}

# Send synchronously

connection.request('GET', '/3/accountcharts', None, headers)
try:
	response = connection.getresponse()
	content = response.read()
	# Success
	print('Response status ' + str(response.status))
except httplib.HTTPException, e:
	# Exception
	print('Exception during request')

Response

{
    "AccountCharts": [
        {
            "Name": "Bas 2012"
        },
        {
            "Name": "Bas 2010"
        },
        {
            "Name": "Bas 2009"
        },
        {
            "Name": "Bas 2008"
        },
        {
            "Name": "Bas 2007"
        },
        {
            "Name": "Bas 2004"
        }
    ]
}

Request

Using our .NET SDK.

AccountChartConnector acConnector = new AccountChartConnector();

AccountCharts result = acConnector.Find();

Properties

Property Description
Name string, read-only
Name of the account chart