Companies

Get all companies

Changed on

This endpoint can be used to search for companies. The response body is paginated and you can control the pagination using the pageSize and pageToken parameters. Native filters include companyName, companyUrl, and accountOwner. Custom company fields (including NOTE fields, treated as text) can be filtered with company.field.<custom_field_id>.operator=value.

get/1.0/companies

Request

Query parameters

pageSizenumber
Example:100

This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100.

pageTokenstring
Example:59c12a42-dd10-11ed-afa1-0242ac120002

Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created.

includeFieldsstring[]

Use this query parameter to opt in for companies to be returned in the response body. Use comma separated values to fetch the respective fields. If left blank, default properties are returned.

includeAllFieldsboolean
Example:true

This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned.

sortBy'companyName' | 'createdAt' | 'updatedAt'

You can use the sortBy param to sort the responses by the given field.

sortOrder'ASC' | 'DESC'

The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.

match'all' | 'any'

You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.

companyName.eqstring
Example:Acme Inc

You can use this param to specify some company name and the responses will contain exact matches of companies that match the given name.

companyName.cnstring
Example:Acme Inc

You can use this param to specify some company name and the responses will contain matches of companies that match the given name.

companyName.ncstring
Example:Acme Inc

You can use this param to specify some company name and the responses will not contain matches of companies that match the given name.

companyUrl.eqstring
Example:https://www.acme.com

You can use this param to specify a company URL and the responses will contain exact matches of companies that match the given URL.

companyUrl.cnstring
Example:acme.com

You can use this param to specify a company URL substring and the responses will contain companies whose URL contains the given value.

companyUrl.ncstring
Example:example.com

You can use this param to specify a company URL substring and the responses will not contain companies whose URL contains the given value.

accountOwner.eqstring

You can use this param to filter companies by account owner userId (exact match).

accountOwner.oneOfstring
Example:1,2

You can use this param to filter companies whose account owner userId is one of the given comma-separated userIds.

accountOwner.noneOfstring
Example:1,2

You can use this param to filter companies whose account owner userId is none of the given comma-separated userIds.

Response

The requested action was successfully executed.

Example response

{
  "data": [
    {
      "companyId": 201,
      "companyName": "Acme Inc",
      "companyUrl": "https://www.acme.com",
      "visibility": "EVERYONE",
      "createdAt": 1681319726000,
      "updatedAt": 1681319726000,
      "createdBy": {
        "emailId": "john.doe@rocketlane.com",
        "userId": 201,
        "firstName": "John",
        "lastName": "Doe"
      },
      "updatedBy": {
        "emailId": "john.doe@rocketlane.com",
        "userId": 201,
        "firstName": "John",
        "lastName": "Doe"
      },
      "description": "Leading software development partner for enterprise solutions",
      "accountOwner": {
        "emailId": "john.doe@rocketlane.com",
        "userId": 201,
        "firstName": "John",
        "lastName": "Doe"
      },
      "fields": [
        {
          "fieldId": 201,
          "fieldLabel": "MRR",
          "fieldValue": "1000",
          "fieldValueLabel": "1000"
        }
      ],
      "notes": [
        {
          "noteId": 1,
          "fieldId": 44,
          "fieldLabel": "Account Notes",
          "noteTitle": "Q1 Planning Discussion",
          "noteText": "Initial contact: discussed Q1 roadmap and pricing",
          "tags": [
            {
              "tagId": 1,
              "label": "sales",
              "color": "blue"
            }
          ],
          "createdAt": 1750343334605,
          "updatedAt": 1750343334570
        }
      ]
    }
  ],
  "pagination": {
    "pageSize": 100,
    "hasMore": true,
    "totalRecordCount": 10398,
    "nextPage": "https://api.rocketlane.com/api/1.0/companies?includeFields=category,minutes&billable.eq=false&sortBy=startDate&sortOrder=desc&pageToken=e4a3dd8e-e338-11ed-b5ea-0242ac120002&limit=100&assignee.any=1&startDate.gt=2022-01-02",
    "nextPageToken": "e4a3dd8e-e338-11ed-b5ea-0242ac120002"
  }
}

Changes