Tax Profiles List
Obtain a list of all tax profiles available on current shop
GET
/taxes/list.json
Obtain a list of all tax profiles available on current shop
GET
/taxes/list.json
$storeden = new Storeden\Storeden($config);
$tax_profile_list = $storeden->get('/taxes/list.json');
[
{
"id": "52dd3382be85f18660000000",
"value": 22,
"title": "Profilo Iva EU 22%",
"countriesUID": [
82,83,91,119,198,226
]
},
...
]
Get single tax profile if exist
GET
/taxes/taxprofile.json?id={tax-id}
id required (StoredenId) | Unique id of your tax profile |
$storeden = new Storeden\Storeden($config);
$tax_profile = $storeden->get('/taxes/taxprofile.json?id=52dd3382be85f18660000000');
{
"id": "52dd3382be85f18660000000",
"value": 22,
"title": "South-East Europe 22%",
"countriesUID": [
82,83,91,119,198,226
]
}
POST
/taxes/taxprofile.json
name required (string) | |
value required (float) | Tax percentage |
countries[] required (array) | Array of countries uid ( /countries/list.json ) |
$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);
{
"tax_profile": {
"id": "5b30ec9516f46a431a2c6fd6"
}
}
DELETE
/taxes/taxprofile.json
id required (StoredenID) |
Unique id of tax profile After removing tax profile, products with this profile associated will be contain an empty profile |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['id'] = '5b30ec9516f46a431a2c6fd6';
$tax_profile_operation = $storeden->delete('/taxes/taxprofile.json', $payload);
{
"ok": 1,
"n": 1,
"err": null,
"errmsg": null
}