Skip to content
Reference

Reference for shared request and response behavior.

This reference summarizes the conventions shared by the current Angola utility surface, including validation, geo, finance, salary, time, and document routes alongside the original upstream-backed endpoints.

Published endpoints

28

Success format

JSON only

Binary responses

PDF on POST documents

Endpoint catalog

RouteMethodPurposeKey input
/api/v1/validate/*GETValidate Angolan IBAN and local bank-account structures.iban or account query
/api/v1/phone/*GETParse phone numbers, validate format, and detect operators.phone query
/api/v1/address/* + /api/v1/geo/*GETNormalize addresses and read Angola location registries.q, province, municipality, address
/api/v1/calendar/*GETReturn holidays and business-day calculations.year, from/to, date/days
/api/v1/finance/*GETRun VAT, invoice, and inflation calculations.amount or lines query
/api/v1/salary/*GETEstimate payroll net, gross, and employer-cost values.gross or net query
/api/v1/time/*GETRead current time, convert timezones, and check business hours.timezone, datetime, start/end
/api/v1/documents/*POSTGenerate invoice, receipt, and contract PDFs.JSON body
/api/nif/{nif}GETLook up Angolan taxpayer identity fields.NIF path parameter
/api/translatePOSTTranslate text and return detected source language.JSON body: text, to, optional from
/api/exchange/{base}GETReturn exchange rates, optionally multiplied by amount.base path parameter, optional amount query

Response patterns

Success payloads are endpoint-specific, but they stay flat and application-oriented. Calculator endpoints surface derived values plus the assumptions or basis used to produce them.

Document routes are the main exception: they return binary PDF responses with attachment headers. Most other endpoints return JSON and an error envelope when something goes wrong.

JSONTypical error response
{  "error": {    "code": "UPSTREAM_TIMEOUT",    "message": "The currency service did not respond in time.",    "baseCurrency": "AOA",    "amount": "1000000"  }}

Status codes and intent

StatusMeaningTypical action
200Validated request succeeded.Use the payload directly.
400Input is missing, malformed, or unsupported.Fix the request; no retry.
404Requested resource could not be found upstream.Show a clear not-found state.
502Upstream service failed or returned malformed data.Retry with backoff or degrade gracefully.
504Upstream dependency timed out.Retry if the user flow can tolerate it.
500Unexpected internal failure.Log, alert, and treat as retryable only if your UX allows.

Operational notes

  • All route handlers are marked dynamic, so you should not rely on build-time pre-rendered responses.
  • User-Agent headers are explicitly set for the upstream-backed legacy requests to improve provider compatibility.
  • Input sanitization is conservative: route parameters are trimmed and normalized before request dispatch.
  • Bank validation responses include a generated bank image badge so front ends can render a recognizable visual without extra lookups.
  • Document endpoints are synchronous; keep payloads compact and perform downstream storage asynchronously in your own system when needed.