Skip to content
English
  • There are no suggestions because the search field is empty.

PSOhub API - Companies

Learn how to create and find companies via the API

In PSOHub, companies is the object that is used to define the customers for an organization. In this article, we will show you how to get companies, search for them and how to create a new one.

Get all companies

To get all companies, you can use the following endpoint

GET https://www.psohubapp.com/rest/psohubapi/v1/companies

You can use the limit parameter to determine the number of records to return. If you don't send this, we will send back 50 companies.

If successful, the response will be this

[
"CompanyName": "Demo Company",
"CompanyID": 14073748835533011,
"Address": "15 Stadionstraat",
"PostalCode": "4815NC",
"City": "Breda",
"Country": "Netherlands",
"PhoneNumber": "+31 85 800 0045",
"CountryCode": "NL"
]

 

Find a company

If you need to find a specific company you can use the name or companyid parameter to find all companies that contain a certain word or uses that specific ID like in the example below

GET https://www.psohubapp.com/rest/psohubapi/v1/companies?name=tesla

If found, the response will return all records where the company name contains Tesla

 

Create/Update a company

You can create new companies in PSOHub. To do this, please use the following endpoint

POST/PATCH https://www.psohubapp.com/rest/psohubapi/v1/company

The following fields are available , the mandatory fields are marked as such

Name

Required

Type

Description

Name

Yes

String

Name of the company

CompanyRegistrationNumber

No

String

The unique number for this company, usually provided by the country's registration system (Like KvK for dutch)

TaxNumber

No

String

The tax number, for invoicing purposes (like BTW for dutch)

PhoneNumber

No

String

The phone number of the company

Street

No

String

Straat + housenumber

PostalCode

No

String

Postal code

City

No

String

City

Country

No

String

Country

CountryCode

No

String

ISO code of a country (note: this will not automatically fill the country)

ExternalID

No

String

External identifier from your application for this company

CompanyID

Yes (only for update)

Integer/Long

The PSOhub ID of the company

IMPORTANT: there is no unique company check performed, you can have multiple companies with the same name in PSOhub.

A valid request will look like this

{
"CompanyName": "API Company",
"TaxNumber": "NL000099998B57",
"CompanyRegistrationNumber": "56583052",
"Address": "Example Street 123",
"PostalCode": "5848AL",
"City": "Amsterdam",
"Country": "Netherlands",
"PhoneNumber": "+3184933749",
"CountryCode": "NL",
"ExternalID": "2326"
}

Upon success, you will in return get the CompanyID

{
"CompanyID": "14073748840908986"
}