bizAPIs V3

Version 3 introduces a simplified API architecture. Instead of multiple service-specific endpoints, the API now uses a unified endpoint structure where the service name is specified in the request body rather than the URL path.

Previous Approach (v2)

In v2, each service had its own dedicated endpoint:

POST /v2/documents/at-divida
POST /v2/documents/nifName
POST /v2/documents/cpp

New Approach (v3)

In v3, all service calls go through a single endpoint, with the service name passed as a body parameter:

POST /v3/documents/processRequest

Endpoints

List Available Services

Returns all services enabled for the authenticated user's account.

Endpoint: GET /v3/documents/list-services

Response:

[
  {
    "serviceName": "at-aggregator",
    "serviceIdentifier": "AT-AGGREGATOR",
    "sourcePortalURL": "https://www.acesso.gov.pt/v2/loginForm?partID=PFAP&path=/geral/dashboard",
    "sourcePortal": "Autoridade Tributária",
    "region": {
      "countryPortal": "PT",
      "jurisdictionCode": "PT"
    },
    "servicePayload": {
      "user": "<nif para autenticação no portal>",
      "password": "<password para autenticação no portal>",
      "properties": {
        "demoMode": "false"
      }
    }
  }
]

Response Fields:

FieldTypeDescription
serviceNamestringInternal name of the service
serviceIdentifierstringUnique identifier for the service
sourcePortalURLstringURL of the source portal
sourcePortalstringHuman-readable name of the source portal
regionobjectRegion configuration for the service
region.countryPortalstringCountry portal code
region.jurisdictionCodestringJurisdiction code
servicePayloadobjectTemplate payload showing required fields

Process Request

Invokes the specified service with the provided parameters.

Endpoint: POST /v3/documents/processRequest

Request Body:

FieldTypeRequiredDescription
serviceNamestringYesThe name of the service to invoke
regionobjectYesRegion configuration for the request
region.countryPortalstringYesCountry portal code (e.g., "PT")
region.jurisdictionCodestringYesJurisdiction code (e.g., "PT")
payloadobjectYesContainer for service-specific parameters
payload.serviceRequestBodyobjectYesService-specific request parameters

Example Request:

{
  "serviceName": "at-divida",
  "region": {
    "countryPortal": "PT",
    "jurisdictionCode": "PT"
  },
  "payload": {
    "serviceRequestBody": {
      "exampleBodyParameter1": "",
      "exampleBodyParameter2": 11
    }
  }
}

Migration Steps

  1. Update your endpoint URL to use /v3/documents/processRequest
  2. Move the service name from the URL path to the serviceName field in the request body
  3. Add the region object with appropriate countryPortal and jurisdictionCode values
  4. Wrap your existing request parameters inside payload.serviceRequestBody