Free cash register

Kash.click, free online POS software since 2011

Follow Us

L’aide, à portée de main

Comment pouvons-nous vous aider ?

Un réglage, une question, un geste du quotidien. Trouvez le bon guide et avancez simplement.

API / Web services

Department management

Add, modify, or delete department

Add a department

POST https://kash.click/workers/addDept.php

Add a new department to your catalog

POST parameters

??????
shopID?Your institution's identifier
key?Your API key
data[title]?Title (required)
data[shortTitle]??Store Name
data[stock]??Quantity in stock
data[vatID]??VAT rate ID
data[eatinvatID]??VAT rate ID on site
data[discountID]??ID of the discount
data[price]??Selling price
data[keyboardHide]??Hide from the sales interface
data[shopHide]??Hide from the shop
data[position]??Position (on the interface)
data[deptGroupID]??Department Group ID
data[unitID]??Unit ID
data[needPrepa]??Area for preparing the department
data[variationID0]??ID variation 0
data[variationID1]??ID variant 1
data[variationID2]??ID variant 2
data[variationID3]??ID variant 3
data[variationID4]??ID variant 4
data[activityCode]??Activity accounting code

Edit a Department

POST https://kash.click/workers/editDept.php

Edit a department of your catalog

POST parameters

??????
shopID?Your institution's identifier
key?Your API key
id?Department Identifier
data[title]??Title (required)
data[shortTitle]??Store Name
data[stock]??Quantity in stock
data[vatID]??VAT rate ID
data[eatinvatID]??VAT rate ID on site
data[discountID]??ID of the discount
data[price]??Selling price
data[keyboardHide]??Hide from the sales interface
data[shopHide]??Hide from the shop
data[position]??Position (on the interface)
data[deptGroupID]??Department Group ID
data[unitID]??Unit ID
data[needPrepa]??Area for preparing the department
data[variationID0]??ID variation 0
data[variationID1]??ID variant 1
data[variationID2]??ID variant 2
data[variationID3]??ID variant 3
data[variationID4]??ID variant 4
data[activityCode]??Activity accounting code

Delete a department

POST https://kash.click/workers/delDept.php

Remove a department from your catalog

POST parameters

??????
shopID?Your institution's identifier
key?Your API key
id?Department Identifier

JavaScript example

async function editDept(){
  const body = new URLSearchParams({
    shopID: SHOPID,
    key: 'REMPLACER_PAR_VOTRE_CLE_API_GENEREE',
    id: 123,
    'data[title]': 'New title'
  });

  const res = await fetch("https://kash.click/workers/editDept.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);
}

This document is made available under the terms of the licence Creative Commons Attribution 4.0 International (CC BY 4.0).