Skip to main content

Get Companies

Retrieve a list of companies with pagination and search capabilities.

Endpoint

GET /companies

Request Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination (defaults to 1)
qstringNoSearch query to filter companies by name

Request Example

curl -X GET \
"https://stream-orders-api-sandbox.herokuapp.com/client_api/v2/companies?page=1&q=Stream" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

Success Response

Status Code: 200 OK

{
"companies": [
{
"id": 2533,
"account_number": "STRNEW0013",
"account_status": "active_account",
"address": {
"id": 1075175,
"address_1": "221B Baker Street",
"address_2": "Flat 2",
"address_3": "",
"city": "London",
"classification": "business",
"company": "New Test Company",
"country_id": 232,
"email": "example@company.com",
"import_code": "IMP123456",
"latitude": null,
"longitude": null,
"name": "John Doe",
"phone": "+442079173000",
"postal_code": "NW1 6XE",
"province": "Greater London",
"summary": "United Kingdom",
"tax_number": "GB123456789",
"time_zone_id": null
},
"api_users": [
{
"id": 5474,
"email": "test@vatitstream.com"
},
{
"id": 5475,
"email": "admin@vatitstream.com"
}
],
"code": "STRNEW0013",
"currency_id": "GBP",
"name": "New Test Company"
},
{
"id": 2534,
"account_number": "DEMO0014",
"account_status": "active_account",
"address": {
"id": 1075176,
"address_1": "456 Demo Street",
"address_2": "Suite 100",
"address_3": "",
"city": "Manchester",
"classification": "business",
"company": "Demo Company Ltd",
"country_id": 232,
"email": "contact@democompany.com",
"import_code": "IMP789012",
"latitude": null,
"longitude": null,
"name": "Jane Smith",
"phone": "+441234567890",
"postal_code": "M1 1AA",
"province": "Greater Manchester",
"summary": "United Kingdom",
"tax_number": "GB987654321",
"time_zone_id": null
},
"api_users": [
{
"id": 5476,
"email": "demo@vatitstream.com"
}
],
"code": "DEMO0014",
"currency_id": "GBP",
"name": "Demo Company Ltd"
}
],
"meta": {
"page_count": 1,
"record_count": 2
}
}

Response Fields

FieldTypeDescription
companiesarrayArray of company objects
companies[].idintegerUnique company identifier
companies[].account_numberstringCompany account number
companies[].account_statusstringCurrent account status
companies[].addressobjectCompany address information
companies[].api_usersarrayArray of API users associated with the company
companies[].codestringCompany code
companies[].currency_idstringCurrency for the company
companies[].namestringCompany name
metaobjectPagination metadata
meta.page_countintegerTotal number of pages
meta.record_countintegerTotal number of records

Notes

  • Results are paginated with a default page size (10)
  • The search parameter q searches across company name
  • Empty search returns all companies the authenticated user has access to
  • API users array may be empty for some companies