Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Companies and persons

    A company is who you sell to; a person is someone you deal with there. How they relate to deals.

    On this page

    A company holds what you know about a buyer. A person belongs to one company. A deal belongs to one company and is worked by an owner.

    A company

    FieldMeaning
    nameName of the company.
    cifFiscal identification code.
    ownerThe person of your account who owns the company. See Owners and permissions.
    statuscustomer once one of its deals is won, prospect until then. You do not set it: the API does, from the deals.
    industryLine of business.
    employeesNumber of employees.
    town, countyWhere the company is.
    sourceWhere it came from: form, referral, fair or phone.
    summaryA written summary with the owner who wrote it and the day.
    externalIdYour own identifier. See Your own ids.
    customFieldsThe values of your custom fields.
    revisionGrows with every change. Send it as expectedRevision to change the company.

    Create a company records a company, and Update a company changes it.

    A person

    A person has a name, a role at the company and an email.

    curl

    curl -X POST "$RDC_BASE_URL/crm/v1/persons" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "76ad09e3-bdcf-43da-9133-ad270accfb69",
      "companyId": "61d54dde-e1f3-43da-b2fc-a4a21540e5f3",
      "name": "Mircea Bălan",
      "role": "Owner",
      "email": "[email protected]"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/crm/v1/persons`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "76ad09e3-bdcf-43da-9133-ad270accfb69",
        "companyId": "61d54dde-e1f3-43da-b2fc-a4a21540e5f3",
        "name": "Mircea Bălan",
        "role": "Owner",
        "email": "[email protected]"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/crm/v1/persons',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '76ad09e3-bdcf-43da-9133-ad270accfb69',
            'companyId': '61d54dde-e1f3-43da-b2fc-a4a21540e5f3',
            'name': 'Mircea Bălan',
            'role': 'Owner',
            'email': '[email protected]',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "76ad09e3-bdcf-43da-9133-ad270accfb69",
      "companyId": "61d54dde-e1f3-43da-b2fc-a4a21540e5f3",
      "name": "Mircea Bălan",
      "role": "Owner",
      "email": "[email protected]"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/crm/v1/persons');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/crm/v1/persons");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "76ad09e3-bdcf-43da-9133-ad270accfb69",
      "companyId": "61d54dde-e1f3-43da-b2fc-a4a21540e5f3",
      "name": "Mircea Bălan",
      "role": "Owner",
      "email": "[email protected]"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "76ad09e3-bdcf-43da-9133-ad270accfb69",
      "status": "accepted",
      "aggregateRevision": 1
    }

    Deals and duplicates

    Two leads of one company can be the same request entered twice, for example by a form that was sent twice. Find and merge duplicates shows how to find and merge them.