Restore a CRM company
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.
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.
Authorization
x-api-key Company API key, created under Settings > API Keys.
In: header
Path Parameters
The CRM company id.
Header 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 POST "https://example.com/crm/companies/string/restore"{ "accountingCustomerId": "string", "archiveBatchId": "string", "archivedAt": "2019-08-24T14:15:22Z", "companyId": "string", "createdAt": "2019-08-24T14:15:22Z", "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, "registeredAddress": "string", "registryRefreshedAt": "2019-08-24T14:15:22Z", "registryStatus": "string", "updatedAt": "2019-08-24T14:15:22Z"}List CRM companies GET
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`.
Update a CRM company PATCH
Changes the company's name or registry fields. Only the fields you send change. An org number another company already has returns `status` `duplicate` and saves nothing, unless you send `force: true`.