Companies: Updating and Deleting Companies, Contacts, and Project Data via the API

In this article, you can read about how to update company data, remove companies or company contacts, and delete a company's project data via the API.

Update Company

POST

https://api.recman.io/v2/post/

For updating companies, the operation must be set to update and scope to company. It's required to specify the companyId field.

Update follows the same field set as Insert Company (see article on Creating Companies), with these notes:

  • departmentId — optional; to delete the main department, set to 0.
  • responsibleUserId — optional; to delete the responsible co-worker, set to 0.
  • countryId — optional; to delete the country, set to 0.
  • Nested objects — addresses, attributes, file, eInvoice, and
    projectData — can all be included in an update request the same way they're used on insert.

Delete Company

POST

To delete an existing company, use the POST method with the operation set to delete and scope to company. To delete a company and all of its data, you only need to provide a companyId.

Delete Company - projectData

POST

This endpoint removes the projectData block from a company by company ID.

Fields

FieldsDescription
companyId
integer
Company ID. Required on operation: delete
projectData
boolean
Deletes all project data linked to the company. Valid value: true. Required on operation: delete

Behavior

  • When projectData is set to true, all project-related configuration values are removed from the company.
  • Only the projectData section is affected — other company data remains unchanged.
  • Partial deletion is not supported — the entire projectData block is deleted.

Validation rules

  • companyId must be a valid numeric company ID.
  • projectData must be true.
  • If projectData is missing or set to false, no deletion is performed.

Update Company Contact

POST

For updating company contacts, the operation must be set to update and scope to companyContact. It's required to specify the companyContactId field.

Update follows the same field set as Insert Company Contact (see article on Creating Companies), with one difference: companyId is required on insert but optional on update.

Note

The attributes field only works for the GET method — attributes cannot be updated through this endpoint. Use the Insert Company Contact - Attribute request instead (see article on Creating Companies).

Delete Company Contact

POST

For deleting company contacts, the operation must be set to delete and scope to companyContact. It's required to specify the companyContactId field.

What's next

Continue with Companies: Retrieving Company, Company File, and Company Contact Data via the API for lookup and search options, or Companies: Creating Companies, Addresses, Files, Attributes, eInvoice, and Contacts via the API to insert new records.

Was this article helpful?
0 out of 0 found this helpful