8 rute, cu exemplu de cerere pentru fiecare.
Adresa de bază: https://app.ilustromania.com/nucleu. Autentificarea, formatul și erorile sunt în Prezentarea API-ului.
GET/v1/registru
Starea Registrului
Starea celor 7 colecții ale Registrului pentru firma din sesiune. Citire pentru admin, patron, finanțe; fără cache.
curl https://app.ilustromania.com/nucleu/v1/registru \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru", {
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/registru",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()GET/v1/registru/col
Documentele unei colecții din Registru
Documentele colecției ?c=, opțional filtrate camp=egal; colecția acte_data cere filtru.
curl https://app.ilustromania.com/nucleu/v1/registru/col \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/col", {
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/registru/col",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/registru/col/scrie
Scrie în Registru
Operații set, update sau delete pe un document al colecției, cu versiune: 409 versiune_veche. Schimbarea numerelor de factură cere REGISTRU_EMITE; 409 numar_dublat.
curl -X POST https://app.ilustromania.com/nucleu/v1/registru/col/scrie \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/col/scrie", {
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/registru/col/scrie",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()GET/v1/registru/drept-emite
Pot emite din Registru
{emite}: dacă contul din sesiune are dreptul REGISTRU_EMITE pe firma activă (false, nu 403, pentru cine nu îl are).
curl https://app.ilustromania.com/nucleu/v1/registru/drept-emite \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/drept-emite", {
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/registru/drept-emite",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/registru/numar
Alocă numărul de proformă sau factură
Alocă atomic următorul număr pe firmă pentru proforma/factura și an; 403 fără REGISTRU_EMITE.
curl -X POST https://app.ilustromania.com/nucleu/v1/registru/numar \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/numar", {
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/registru/numar",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()curl -X DELETE https://app.ilustromania.com/nucleu/v1/registru/oferte \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/oferte", {
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/registru/oferte",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/registru/oferte
Adaugă o ofertă în Registru
Creează o ofertă pentru un client, cu id și dată puse pe server.
curl -X POST https://app.ilustromania.com/nucleu/v1/registru/oferte \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/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/registru/oferte",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()curl -X PUT https://app.ilustromania.com/nucleu/v1/registru/oferte \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/registru/oferte", {
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/registru/oferte",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()