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:
You can modify an order as long as it has not been validated.
Once validated, it is only possible to record the payment(s) for the order via the "payment" field.
Submit a complete order: items, customer, payment method, delivery, etc.
| Name | Type | Necessary | Description |
|---|---|---|---|
shopID | string | Yes | Your shop ID (SHOPID) |
key | string | Yes | Your token (APIKEY) |
orderID | int | Yes | The order ID to be modified |
idUser | int | No | User ID. If not specified, the software creates a user account with the "webservice" login if it does not already exist, and uses it. |
payment | int | Yes | -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) |
paymentAmount | int | No | Le montant payé, si "payment" indique un mode de paiement (si absent, le paiement est considéré comptant) |
idClient | int | No | Existing customer ID to assign to the order |
client | array | No | A customer account needs to be created and assigned to the order.* |
idtable | int | No | Table ID to assign to the order |
idcaisse | int | No | Cash register ID to assign to the order |
numcouverts | int | No | Number of place settings served at the table |
publicComment | string | No | Comment attached to the order (public) |
privateComment | string | No | Comment attached to the order (private) |
pagerNum | int | No | Pager number |
deliveryMethod | int | No | Delivery method* |
itemsList | array | Yes | Pager number |
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] The deliveryMethod field can have values ranging from 0 to 6:
| Amount | Meaning |
|---|---|
| 0 | Take away |
| 1 | To be delivered |
| 2 | On site |
| 3 | Drive-Thru |
| 4 | Counter sales |
| 5 | Relay point |
| 6 | To be shipped |
The itemsList field is an array of strings, each element of which can be of one of the following types::
[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-[idRayon]_[prix]_[titre] — creates a free line attached to the rayFree_[prix]_[titre] — creates a free lineasync function recordSaleWithExistingClient(){ const body = new URLSearchParams({ shopID: SHOPID, key: APIKEY, orderID: 123456, payment: -1 }); body.append("itemsList[]", "Free_12.99_Item"); body.append("itemsList[]", "Free_9.99_Other item"); const res = await fetch("https://kash.click/workers/editOrder.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);} async function recordSaleWithExistingClient(){ const body = new URLSearchParams({ shopID: SHOPID, key: APIKEY, payment: -2, orderID: 123456, idClient: 123 }); const res = await fetch("https://kash.click/workers/editOrder.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);} async function recordSaleWithNewClient(){ const body = new URLSearchParams({ shopID: SHOPID, key: APIKEY, orderID: 123456, payment: 123456 }); const res = await fetch("https://kash.click/workers/editOrder.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);}{ "success": true, "orderID":17724460, "paymentLink":"A link the client can use to pay the order", "invoice":"URL of the PDF invoice"} { "success": true, "orderID":17724461, "paymentLink":"A link the client can use to pay the order", "quote":"URL of the PDF qduote"} { "success": true, "orderID":17724461, "invoice":"URL of the PDF qduote"} { "success": false, "result": "Error message"}
This document is made available under the terms of the licence Creative Commons Attribution 4.0 International (CC BY 4.0) .