VAT rate management
Add, modify, or delete VAT rates
Add a VAT rate
POST https://kash.click/workers/addVat.php
Add a new VAT rate to your configuration
POST parameters
| Name | Required | Description |
|---|---|---|
shopID | Yes | Your institution's identifier |
key | Yes | Your API key |
data[title] | Yes | Title (required) |
data[accountingChapter] | No | Accounting chapter |
data[rate] | Yes | Rate (required) |
data[legal] | No | Legal mention |
Change a VAT rate
POST https://kash.click/workers/editVat.php
Modify an existing VAT
POST parameters
| Name | Required | Description |
|---|---|---|
shopID | Yes | Your institution's identifier |
key | Yes | Your API key |
id | Yes | VAT rate identifier |
data[title] | No | Title (required) |
data[accountingChapter] | No | Accounting chapter |
data[rate] | No | Rate (required) |
data[legal] | No | Legal mention |
Delete a VAT rate
POST https://kash.click/workers/delVat.php
Remove an existing VAT
POST parameters
| Name | Required | Description |
|---|---|---|
shopID | Yes | Your institution's identifier |
key | Yes | Your API key |
id | Yes | VAT rate identifier |
JavaScript example
async function editVAT(){
const body = new URLSearchParams({
shopID: SHOPID,
key: 'REMPLACER_PAR_VOTRE_CLE_API_GENEREE',
id: 123,
'data[title]': '20% VAT',
'data[rate]': 20
});
const res = await fetch("https://kash.click/workers/editVat.php", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body
});
let payload; try{ payload = await res.json(); }catch{ payload = await res.text(); }
console.log(payload);
}