TS Commerce Developers

Taxes API

Current version: v1.1

Tax Profiles List

Obtain a list of all tax profiles available on current shop

GET
/taxes/list.json
Tax Profiles List Request

$storeden = new Storeden\Storeden($config);
$tax_profile_list = $storeden->get('/taxes/list.json');
					
Tax Profiles List Response

[
	{
		"id": "52dd3382be85f18660000000",
		"value": 22,
		"title": "Profilo Iva EU 22%",
		"countriesUID": [
		82,83,91,119,198,226
		]
	},
	...
]
						

Get tax profile

Get single tax profile if exist

GET
/taxes/taxprofile.json?id={tax-id}
PARAMETERS LIST
id required (StoredenId) Unique id of your tax profile
Get tax profile Request

$storeden = new Storeden\Storeden($config);
$tax_profile = $storeden->get('/taxes/taxprofile.json?id=52dd3382be85f18660000000');
					
Get tax profile Request

{
	"id": "52dd3382be85f18660000000",
	"value": 22,
	"title": "South-East Europe 22%",
	"countriesUID": [
	82,83,91,119,198,226
	]
}
						

Create Tax Profile

POST
/taxes/taxprofile.json
PARAMETERS LIST
name required (string)
value required (float) Tax percentage
countries[] required (array) Array of countries uid ( /countries/list.json )
Create Tax Profile Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['name'] = 'Italian Vat';
$payload['value'] = 22.00;
$payload['countries'] = array(118);

$tax_profile_operation = $storeden->post('/taxes/taxprofile.json', $payload);
					
Create Tax Profile Response

{
    "tax_profile": {
        "id": "5b30ec9516f46a431a2c6fd6"
    }
}
						

Delete Tax Profile

DELETE
/taxes/taxprofile.json
PARAMETERS LIST
id required (StoredenID) Unique id of tax profile
After removing tax profile, products with this profile associated will be contain an empty profile
Delete Tax Profile Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['id'] = '5b30ec9516f46a431a2c6fd6';

$tax_profile_operation = $storeden->delete('/taxes/taxprofile.json', $payload);
					
Delete Tax Profile Request

{
    "ok": 1,
    "n": 1,
    "err": null,
    "errmsg": null
}