Generic examples

The examples below may occur while using any of the methods above.

Messages may contain HTML code!

Invalid API Key

Status code - 401

Example URL: https://{{host}}/api/{{method}}.json?key=invalid_api_key&lang=en&currency=EUR

{
    "messages": {
        "warning": [
            "Given login details are incorrect."
        ],
        "danger": [
            "Invalid API Key or API not allowed"
        ]
    }
}
Example URL: https://{{host}}/api/{{method}}.xml?key=invalid_api_key&lang=en&currency=EUR

<?xml version="1.0" encoding="utf-8"?>
<root>
	<messages>
		<warning>
			<item>Given login details are incorrect.</item>
		</warning>
		<danger>
			<item>Invalid API Key or API not allowed</item>
		</danger>
	</messages>
</root>

Invalid method

Status code - 404

Example URL: https://{{host}}/api/{{method}}.json?key=YOURAPIKEY&lang=en

{
    "messages": {
        "danger": [
            "Action not allowed"
        ]
    }
}
Example URL: https://{{host}}/api/{{method}}.xml?key=YOURAPIKEY&lang=en

<?xml version="1.0" encoding="utf-8"?>
<root>
	<messages>
		<danger>
			<item>Action not allowed</item>
		</danger>
	</messages>
</root>

Insufficient permissions

Status code - 403

Example URL: https://{{host}}/api/{{method}}.json?key=YOURAPIKEY&lang=en

{
    "messages": {
        "danger": [
            "You do not have permission to perform this action."
        ]
    }
}
Example URL: https://{{host}}/api/{{method}}.xml?key=YOURAPIKEY&lang=en

<?xml version="1.0" encoding="utf-8"?>
<root>
	<messages>
		<danger>
			<item>You do not have permission to perform this action.</item>
		</danger>
	</messages>
</root>