Skip to main content
GET

Prerequisites

You need an active API key, a NIF with a valid checksum, available rate-limit capacity, and one credit from your included allowance or purchased balance. Retrieve company details using a Portuguese tax identification number. Each admitted request consumes one credit, including a cached lookup.

Path parameter

string
required
A nine-digit Portuguese tax identification number with a valid checksum. Spaces, hyphens, and periods are accepted as separators; URL-encode spaces if you include them. Prefer an unformatted nine-digit value.

Response

You receive 200 OK with this envelope:
string
required
Always "success" on success.
object
required
Your company’s details, with the fields below.

Company fields

These fields are present in the response. Text fields can be empty when information is unavailable. If your data provider supplies no capital or currency, the stored values default to "0" and "EUR" respectively. Do not interpret those defaults as independently verified financial figures.

Debt brackets

When tax_debt or social_security_debt is an object, it has these fields: Debt data describes a bracket, not an exact balance. A null debt object means no bracket is available in the imported dataset; it is not confirmation of zero debt. Check last_updated when using a bracket.

Data freshness

You receive stored company details when the record is less than six days old. For a missing or older record, the API attempts a refresh through NIF.PT, then falls back to the commercial registry if NIF.PT fails. If both upstream providers fail and an older cached company record is available, you receive 200 OK with stale: true. Its updated_at timestamp remains unchanged. There is no maximum age enforced for this fallback, so use the timestamp to decide whether the record is suitable for your application. Fresh-cache and successful-refresh responses have stale: false. Without a cached record, an upstream failure returns an error. Local database read or write failures can also return an error; stale fallback applies to upstream-fetch failures, not every lookup failure. Your company lookup has a 30-second service deadline. If the deadline is exceeded and stale fallback cannot return a record, you receive 504 company-lookup-timeout. Debt datasets are imported separately, so their source dates can differ from updated_at. Check each bracket’s last_updated independently.

Errors

  • 400 validation: your NIF cannot be normalized to nine digits or fails the checksum.
  • 404 company-not-found: no company was found for your valid NIF.
  • 502 company-lookup-failed: the lookup or refresh could not complete.
  • 504 company-lookup-timeout: the lookup exceeded its service deadline and could not return a fallback record.
See Errors for authentication, quota, and other shared failures.