Skip to content
Last updated

Requests and Responses

Authentication

To be able to retrieve company units, you must first authenticate your user account.

Please refer to the Authenticate API documentation for details on how to authenticate and obtain a token.

The generated token can be used across all Creditsafe Sweden REST APIs including DateCheck, GetData, SearchEngine, GetSignatory, GetUnitData, and SPAR.


Production URLs

GetDataUnit Endpoint:

https://se-webservice.apps.creditsafe.com/getdataunit

Health Check:

https://se-webservice.apps.creditsafe.com/getdataunit/health

Request Methods

The GetDataUnit REST API uses a single GET method to retrieve the list of units of an organization.

GetDataUnit Request

Endpoint:

GET /getdataunit

Example Request:

HEADER: Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Im…hPeGE7Ak8YtKFbA 
URL: https://se-webservice.apps.creditsafe.com/getdataunit?searchnumber=5565144408&transactionid=&language=sv&name=&address=&postnr=
Method: GET

Request Parameters

The table below describes each parameter included in the requests.

ParameterData typeMax lengthRequiredDescription
searchnumber (query)String10NoUnique identifier used to search for a company or business entity. Organization number (typically 10 digits). The value is normalised by the service before processing
name (query)String-NoCompany or business name used as search criteria
address (query)String-NoAddress value used as search criteria
postnr (query)String-NoPostal code used as search criteria
includeinactive (query)Boolean-NoWhen set to true, inactive entities are included in the results. Default: false
legacyformat (query)Boolean-NoIf you leave this parameter out or send a false value you will get the new format used in Creditsafe REST APIs. Pass true into this parameter if you want the API to respond with the old SOAP parameter format from previous versions of this service. The only reason to request the legacy format is if you are moving from the SOAP implementation to this new REST version and want a minimum of work with changing your implementation
language (query)String2NoLanguage used for response content and messages. Supported values are English (en) and Swedish (sv). Default: en
transactionid (query)String14NoCustomer's internal information (customer/invoice number). Recommended to use this field as it can be helpful in tracking your call in Creditsafe logs
Sandbox Parameter Behavior

In the sandbox version of this API, only the parameters searchnumber and transactionid are actively supported. All other parameters included in the request will be ignored without error or warning.

Developers are encouraged to structure their requests as they would in a production environment, including all expected parameters. This ensures consistency and simplifies the transition to production usage. However, it is important to understand that in sandbox mode, unsupported parameters will not influence the response and should not be relied upon for testing behavior or data validation.


Response (Successful)

The response contains a metaData object with request information and a report array with the list of company units found for the organization.

Legacy Format Note

This document only illustrates the response when legacyformat = false (default). For more information on the legacy format, please contact Creditsafe's Integration team for assistance.

HTTP Response code: 200 OK

{
  "metaData": {
    "apiLogId": 542900,
    "timeStamp": "2026-07-15T14:26:33",
    "resource": "GetDataUnit (1218)",
    "method": "GET",
    "requestUrl": "https://se-webservice.apps.creditsafe.com/getdataunit?searchnumber=5565144408&language=sv"
  },
  "report": [
    {
      "name": "Exempel Sverige AB",
      "officeType": {
        "code": "CTY1",
        "description": "Huvudkontor"
      },
      "status": {
        "code": "CST1",
        "description": "Aktivt"
      },
      "employeeRange": "200-499 anställda",
      "industry": {
        "code": "12345",
        "description": "Exempelföretagsbranschen"
      },
      "visitingAddress": {
        "address": "Hemvändargränd 4",
        "postNr": "13142",
        "city": "FIKTIVSTAD",
        "countryCode": "SE"
      },
      "mailingAddress": {
        "postNr": "10782",
        "city": "STORSTADEN",
        "countryCode": "SE"
      },
      "phone": {
        "countryCode": "46",
        "areaCode": "08",
        "number": "853289"
      },
      "cfar": "10206589"
    }
  ]
}

Response Parameters

The response contains two main sections:

metaData

The metaData object contains request information for tracing and troubleshooting:

ParameterData typeDescription
apiLogIdIntegerUnique identifier for the Creditsafe API log. Refer to this ID when contacting support
timeStampDateTimeThe exact time when the request was processed by Creditsafe. Format: YYYY-MM-DDTHH:MM:SS
resourceStringIndicates which service delivered the report
methodStringSpecifies the HTTP method used for the request
requestUrlStringThe complete URL of the request sent to Creditsafe

report

The report array contains company unit data. For each company unit found, the following parameters will be returned:

ParameterData typeDescription
nameStringCompany Unit Name
officeTypeObjectContains code and description. Type of unit: CTY1 = Head quarter, CTY2 = Filial, CTY6 = Mobile workforce, fictitious Establishments
statusObjectContains code and description. See full list of status codes in the service parameter list document
employeeRangeStringNumber of employees described as a range. Example: "200-499 anställda"
industryObjectContains code and description
visitingAddressObjectContains address, postNr (zip code), city, and countryCode
mailingAddressObjectContains address, postNr (zip code), city, and countryCode
phoneObjectContains countryCode, areaCode, and number
faxObjectContains countryCode, areaCode, and number
cfarStringWorkplace unit id from SCB (Statistiska CentralByrån)
Null Values

Please note that parameters with a null value are hidden in the responses of Creditsafe's REST APIs.


Understanding the Response

The GetDataUnit API returns a list of all units (offices, branches, etc.) associated with an organization:

  • Complete unit listing - All registered units for the specified organization
  • Detailed unit information - Includes contact details, addresses, and operational status
  • Filter capabilities - Use optional parameters to narrow down results by name, address, or zip code
  • Structured data - Organized information about each unit's type, status, and location

For detailed information about all available status codes and office types, contact Creditsafe's integration team for the complete parameter list documentation.