10 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 oferte
curl https://app.ilustromania.com/nucleu/v1/oferte \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte", {
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/oferte",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()curl -X POST https://app.ilustromania.com/nucleu/v1/oferte \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte", {
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/oferte",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()DELETE/v1/oferte/{id}
Șterge oferta
Șterge oferta :id; 204, sau 404 dacă nu există.
Parametri de cale
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X DELETE https://app.ilustromania.com/nucleu/v1/oferte/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte/{id}", {
method: "DELETE",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.delete(
"https://app.ilustromania.com/nucleu/v1/oferte/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()GET/v1/oferte/{id}
O ofertă
Oferta :id; 404 dacă nu e a omului.
Parametri de cale
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl https://app.ilustromania.com/nucleu/v1/oferte/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte/{id}", {
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/oferte/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()PUT/v1/oferte/{id}
Salvează oferta
Rescrie oferta :id; 404 dacă nu există.
Parametri de cale
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X PUT https://app.ilustromania.com/nucleu/v1/oferte/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte/{id}", {
method: "PUT",
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.put(
"https://app.ilustromania.com/nucleu/v1/oferte/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()POST/v1/oferte/{id}/duplica
Duplică oferta
Creează o copie a ofertei :id; 201 cu copia, 404 dacă originalul nu există.
Parametri de cale
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X POST https://app.ilustromania.com/nucleu/v1/oferte/{id}/duplica \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte/{id}/duplica", {
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/oferte/{id}/duplica",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()POST/v1/oferte/{id}/status
Schimbă statusul ofertei
Setează statusul ofertei :id; 404 dacă nu există.
Parametri de cale
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X POST https://app.ilustromania.com/nucleu/v1/oferte/{id}/status \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oferte/{id}/status", {
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/oferte/{id}/status",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()Modulul catalog
curl https://app.ilustromania.com/nucleu/v1/catalog/sabloane \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/catalog/sabloane", {
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/catalog/sabloane",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()curl https://app.ilustromania.com/nucleu/v1/catalog/servicii \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/catalog/servicii", {
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/catalog/servicii",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()curl -X POST https://app.ilustromania.com/nucleu/v1/catalog/servicii \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/catalog/servicii", {
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/catalog/servicii",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()A fost utilă pagina?Mulțumim pentru răspuns.