Identifying Companies
Introduction
This guide details how to effectively use Two's Company API to find businesses, gather their verified information, and use this data to accurately populate buyer details when creating B2B orders.
Using the Company API is Step 1 of the Order Creation Path. Precise buyer identification underpins Two's credit assessment, fraud prevention, and ensures smooth order processing.
While optional, it is highly recommended for reliably identifying the legal organization_number (National ID) of your buyers.
The process involves three key stages:
- Search: Find companies using name and country.
- Retrieve: Fetch the full, verified profile of a specific company.
- Populate: Use the data to construct the
buyerobject for your Order API requests.
Stage 1: Discovering Companies – The Search
Use the GET /companies/v2/company endpoint to search for companies.
Example Request:
GET /companies/v2/company?q=Two&country=NO&limit=5
Response (Simplified):
{
"items": [
{
"name": "Two AS",
"lookup_id": "NO_924846789", // <--- Important!
"national_identifier": {
"id": "924846789",
"country": "NO"
},
"country": "NO"
}
// ...
]
}
Action: Present these results to your user. When they select a company, grab the lookup_id.
Interactive Search Demo
Try searching for a company yourself using the live API below:
Stage 2: Retrieving Detailed Company Profile
Once you have the lookup_id, fetch the full details using GET /companies/v2/company/:id.
Example Request:
GET /companies/v2/company/NO_924846789
Response (Key Fields for Orders):
{
"name": "Two AS",
"national_identifier": {
"id": "924846789",
"type": "NO_BRREG"
},
"country": "NO",
"addresses": [
{
"type": "BUSINESS_ADDRESS", // <--- Use this for Billing Address
"street_address": "Dronning Eufemias gate 8",
"postal_code": "0191",
"city": "Oslo",
"country": "NO"
}
]
}
Stage 3: Populating Buyer Information for Orders
Now, map the data from the Company API response to your POST /v1/order (or order_intent) request.
Mapping Guide:
| Order API Field | Source (Company API) | Notes |
|---|---|---|
buyer.company.organization_number | national_identifier.id | Required. The unique ID. |
buyer.company.country_prefix | country | Required. ISO code (e.g., NO, GB). |
buyer.company.company_name | name | Recommended for clarity. |
billing_address | addresses (where type is BUSINESS_ADDRESS) | Required. Must be the registered address. |
Example Order API Payload:
{
"buyer": {
"company": {
"organization_number": "924846789", // From national_identifier.id
"country_prefix": "NO", // From country
"company_name": "Two AS" // From name
},
// ... representative details collected from user ...
},
"billing_address": {
"street_address": "Dronning Eufemias gate 8",
"postal_code": "0191",
"city": "Oslo",
"country": "NO"
}
// ...
}
Using the data directly from the Company API ensures that Two can instantly recognize and verify the business, maximizing the chances of auto-approval.