Data Types and Object Structure in the REST API CRM
Basic data types are listed in a separate article.
In this article, we will discuss the data types and object structure specific to CRM.
Data Types
|
Type |
Descriptions and Values |
|
|
String identifier of a CRM directory element (for example, |
|
|
Integer identifier of a CRM lead. Information about the lead can be obtained using the crm.lead.get method. |
|
|
Integer identifier of a CRM deal. Information about the deal can be obtained using the crm.deal.get method. |
|
|
Integer identifier of a CRM contact. Information about the contact can be obtained using the crm.contact.get method. |
|
|
Integer identifier of a CRM company. Information about the company can be obtained using the crm.company.get method. |
|
|
Integer identifier of a CRM estimate. Information about the estimate can be obtained using the crm.quote.get method. |
|
|
Integer identifier of a CRM funnel (direction). Information about the funnel (direction) can be obtained using the crm.category.get method. |
|
|
Integer identifier of an element of some CRM object. Fields of this type explicitly contain information about which CRM object they belong to. For example, fields like |
|
|
Object format:
where |
|
Integer identifier of the product item of the CRM object. Product item identifiers can be obtained using the crm.item.productrow.list method. |
|
|
Object describing a "multifield". Multifields are used to store phone numbers, email addresses, and other contact information. In leads, contacts, and companies, fields of this type are |
|
|
Object describing currency. |
|
|
Object describing currency localization. |
|
|
Object describing the connection between CRM and online store orders. |
|
|
Object describing a custom type of CRM object (SPA). |
|
|
Object containing relationships to other CRM entities. |
|
|
Object describing a linked CRM element. |
|
|
Object describing a set of fields in which the SPA should be displayed. |
Object Structure
crm_multifield
|
Value |
Description |
|
ID |
Identifier of the multifield value. |
|
TYPE_ID |
Type of the multifield. Can take values |
|
VALUE |
String value of the multifield. |
|
VALUE_TYPE |
Type of the multifield value. |
crm_item_product_row
|
Value |
Description |
|
id |
Identifier of the product item. |
|
ownerId |
Identifier of the CRM object. |
|
ownerType |
Identifier of the |
|
productId |
Identifier of the product from the catalog. |
|
productName |
Name of the product in the product item. |
|
price |
Price per unit of the product item, including discounts and taxes. |
|
priceAccount |
Price per unit of the product item, including discounts and taxes, converted to the reporting currency. |
|
priceExclusive |
Price per unit of the product item, including discounts but excluding taxes. |
|
priceNetto |
Price per unit of the product item, excluding discounts and taxes. |
|
priceBrutto |
Price per unit of the product item, including taxes but excluding discounts. |
|
quantity |
Quantity of the product. |
|
discountTypeId |
Type of discount.
|
|
discountRate |
Discount value in percentage. |
|
discountSum |
Absolute discount value. |
|
taxRate |
Tax rate in percentage. |
|
taxIncluded |
Indicator of whether the tax is included in the price.
|
|
customized |
Deprecated. |
|
measureCode |
Unit of measure code. |
|
measureName |
Text representation of the unit of measure (e.g., pcs, kg, m, l, etc.). |
|
sort |
Sorting. |
|
xmlId |
External identifier of the product item. |
|
type |
Type of product.
|
|
storeId |
Identifier of the inventory. |
crm_currency
|
Value |
Description |
|
AMOUNT |
Exchange rate relative to the base currency. |
|
AMOUNT_CNT |
Nominal value. |
|
BASE |
Indicator of whether the currency is base ( |
|
CURRENCY |
Currency identifier. Corresponds to ISO 4217 standard. |
|
DATE_UPDATE |
Date of last modification. |
|
SORT |
Sorting. |
|
LID |
Language code for which the localization parameters are returned. |
|
DECIMALS |
Number of decimal places in the fractional part (localization parameter). |
|
DEC_POINT |
Decimal point for output (localization parameter). |
|
FORMAT_STRING |
Format template (localization parameter). |
|
FULL_NAME |
Name of the currency (localization parameter). |
|
THOUSANDS_SEP |
Thousands separator (localization parameter). |
|
LANG |
Currency localizations. |
crm_currency_localization
|
Value |
Description |
|
DECIMALS |
Number of decimal places in the fractional part. Default value — |
|
DEC_POINT |
Decimal point for output. Default value — |
|
FORMAT_STRING |
Format template. Must contain the symbol # — instead, the price value will be substituted. Default value — Examples of templates for the amount 1000:
|
|
FULL_NAME |
Name of the currency. Default value — |
|
HIDE_ZERO |
Indicator of whether to hide insignificant zeros ( Default value — |
|
THOUSANDS_SEP |
Thousands separator. Default value — |
|
THOUSANDS_VARIANT |
Code for the thousands separator. Default value — When creating or modifying localization, if a value is specified for the
If a thousands separator is not needed, the |
crm_orderentity
|
Value |
Description |
|
OWNER_ID |
Identifier of the CRM object. |
|
OWNER_TYPE_ID |
Identifier of the CRM object type. |
|
ORDER_ID |
Identifier of the order. |
type
|
Value |
Description |
|
id |
Identifier of the SPA. |
|
title |
Title of the SPA. |
|
code |
Symbolic code. |
|
createdBy |
Identifier of the user who created this SPA. |
|
entityTypeId |
Identifier of the entity type. |
|
isCategoriesEnabled |
Are custom funnels and sales tunnels enabled? |
|
isStagesEnabled |
Is the use of custom stages and Kanban enabled? |
|
isBeginCloseDatesEnabled |
Are the Start Date and End Date fields enabled? |
|
isClientEnabled |
Is the Client field enabled? |
|
isUseInUserfieldEnabled |
Is the use of the SPA in the user field enabled? |
|
isLinkWithProductsEnabled |
Is the linking of catalog products enabled? |
|
isMycompanyEnabled |
Is the Your Company Details field enabled? |
|
isDocumentsEnabled |
Is document printing enabled? |
|
isSourceEnabled |
Are the Source and Additional Information about Source fields enabled? |
|
isObserversEnabled |
Is the Observers field enabled? |
|
isRecyclebinEnabled |
Is the use of the recycle bin enabled? |
|
isAutomationEnabled |
Are automation rules and triggers enabled? |
|
isBizProcEnabled |
Is the use of the business process designer enabled? |
|
isSetOpenPermissions |
Should new funnels be available to everyone? |
|
isPaymentsEnabled |
System field indicating whether payment capability is enabled. |
|
isCountersEnabled |
System field indicating whether counters are enabled. |
|
createdTime |
System field indicating the creation time of the SPA. |
|
updatedTime |
System field indicating the time of modification of this SPA. |
|
updatedBy |
Identifier of the user who modified this SPA. |
|
relations |
Object containing relationships to other CRM entities. |
|
linkedUserFields |
Set of fields in which this SPA should be displayed. |
|
customSections |
List of all digital workplaces. This parameter is deprecated. To work with digital workplaces, use the methods |
|
customSectionId |
Identifier of the digital workplace. This parameter is deprecated. To work with digital workplaces, use the methods |
type.relations
|
Value |
Description |
|
parent |
CRM elements that will be linked to this SPA. |
|
child |
CRM elements to which this SPA will be linked. |
relation
|
Value |
Description |
|
entityTypeId |
Identifier of the system or user-defined type of CRM entity. |
|
isChildrenListEnabled |
Should the linked element be added to the card? |
|
isPredefined |
Is this relationship predefined (system)? |
type.linkedUserFields
|
Value |
Description |
|
CALENDAR_EVENT|UF_CRM_CAL_EVENT |
Calendar event. |
|
TASKS_TASK|UF_CRM_TASK |
Tasks. |
|
TASKS_TASK_TEMPLATE|UF_CRM_TASK |
Task templates. |
Language Identifiers for Bitrix24
|
Language Identifier |
Language |
|
|
Arabic |
|
|
Portuguese (Brazil) |
|
|
German |
|
|
English |
|
|
French |
|
|
Hindi |
|
|
Indonesian |
|
|
Italian |
|
|
Japanese |
|
|
Spanish |
|
|
Malay |
|
|
Polish |
|
|
Russian |
|
|
Chinese |
|
|
Chinese (Taiwan) |
|
|
Thai |
|
|
Turkish |
|
|
Ukrainian |
|
|
Vietnamese |
Objects Used in Responses
Description of a Single Field crm_rest_field_description
|
Name |
Description |
|
type |
Type of the field. |
|
isRequired |
Is the field required? |
|
isReadOnly |
Is the field read-only? |
|
isImmutable |
Indicator of whether the field value can only be filled once when creating a new element. |
|
isMultiple |
Indicator of whether the field is multiple. If true, values in the field are passed as an array. |
|
isDynamic |
Is the field user-defined? |
|
title |
Name of the field. |
|
upperName |
Name of the field in uppercase. |
Description of User Field Type Address
The user field of type "Address" stores data in a single line. The table provides a description of the components of this line.
A detailed description of the components of the address can be found in the article About Addresses.
|
Name |
Description |
Example |
|
ADDRESS_1 |
Street, house number |
Small Znamenka Lane 7/10 b2 |
|
ADDRESS_2 |
Apartment, office, room, floor |
5 |
|
POSTAL_CODE |
Postal code |
119019 |
|
CITY |
Settlement |
New York |
|
REGION |
District |
Arbat District |
|
PROVINCE |
Region |
New York |
|
COUNTRY |
Country |
United States |
|
LATITUDE |
Latitude coordinates |
55.748289 |
|
LONGITUDE |
Longitude coordinates |
37.60504 |
|
LOC_ADDR_ID |
Location address identifier |
10 |
CRM Object Type
|
Object Type |
Numeric Identifier of Type |
Symbolic Code of Type |
Short Symbolic Code of Type |
Type of User Field Object |
|
Lead |
1 |
LEAD |
L |
CRM_LEAD |
|
Deal |
2 |
DEAL |
D |
CRM_DEAL |
|
Contact |
3 |
CONTACT |
C |
CRM_CONTACT |
|
Company |
4 |
COMPANY |
CO |
CRM_COMPANY |
|
Invoice (old) |
5 |
INVOICE |
I |
CRM_INVOICE |
|
Invoice (new) |
31 |
SMART_INVOICE |
SI |
CRM_SMART_INVOICE |
|
Estimate |
7 |
QUOTE |
Q |
CRM_QUOTE |
|
Requisite |
8 |
REQUISITE |
RQ |
CRM_REQUISITE |
|
Order |
14 |
ORDER |
O |
ORDER |
|
SPA |
128 |
DYNAMIC_128 |
T80 |
CRM_1 |
The table describes the SPA with type identifier 128 and identifier 1.
The identifiers of SPA types are in the range from 128 to 191 (inclusive), or have a value greater than 1030 (inclusive) and are even.
The identifiers of SPA types that have been deleted to the recycle bin are in the range from 192 to 255 (inclusive), or have a value greater than 1030 and are odd.
To determine the prefix of the SPA, it is necessary to:
- convert the identifier from decimal to hexadecimal. In the case of an identifier equal to 128, we get the value 80.
- take the obtained value in lowercase and prepend the Latin letter T to the obtained value. Thus, we get the prefix — T80.