API Requests & Responses
Overview of how API requests and responses work in Proff Connect.
This page explains how ProffConnect communicates with the Proff API, including request format, authentication headers, example responses, pagination, and how errors are handled.
All traffic is outbound-only and initiated by Salesforce users.
1. Request Structure
HTTP Method
All requests sent by ProffConnect use:
- GET (read-only)
ProffConnect never writes or updates external data.
Protocol
All communication is encrypted:
- HTTPS / TLS 1.2+
Request Format
- JSON (UTF-8 encoded)
Headers Used
ProffConnect uses a minimal and secure header set:
| Header | Purpose |
|---|---|
| Authorization: Token <your_token> | Authenticates the request (retrieved securely at runtime) |
| Content-Type: application/json | Declares JSON format |
| User-Agent | Identifies the managed package version |
| Correlation-ID | Unique ID used for debugging/troubleshooting |
No Salesforce record data or personal information is included in headers.
2. Example Request (Redacted)
GET https://api.proff.no/api/companies/register/NO/123456789
Authorization: Token ******************* // Securely retrieved at runtime
Content-Type: application/json
User-Agent: <Managed_Packaged_Code>
Correlation-ID: <generated-id>
ProffConnect automatically inserts the correct token and correlation ID during the callout.
3. Example Successful Response (Public Data Only)
{
"companyType": "AS",
"companyTypeName": "Aksjeselskap",
"registeredForVat": true,
"registrationDate": "16.12.2024",
"name": "Example Company AS",
"organisationNumber": "123456789",
"personRoles": [
{
"name": "***",
"birthDate": "***",
"title": "Styrets leder"
}
]
}
Note: Names and birth dates may be masked by Proff depending on data category and region.
4. Pagination
Certain endpoints use pagination when returning large datasets. The API includes metadata such as:
{
"pagination": {
"currentPage": 1,
"pageSize": 10,
"numberOfAvailablePages": 100,
"next": {
"pageNumber": 2
}
}
}
ProffConnect automatically handles pagination in flows where multiple pages of results are needed.
5. Error Response Examples
Below are common response types returned by the Proff API and how ProffConnect presents them.
401 – Unauthorized
Token missing, invalid, or expired.
{
"message": "Unauthorized - Invalid Authorization header format."
}
404 – Not Found
The requested entity does not exist.
{
"title": "Not Found",
"status": 404,
"detail": "Entity Not Found"
}
429 – Too Many Requests
Rate limit reached. ProffConnect does not retry automatically.
{
"status": 429,
"detail": "Rate limit exceeded."
}
500 – External Service Error
Unexpected error on Proff's side.
{
"status": 500,
"detail": "Unexpected server error."
}
User-friendly messages are displayed inside Salesforce.
6. Retry Behavior
ProffConnect never performs automated retries.
If a request fails:
- The user receives a descriptive message
- They may retry manually after adjusting the input or waiting (in case of rate limiting)
This ensures transparent and predictable usage.
Was this article helpful?