All of the following endpoints accept &format=json, &format=csv, or &format=html.
| Ressource | Endpoint |
|---|---|
| Items | /workers/getPlus.php |
| Departments | /workers/getDepartments.php |
| Department groups | /workers/getDepartmentGroups.php |
| Clients | /workers/getClients.php |
| Variations of items | /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 |
https://www.free-cash-register.net/workers/[endpoint].php?idboutique=[SHOPID]&key=[APIKEY]&format=[csv|json|html] function buildUrl(path, params){ const qs = new URLSearchParams(params); return `${path}?${qs.toString()}`;}async function fetchResource(endpoint, format = "json"){ const url = buildUrl(`https://www.free-cash-register.net/workers/${endpoint}.php`, { idboutique: SHOPID, key: APIKEY, format }); const res = await fetch(url); return format === "json" ? res.json() : res.text();}// 1) Items in JSONfetchResource("getPlus", "json").then(data => console.log("Articles:", data));// 2) Clients in CSVfetchResource("getClients", "csv").then(csv => console.log("Clients (CSV):\n", csv));// 3) Depts in HTML (injection)fetchResource("getDepartments", "html").then(html => { document.getElementById("rayons").innerHTML = html;}); Register now
This document is made available under the terms of the licence Creative Commons Attribution 4.0 International (CC BY 4.0) .