Adding

New client

POST https://do.workzeal.com/company/insert

Request Body

Name
Type
Description

company*

JSON

New client

JSON

All available parameters of the new object
  • name - * Name

  • first_name - First name

  • last_name - Last name

  • middle_name - Middle name

  • person - Type of client [INT] (1 company /2 individual)

  • address - Address

  • country - Country

  • region - Region

  • user_id - * User ID

  • type_id - * Type ID

  • status_id - Status ID

  • category_id - Category ID

  • url - Website

  • activity_type -Activity business type

  • info_source - Souse of adding

  • note - Note

  • which_site_source - Website that's a source of the client

  • which_host_source - Host that's a source of the client

  • which_link_source - Full link that's a source of the client

  • utm_campaign - UTM campaign

  • utm_source - UTM source

  • utm_medium - UTM medium

  • utm_content - UTM content

  • utm_term - UTM term

Contacts in a company

  • first_name - Name

  • last_name - Last name

  • post - Position

  • note - Note

  • status_id - Status ID

  • Email - List of emails

  • Phones - List of phones

Emails

  • email - List of client's emails

Phones

  • phone - List of client's emails

  • descr - Type of phone

Object


{
    "name" : "Apple",
    "type_id" : 1,
    "user_id" : 37,
    
    "Contacts": [
                 {
                  "first_name": "John",
                  "last_name": "Smith",
                  "post": "CEO",
                  "note": "The main decision maker",
                  "status_id": 1,
                  "Emails": [
                              {
                               "email": "[email protected]"
                              }
                            ],
                  "Phones": [
                              {
                               "phone": "+1 234 567890",
                               "descr": "mobile"
                              }
                            ]
                   } 
                 ],
        "Emails": [
                     {
                       "email": "[email protected]"
                     }
                  ],
        "Phones": [
                     {
                       "phone": "+1 123 345678",
                        "descr": "Reception"
                      }
                   ]
  }
  
 

Required parameters name (Name) type_id (Client type code, can be found in the references) user_id (User ID, can be found in the administration app in the users section)

Example

curl --location --request POST 'https://do.workzeal.com/company/insert' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name" : "Apple",
    "type_id" : 1,
    "user_id" : 37,
    
    "Contacts": [
                 {
                  "first_name": "John",
                  "last_name": "Smith",
                  "post": "CEO",
                  "note": "The main decision maker",
                  "status_id": 1,
                  "Emails": [
                              {
                               "email": "[email protected]"
                              }
                            ],
                  "Phones": [
                              {
                               "phone": "+1 234 567890",
                               "descr": "mobile"
                              }
                            ]
                   } 
                 ],
        "Emails": [
                     {
                       "email": "[email protected]"
                     }
                  ],
        "Phones": [
                     {
                       "phone": "+1 123 345678",
                        "descr": "Reception"
                      }
                   ]
  }
  '

References

For clientsUsers

Answer of the adding request

{
  "status": "success",
  "error": null,
  "code": "0",
  "rows": 1,
  "pages": 1,
  "page": 1,
  "value": "1" 
}
// value - Client ID of the new client

Last updated