Free cash register

Kash.click, free online POS software since 2011

Follow Us

Help Center

This help will guide you through the setup and usage of our point of sale cash register software.

Search by keyword in the help section:

Accès rapide : gestes du quotidien

kash.click API

Complete and operational technical documentation. Each section includes ready-to-use JavaScript (fetch) examples.

Pour une intégration, demandez à un administrateur de créer une clé API dédiée avec les seules autorisations nécessaires, puis utilisez-la avec SHOPID. Guide administrateur : créer, limiter, tester et révoquer une clé API.

1) Authentication — Obtain an auth token

Different methods:

  1. Méthode recommandée : clé dédiée : Configuration → Webservices → Clés API, depuis une session administrateur. Choisissez un nom, les autorisations nécessaires et éventuellement une expiration.
  2. Compatibilité par confirmation du courriel : https://kash.click/workers/getOTPForAccount.php
  3. Compatibilité par login et mot de passe : https://kash.click/workers/getAuthTokenWithPassword.php

Les anciennes routes getAuthToken.php, getAuthTokenWithPassword.php et getAuthTokenWithOTP.php exigent un administrateur actif pour délivrer une nouvelle clé gérée, sans expiration et avec tous les droits. Un collaborateur reçoit api_admin_required (HTTP 403) ; contactez un administrateur pour obtenir une clé dédiée. Les protections d’identité et de second facteur restent applicables. Les clés déjà émises et les connexions existantes restent valides.

1.1 POST /workers/getAuthToken.php

Route de compatibilité pour le login et le mot de passe d’un administrateur. La route getAuthTokenWithPassword.php applique les mêmes contrôles et ajoute success: true à sa réponse de succès. Préférez une clé dédiée pour toute nouvelle intégration.

Les deux routes partagent les mêmes limites : 10 tentatives par login et par 15 minutes, 30 par IP et par 15 minutes, 200 par IP et par jour, et 600 par minute pour l’ensemble du service. Les succès sont également comptés. Une limitation retourne HTTP 429 avec success: false, error: rate_limited, message et Retry-After en secondes. Attendez ce délai avant de réessayer ; alterner les routes ne remet pas les compteurs à zéro.

Utilisez uniquement des champs POST : login (254 octets maximum) et password (1024 octets maximum). Une requête mal formée retourne HTTP 400, une autre méthode HTTP 405. Un schéma ou service indisponible retourne HTTP 503 avec migration_required ou service_unavailable. Les réponses ne sont pas mises en cache.

POST parameters

  • login — the login of your existing account
  • password — the password for your existing account

Expected JSON response (success)

{ "result": "OK", "APIKEY": "[votre Token]", "SHOPID": "[identifiant de compte boutique]"}

JavaScript example (fetch)

const login = "mon.email@example.com";const password = "monMotDePasse";fetch("https://kash.click/workers/getAuthToken.php", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ login, password })}) .then(r => r.json()) .then(data => {  if (data.result === "OK") {   console.log("Token:", data.APIKEY);   console.log("Boutique:", data.SHOPID);  } else {   console.error("Erreur d'authentification", data);  } });

2) With the API key you can…

  • Download your sales data
  • Download items, customers, departments, etc.
  • Record sales
  • Consulter les emails, envoyer des messages et gérer les dossiers de la boutique — Shop messaging

3) Download your sales (daily)

GET /workers/getSales.php

Base URL: https://kash.click/workers/getSales.php

Settings

NameTypeRequiredDescription
shopIDstringYesShop Account ID (SHOPID)
keystringYesYour token (APIKEY)
dintNoDay (if not specified, the day before is used)
mintNoMonthly
yintNoYear
formatExportstringYesStd (HTML report), PDF, XLS, CSV, frafec (FEC), saft

JavaScript Examples

// Aide pour construire une URL GETfunction buildUrl(path, params){ const qs = new URLSearchParams(params); return `${path}?${qs.toString()}`;}const SHOPID = "[SHOPID]";const APIKEY = "[APIKEY]";// 1) Export CSV pour date préciseconst urlCsv = buildUrl("https://kash.click/workers/getSales.php", { shopID: SHOPID, key: APIKEY, d: 16, m: 10, y: 2025, formatExport: "CSV"});fetch(urlCsv).then(r=>r.text()).then(csv=>console.log(csv));// 2) Rapport HTML (Std) pour la veille (sans date)const urlStd = buildUrl("https://kash.click/workers/getSales.php", { shopID: SHOPID, key: APIKEY, formatExport: "Std"});fetch(urlStd).then(r=>r.text()).then(html=>{ document.getElementById("rapport").innerHTML = html;});// 3) Rapport PDF (Blob)const urlPdf = buildUrl("https://kash.click/workers/getSales.php", { shopID: SHOPID, key: APIKEY, d: 16, m: 10, y: 2025, formatExport: "PDF"});fetch(urlPdf).then(r=>r.blob()).then(pdf=>{ const a = document.createElement("a"); a.href = URL.createObjectURL(pdf); a.download = "rapport-ventes.pdf"; a.click();});

4) Download list of items, departments, clients, etc

All of the following endpoints accept &format=json, &format=csv, or &format=html.

4.1 Available endpoints

ResourceEndpoint
Items/workers/getPlus.php
Departments/workers/getDepartments.php
Department groups/workers/getDepartmentGroups.php
Customers/workers/getClients.php
Product variations/workers/getDeclinaisons.php
Delivery methods/workers/getLivraisons.php
Payment methods/workers/getPaymentModes.php
Cashboxes/workers/getCashbox.php
Delivery zones/areas/workers/getDeliveryZones.php
Relay point/workers/getRelayDeposit.php
Discounts/workers/getDiscounts.php
Users/workers/getUsers.php
Tables/workers/getTables.php
Pending orders/workers/getPending.php

