Reduceri și coduri
6 rute, cu exemplu de cerere pentru fiecare.
Adresa de bază: https://app.ilustromania.com/nucleu. Autentificarea, formatul și erorile sunt în Prezentarea API-ului.
Modulul reduceri
GET/v1/reduceri/{platforma}
Starea reducerilor pe platformă
Starea reducerilor pe Glovo sau Wolt; Bolt e doar citire (poate_scrie: false). 404 platformă necunoscută.
| Nume | Tip | Descriere |
|---|---|---|
platforma | string | valoarea din cale |
curl https://app.ilustromania.com/nucleu/v1/reduceri/{platforma} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/reduceri/{platforma}", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/reduceri/{platforma}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/reduceri/{platforma}
Cere o reducere pe platformă
Pune o cerere de reducere pentru Glovo sau Wolt, preluată de scriptul de pe server; 202 in_asteptare, 409 cerere în curs sau Bolt.
| Nume | Tip | Descriere |
|---|---|---|
platforma | string | valoarea din cale |
curl -X POST https://app.ilustromania.com/nucleu/v1/reduceri/{platforma} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/reduceri/{platforma}", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/reduceri/{platforma}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()GET/v1/reduceri/active
Reducerile active pe canale
Reducerile active citite din fișierul generat; doar firma platformei, administratorul sau cine are pagina.
curl https://app.ilustromania.com/nucleu/v1/reduceri/active \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/reduceri/active", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/reduceri/active",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()Modulul coduri-reducere
GET/v1/coduri-reducere
Codurile de reducere
Lista codurilor de reducere ale firmei (administrator).
| Câmp | Tip | Obligatoriu | Detalii |
|---|---|---|---|
coduri | object[] | da | — |
coduri[].id | string | da | UUID |
coduri[].cod | string | da | între 3 și 24 caractere |
coduri[].tip | string | da | una din: procent, suma |
coduri[].valoare | number | da | cel puțin 0 |
coduri[].maxFolosiri | integer | da | între 0 și 9007199254740991 |
coduri[].oDataPeClient | boolean | da | — |
coduri[].valabilDeLa | string | da | moment ISO 8601 |
coduri[].valabilPanaLa | string | da | moment ISO 8601 |
coduri[].activ | boolean | da | — |
coduri[].produseIds | string[] | da | — |
coduri[].creatDe | string | da | UUID |
coduri[].creatLa | string | da | moment ISO 8601 |
curl https://app.ilustromania.com/nucleu/v1/coduri-reducere \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/coduri-reducere", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/coduri-reducere",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json(){
"coduri": [
{
"id": "3f0c2a8e-6b1d-4c3a-9e2f-1a2b3c4d5e6f",
"cod": "text",
"tip": "procent",
"valoare": 12.5,
"maxFolosiri": 1,
"oDataPeClient": true,
"valabilDeLa": "2026-11-12T09:30:00.000Z",
"valabilPanaLa": "2026-11-12T09:30:00.000Z",
"activ": true,
"produseIds": [],
"creatDe": "3f0c2a8e-6b1d-4c3a-9e2f-1a2b3c4d5e6f",
"creatLa": "2026-11-12T09:30:00.000Z"
}
]
}POST/v1/coduri-reducere
Adaugă un cod de reducere
Creează un cod nou; 409 cod existent, 400 produs invalid.
curl -X POST https://app.ilustromania.com/nucleu/v1/coduri-reducere \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/coduri-reducere", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/coduri-reducere",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()PATCH/v1/coduri-reducere/{id}
Modifică un cod de reducere
Schimbă câmpurile unui cod de reducere existent.
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X PATCH https://app.ilustromania.com/nucleu/v1/coduri-reducere/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/coduri-reducere/{id}", {
method: "PATCH",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.patch(
"https://app.ilustromania.com/nucleu/v1/coduri-reducere/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()