Crm companies

List CRM companies

Returns one page of the business customers in your CRM, sorted by name unless `sortBy` says otherwise. Archived companies are left out by default. Query parameters: - `search`: matches the name ignoring case, the org number, or the company number when the term is a whole number. - `registryStatus`: only companies with this registry status, for example `Active`. - `naceCode`: only companies with this industry code, for example `43.210`. - `page`: page number, starting at 1. Defaults to 1. - `limit`: companies per page, 1 to 100. Defaults to 50. - `sortBy`: `name` (default), `createdAt` or `lastActivityAt`. - `sortDir`: `asc` or `desc`. Defaults to `asc`, and to `desc` when sorting by `lastActivityAt`. - `includeArchived`: `true` adds archived companies to the list. - `archivedOnly`: `true` returns only archived companies. Wins over `includeArchived`. - `createdFrom`, `createdTo`: ISO 8601 date-times. Only companies created within the range, both ends included. - `chainRecordId`: a record assigned to you through your chain. Lists the companies of the chain company that owns it instead of your own. - `chainScope`: what kind of record `chainRecordId` is: `Deal` (default), `Contact`, `Company` or `Order`.

GET
/crm/companies

Returns one page of the business customers in your CRM, sorted by name unless sortBy says otherwise. Archived companies are left out by default.

Query parameters:

  • search: matches the name ignoring case, the org number, or the company number when the term is a whole number.
  • registryStatus: only companies with this registry status, for example Active.
  • naceCode: only companies with this industry code, for example 43.210.
  • page: page number, starting at 1. Defaults to 1.
  • limit: companies per page, 1 to 100. Defaults to 50.
  • sortBy: name (default), createdAt or lastActivityAt.
  • sortDir: asc or desc. Defaults to asc, and to desc when sorting by lastActivityAt.
  • includeArchived: true adds archived companies to the list.
  • archivedOnly: true returns only archived companies. Wins over includeArchived.
  • createdFrom, createdTo: ISO 8601 date-times. Only companies created within the range, both ends included.
  • chainRecordId: a record assigned to you through your chain. Lists the companies of the chain company that owns it instead of your own.
  • chainScope: what kind of record chainRecordId is: Deal (default), Contact, Company or Order.

Authorization

x-api-key
x-api-key<token>

Company API key, created under Settings > API Keys.

In: header

Query Parameters

page?number
Range1 <= value
limit?number
Range1 <= value <= 100
search?string
registryStatus?string
naceCode?string
sortBy?unknown

lastActivityAt (FR-B3) sorts by the record's most-recent timeline entry.

Value in

  • "createdAt"
  • "lastActivityAt"
  • "name"
sortDir?unknown

Value in

  • "asc"
  • "desc"
includeArchived?boolean

Surface archived companies (the Archived filter); default hides them.

archivedOnly?boolean

Show only archived companies (takes precedence over includeArchived).

chainRecordId?string

Scope the list to the owning tenant of this assigned chain record instead of the caller's own book.

chainScope?unknown

The entity scope of chainRecordId (defaults to Deal).

Value in

  • "Company"
  • "Contact"
  • "Deal"
  • "Order"
createdFrom?string

ISO instant; records created before it are excluded.

Formatdate-time
createdTo?string

ISO instant; records created after it are excluded.

Formatdate-time

Header Parameters

x-company-id?string

Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.

Match^[0-9a-fA-F]{24}$

Response Body

application/json

curl -X GET "https://example.com/crm/companies"
{  "data": [    {      "accountingCustomerId": "string",      "archiveBatchId": "string",      "archivedAt": "2019-08-24T14:15:22Z",      "companyId": "string",      "createdAt": "2019-08-24T14:15:22Z",      "customFields": [        {          "fieldId": "string",          "iconName": "string",          "key": "string",          "label": "string",          "options": [            {              "colorHex": "string",              "id": "string",              "label": "string",              "order": 0            }          ],          "type": "Checkbox",          "values": [            "string"          ]        }      ],      "dedupOrgNumber": "string",      "deletedAt": "2019-08-24T14:15:22Z",      "id": "string",      "isExample": true,      "itxCorporateId": "string",      "itxLastSyncedAt": "2019-08-24T14:15:22Z",      "lastActivityActorId": "string",      "lastActivityAt": "2019-08-24T14:15:22Z",      "lastWebhookOccurredAt": "2019-08-24T14:15:22Z",      "metadata": {        "itx": {          "snapshot": {            "active": true,            "contactEmails": [              "string"            ],            "corpId": 0,            "deliveryAddresses": [              {                "apartment": "string",                "country": "string",                "countryCode": "string",                "floor": 0,                "line1": "string",                "line2": "string",                "postBox": "string",                "postalCity": "string",                "postalCode": "string",                "street": "string",                "streetNumber": "string"              }            ],            "faxNumbers": [              "string"            ],            "id": 0,            "invoiceAddresses": [              {                "apartment": "string",                "country": "string",                "countryCode": "string",                "floor": 0,                "line1": "string",                "line2": "string",                "postBox": "string",                "postalCity": "string",                "postalCode": "string",                "street": "string",                "streetNumber": "string"              }            ],            "invoiceEmails": [              "string"            ],            "landLineNumbers": [              "string"            ],            "mainAddresses": [              {                "apartment": "string",                "country": "string",                "countryCode": "string",                "floor": 0,                "line1": "string",                "line2": "string",                "postBox": "string",                "postalCity": "string",                "postalCode": "string",                "street": "string",                "streetNumber": "string"              }            ],            "mobileNumbers": [              "string"            ],            "officeNumbers": [              "string"            ],            "postalAddresses": [              {                "apartment": "string",                "country": "string",                "countryCode": "string",                "floor": 0,                "line1": "string",                "line2": "string",                "postBox": "string",                "postalCity": "string",                "postalCode": "string",                "street": "string",                "streetNumber": "string"              }            ],            "switchboardNumbers": [              "string"            ],            "visitAddresses": [              {                "apartment": "string",                "country": "string",                "countryCode": "string",                "floor": 0,                "line1": "string",                "line2": "string",                "postBox": "string",                "postalCity": "string",                "postalCode": "string",                "street": "string",                "streetNumber": "string"              }            ],            "property1": null,            "property2": null          },          "snapshotAt": "string"        }      },      "naceCode": "string",      "naceDescription": "string",      "name": "string",      "number": 0,      "orgForm": "string",      "orgNumber": "string",      "orgNumberVerified": true,      "owner": {        "avatarRef": "string",        "companyUserId": "string",        "name": "string"      },      "registeredAddress": "string",      "registryRefreshedAt": "2019-08-24T14:15:22Z",      "registryStatus": "string",      "tags": [        {          "colorHex": "string",          "label": "string",          "optionId": "string"        }      ],      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "limit": 0,  "page": 0,  "total": 0}