REST · JSON · OpenAPI
LNME.AO API
Plug Angola's National List of Essential Medicines into your hospital management systems, pharmacies and e-Health apps. Plain JSON, token access and OpenAPI documentation.
-
Base URL
https://www.lnme.jacriativos.com/api/v1 - FormatJSON, UTF-8
- AuthenticationJWT token on every request
Your first call
First get a token (see “Authenticate” below) and send it in the Authorization header. Accounts are created by the administration.
curl "https://www.lnme.jacriativos.com/api/v1/medicamentos?search=paracetamol&per_page=2" \
-H "Authorization: Bearer $TOKEN"
const res = await fetch("https://www.lnme.jacriativos.com/api/v1/medicamentos?search=paracetamol&per_page=2", {
headers: { Authorization: `Bearer ${token}` },
});
const { items, total } = await res.json();
console.log(total, items[0].nome_generico);
$context = stream_context_create(['http' => ['header' => "Authorization: Bearer $token"]]);
$data = json_decode(file_get_contents(
'https://www.lnme.jacriativos.com/api/v1/medicamentos?search=paracetamol&per_page=2', false, $context
), true);
echo $data['total'], ' ', $data['items'][0]['nome_generico'];
Response (abridged)
{
"items": [
{
"id": 34,
"codigo_nacional": "38-17001LP",
"nome_generico": "paracetamol",
"composicao": "125 mg/5 ml",
"apresentacao": "suspensão oral",
"requer_receita": 0,
"nivel_atencao": [ { "id": 1, "nome": "Posto de Saúde", "sigla": "PS" } ],
"forma_icone": "cup",
"forma_dose": "syrup"
}
],
"page": 1, "per_page": 2, "total": 4, "pages": 2
}
Endpoints
All return JSON and need the Authorization header, except sign-in and token renewal.
Catalogue
-
GET
/api/v1/medicamentosList and search medicines (search, nivel_atencao, requer_receita, page, per_page) JWT -
GET
/api/v1/medicamentos/{id}Full medicine record, with interactions JWT -
GET
/api/v1/niveis-atencaoLevels of care JWT
Dosage
-
GET
/api/v1/medicamentos/{id}/regras-dosagemActive dosage rules of a medicine JWT -
POST
/api/v1/regras-dosagem/{id}/calcularCalculate the dose from weight and age, in mg and ml JWT
Interactions
-
GET
/api/v1/interacoesActive interactions (of one medicine, or all) JWT -
POST
/api/v1/interacoes/verificarCheck interactions between several medicines, most severe first JWT
Alerts and pharmacies
-
GET
/api/v1/alertasARMED health alerts (bans, suspensions, restrictions, falsifications and defects) JWT -
GET
/api/v1/disponibilidadePharmacies that have the medicine, cheapest first JWT -
PUT
/api/v1/disponibilidadeSet availability and price (pharmacy accounts) JWT
Prescriptions
-
GET
/api/v1/prescricoes/{uuid}Verify a prescription by its code JWT -
GET
/api/v1/prescricoesYour account's prescriptions JWT -
POST
/api/v1/prescricoesIssue a prescription, with Kuida+ structured dosing JWT
Account
-
POST
/api/auth/tokenSign in: returns the token and refresh token Open -
POST
/api/auth/token/refreshRenew the token (the refresh token works once) Open -
GET
/api/v1/meThe authenticated account JWT
Authenticate
Accounts are created by the administration. With an account, it takes three steps.
-
1Get the token
curl -X POST https://www.lnme.jacriativos.com/api/auth/token \ -H "Content-Type: application/json" \ -d '{"email":"ana@exemplo.ao","password":"…"}' # → {"token": "…", "refresh_token": "…"} -
2Use the token
curl https://www.lnme.jacriativos.com/api/v1/prescricoes \ -H "Authorization: Bearer <token>" -
3Renew when it expires
curl -X POST https://www.lnme.jacriativos.com/api/auth/token/refresh \ -H "Content-Type: application/json" \ -d '{"refresh_token":"…"}'
Responses and errors
- 200Request succeeded
- 201Created (prescription issued)
- 401Missing, invalid or expired token
- 403The account cannot do this (for example, only pharmacies set stock)
- 404Not found, or deleted
- 422Invalid data: the message says what to fix
- 429Too many requests: wait for the Retry-After time
Need an account?
Professionals and pharmacies request access; you get the answer by e-mail.