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`.
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 exampleActive.naceCode: only companies with this industry code, for example43.210.page: page number, starting at 1. Defaults to 1.limit: companies per page, 1 to 100. Defaults to 50.sortBy:name(default),createdAtorlastActivityAt.sortDir:ascordesc. Defaults toasc, and todescwhen sorting bylastActivityAt.includeArchived:trueadds archived companies to the list.archivedOnly:truereturns only archived companies. Wins overincludeArchived.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 recordchainRecordIdis:Deal(default),Contact,CompanyorOrder.
Authorization
x-api-key Company API key, created under Settings > API Keys.
In: header
Query Parameters
1 <= value1 <= value <= 100lastActivityAt (FR-B3) sorts by the record's most-recent timeline entry.
Value in
- "createdAt"
- "lastActivityAt"
- "name"
Value in
- "asc"
- "desc"
Surface archived companies (the Archived filter); default hides them.
Show only archived companies (takes precedence over includeArchived).
Scope the list to the owning tenant of this assigned chain record instead of the caller's own book.
The entity scope of chainRecordId (defaults to Deal).
Value in
- "Company"
- "Contact"
- "Deal"
- "Order"
ISO instant; records created before it are excluded.
date-timeISO instant; records created after it are excluded.
date-timeHeader Parameters
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.
^[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}Get a CRM company GET
Returns the company with its tags and custom field values. Archived companies and ids from another company return 404. A company shared with you through a chain lead comes back with `sharedViaChain` set.
Restore a CRM company POST
Brings back an archived company, together with the contacts and deals archived or detached with it. Restoring a company that is not archived changes nothing.