URL pattern

https://kash.click/workers/[endpoint].php?shopID=[SHOPID]&key=[APIKEY]&format=[csv|json|html]

JavaScript Examples

// Récupération d'une ressource génériquefunction buildUrl(path, params){ const qs = new URLSearchParams(params); return `${path}?${qs.toString()}`;}async function fetchResource(endpoint, format = "json"){ const url = buildUrl(`https://kash.click/workers/${endpoint}.php`, {  shopID: SHOPID,  key: APIKEY,  format }); const res = await fetch(url); return format === "json" ? res.json() : res.text();}// 1) Articles en JSONfetchResource("getPlus", "json").then(data => console.log("Articles:", data));// 2) Clients en CSVfetchResource("getClients", "csv").then(csv => console.log("Clients (CSV):\n", csv));// 3) Rayons en HTML (injection)fetchResource("getDepartments", "html").then(html => { document.getElementById("rayons").innerHTML = html;});

5) Record sales in the software

POST /workers/webapp.php

Submit a complete order: items, customer, payment method, delivery, etc.

POST parameters

NameTypeRequiredDescription
shopIDstringYesYour shop ID (SHOPID)
keystringYesYour token (APIKEY)
idUserintNoUser ID. If not specified, the software creates a user account with the "webservice" login if it does not already exist, and uses it.
paymentintYes-2 = Not paid, not validated; -1 = Not paid, validated; a payment method identifier to indicate a payment (can be an identifier of a refund method)
idClientintNoExisting customer ID to assign to the order
idtableintNoTable ID to assign to the order
idcaisseintNoCash register ID to assign to the order
numcouvertsintNoNumber of place settings served at the table
publicCommentstringNoComment attached to the order (public)
privateCommentstringNoComment attached to the order (private)
pagerNumintNoPager number

Create a new customer in the same query

If the customer does not exist, you can create it with the following fields (to be sent directly by POST):

client[nom]=[nom]client[prenom]=[Prénom]client[email]=[Email]client[telephone]=[nom]client[adresseligne1]=[Adresse ligne 1]client[adresseligne2]=[Adresse ligne 2]client[commentaireadresse]=[nom]client[codepostal]=[Code postal]client[ville]=[Ville]client[pays]=FRclient[numtva]=[Numéro TVA]client[rcs]=[Numéro RC]client[codeBarre]=[Code barre]client[telephone2]=[Téléphone secondaire]client[lat]=[latitude]client[lng]=[longitude]

deliveryMethod

AmountMeaning
0Take away
1To be delivered
2On site
3Drive-Thru
4Counter sales
5Relay point
6To be shipped

itemsList[] — Structure and examples

  • [idArticle] — add an item (quantity 1)
  • [idArticle]_[quantite] — specify the quantity
  • [idArticle]_[quantite]_[titre personnalisé]_[prix personnalisé] — force the title and price
  • [idArticle]_[quantite]_[titre]_[prix]_[idDéclinaison1]_[idDéclinaison2]_[idDéclinaison3]_[idDéclinaison4]_[idDéclinaison5] — add up to 5 variations
  • Over-the-counter sale : -[idRayon]_[prix]_[titre] — creates a free line attached to the ray
  • Over-the-counter sale : Free_[prix]_[titre] — creates a free line

JavaScript Example — Existing Client

async function enregistrerVenteAvecClientExistant(){ const body = new URLSearchParams({  shopID: SHOPID,  key: APIKEY,  idUser: 1,  payment: -1,  deliveryMethod: 0,  idClient: 123 }); body.append("itemsList[]", "12_2_Pizza 4 fromages_14.50_3_8"); body.append("itemsList[]", "-5_9.99_Vente libre"); const res = await fetch("https://kash.click/workers/webapp.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);}

JavaScript Example — New Customer + Sale

async function enregistrerVenteAvecNouveauClient(){ const body = new URLSearchParams({  shopID: SHOPID,  key: APIKEY,  payment: 2,  deliveryMethod: 1 }); body.append("client[nom]", "Durand"); body.append("client[prenom]", "Zoé"); body.append("client[email]", "zoe.durand@example.com"); body.append("client[telephone]", "+33 6 12 34 56 78"); body.append("client[adresseligne1]", "10 rue des Écoles"); body.append("client[adresseligne2]", "Bât. B"); body.append("client[commentaireadresse]", "Sonner 2 fois"); body.append("client[codepostal]", "75005"); body.append("client[ville]", "Paris"); body.append("client[pays]", "FR"); body.append("client[numtva]", "FRXX999999999"); body.append("client[rcs]", "RCS Paris 123 456 789"); body.append("client[codeBarre]", "CUST-0001"); body.append("client[telephone2]", "+33 1 23 45 67 89"); body.append("client[lat]", "48.848"); body.append("client[lng]", "2.347"); body.append("itemsList[]", "42_1_Menu midi_12.90"); body.append("itemsList[]", "15_3_Canette Cola_2.50"); const res = await fetch("https://kash.click/workers/webapp.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);}
Reminder: if idUser is omitted, the software automatically uses/creates a “webservice” user.

6) Best practices & remarks

  • All requests must be made over HTTPS.
  • For POSTs, use Content-Type: application/x-www-form-urlencoded.
  • Encoding: UTF-8.
  • PDF/XLS/CSV exports are handled like Blobs on the browser side.

Les nouvelles clés délivrées par authentification ou création de boutique sont des clés gérées, sans expiration et avec toutes les autorisations. Elles apparaissent dans Configuration → Webservices → Clés API et peuvent ensuite être limitées ou révoquées. Les anciennes clés déjà utilisées restent valides.

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