Bitrix24 Community

Support » Forum » Marketplace » Bitrix API
Pages: 1
RSS
Bitrix API, Documentation
Hey,

I read on the main page about the API? Is there any documentation or thread for the API??

Cheers,

Piet.
The REST API can be used to import leads to CRM only.

Creating leads in the CRM from external services can be done using the special-purpose page:
"your_name".bitrix24.com/crm/configs/import/lead.php

For a lead to be added to the CRM you must:
  1. Call this page with a GET or POST method
  2. Pass at least 3 required parameters: login and password of the user who is the creator of the lead, and the title of the lead.
The script will return a JSON-object with the parameters code and error_message.

! We recommend using a separate user with access only to add leads and without access to anything else.  
 

CodeDescription
400Parameters missing or parameters invalid
403Authorization or access error
201Lead added


Table 2: Parameters


ParameterTypeDescription
LOGIN* S tringLogin
PASSWORD* S tringPassword
TITLE*S tringTitle
COMPANY_TITLE S tringCompany Name
NAMES tringFirst Name
LAST_NAME S tringLast Name
SECOND_NAMES tringSecond Name
POSTS tringPosition
ADDRESSS tringAddress
COMMENTSS tringComment
SOURCE_DESCRIPTIONS tringSource Description
STATUS_DESCRIPTIONS tringStatus Description
OPPORTINUTYDoubleOpportunity
CURRENCY_IDS tringCurrency
PRODUCT_IDS tringProduct
SOURCE_IDS tringSource
STATUS_IDS tringLead Status
ASSIGNED_BY_IDIntResponsible
PHONE_WORKS tringWork Phone
PHONE_MOBILES tringMobile
PHONE_FAXS tringFax
PHONE_HOMES tringHome Phone
PHONE_PAGERS tringPager
PHONE_OTHERS tringOther Phone
WEB_WORKS tringCorporate Site
WEB_HOMES tringPersonal Site
WEB_FACEBOOKS tringFacebook Page
WEB_LIVEJOURNALS tringLiveJournal Page
WEB_TWITTERS tringTwitter Account
WEB_OTHER S tringOther Site
EMAIL_WORKS tringWork E-mail
EMAIL_HOMES tringPersonal E-mail
EMAIL_OTHERS tringOther E-mail
IM_SKYPES tringSkype
IM_ICQS tringICQ
IM_MSNS tringMSN/Live!
IM_JABBERS tringJabber
IM_OTHERS tringOther Messenger


*  - required parameter

The  STATUS_ID , SOURCE_ID , CURRENCY_ID, and  PRODUCT_ID parameters are sel ected from a corresponding directory of the CRM.

Below are tables with value sets of these parameters after installation of the module.
Important:  values can be changed by the intranet administrator or deleted.

Table 3: STATUS_ID – Lead Statuses



ValueDescription
NEWUnassigned
ASSIGNEDResponsible Assigned
DETAILSWaiting for Details
CANNOT_CONTACTCannot Contact
IN_PROCESSIn Progress
ON_HOLDOn Hold
RESTOREDRestored
CONVERTEDConverted
JUNKJunk Lead


Table 4: SOURCE_ID – Sources


ValueDescription
SELFPersonal Contact
PARTNERExisting Client
CALLCall
WEBWebsite
EMAILE-Mail
CONFERENCEConference
TRADE_SHOWShow/Exhibition
EMPLOYEEEmployee
COMPANYCampaign
HRHR Department
MAILE-Mail Message
OTHEROther


Table 5: CURRENCY_ID – Currencies



Value Description
USD US Dollar
EUR Euro



Table 6: PRODUCT_ID – Products


Value Description
PRODUCT_1 Bitrix Site Manager
PRODUCT_2 Bitrix Intranet
OTHER Other


Aside fr om the main fields, a lead may have additional custom fields created by the CRM administrator. They can also be passed to the page.
Ann, I like more information and documentation on the complete API.  Is there a way to do things other than post data. Can I also pull data out using the API?  Can you point to a page with that documentation.
Only this API is available in the Bitrix24 service.
Do you know about Bitrix Intranet product (the inbox version of Bitrix24)? The extended API can be used there.
ok.  so i am a developer and was hoping to create an android app that would look up contextual information for incoming calls.  using the bitrix24.com product that is not possible?  and is not planned on being possible in the future?
Bitrix24 doesn’t support this now, and plans to add support for add-ons are mid-term at earliest. We are going to release our own app (for Android and iOS) this Fall, but its first version won't have all the features (e.g. CRM) that the service does.
What needs to go into the TITLE variable?
A lead name
Just wanted to update this thread to mention that mobile apps have been released:

http://www.bitrix24.com/features/mobile-and-desktop-apps.php
Thank you, Dan!:)
Yes, we released Bitrix24 mobile version. Now it's available for two platform (IOS and Android).
We also going to develop our mobile app and extend its features.


You can find Bitrix24 mobile version inApp Store and Google Market
Hey,

About the REST API of Bitrix24 Service, there still is nothing planned for an update in the future?
Hi,

The REST API has been updated.

But documentation for this functionality is not ready yet.

We will publish it as soon as possible.



regards
Evgeniya
Quote
Ann Slyshkina wrote:
The REST API can be used to import leads to CRM only.

Creating leads in the CRM from external services can be done using the special-purpose page:
"your_name".bitrix24.com/crm/configs/import/lead.php

For a lead to be added to the CRM you must:
Call this page with a GET or POST method
Pass at least 3 required parameters: login and password of the user who is the creator of the lead, and the title of the lead.
The script will return a JSON-object with the parameters code and error_message.

! We recommend using a separate user with access only to add leads and without access to anything else.
Code Description
400Parameters missing or parameters invalid
403Authorization or access error
201Lead added
Table 2: Parameters
Parameter Type Description
LOGIN* S tringLogin
PASSWORD* S tringPassword
TITLE*S tringTitle
COMPANY_TITLE S tringCompany Name
NAMES tringFirst Name
LAST_NAME S tringLast Name
SECOND_NAMES tringSecond Name
POSTS tringPosition
ADDRESSS tringAddress
COMMENTSS tringComment
SOURCE_DESCRIPTIONS tringSource Description
STATUS_DESCRIPTIONS tringStatus Description
OPPORTINUTYDoubleOpportunity
CURRENCY_IDS tringCurrency
PRODUCT_IDS tringProduct
SOURCE_IDS tringSource
STATUS_IDS tringLead Status
ASSIGNED_BY_IDIntResponsible
PHONE_WORKS tringWork Phone
PHONE_MOBILES tringMobile
PHONE_FAXS tringFax
PHONE_HOMES tringHome Phone
PHONE_PAGERS tringPager
PHONE_OTHERS tringOther Phone
WEB_WORKS tringCorporate Site
WEB_HOMES tringPersonal Site
WEB_FACEBOOKS tringFacebook Page
WEB_LIVEJOURNALS tringLiveJournal Page
WEB_TWITTERS tringTwitter Account
WEB_OTHER S tringOther Site
EMAIL_WORKS tringWork E-mail
EMAIL_HOMES tringPersonal E-mail
EMAIL_OTHERS tringOther E-mail
IM_SKYPES tringSkype
IM_ICQS tringICQ
IM_MSNS tringMSN/Live!
IM_JABBERS tringJabber
IM_OTHERS tringOther Messenger
* - required parameter

The STATUS_ID , SOURCE_ID , CURRENCY_ID, and PRODUCT_ID parameters are sel ected from a corresponding directory of the CRM.

Below are tables with value sets of these parameters after installation of the module.
Important : values can be changed by the intranet administrator or deleted.

Table 3: STATUS_ID – Lead Statuses
Value Description
NEWUnassigned
ASSIGNEDResponsible Assigned
DETAILSWaiting for Details
CANNOT_CONTACTCannot Contact
IN_PROCESSIn Progress
ON_HOLDOn Hold
RESTOREDRestored
CONVERTEDConverted
JUNKJunk Lead
Table 4: SOURCE_ID – Sources
Value Description
SELFPersonal Contact
PARTNERExisting Client
CALLCall
WEBWebsite
EMAILE-Mail
CONFERENCEConference
TRADE_SHOWShow/Exhibition
EMPLOYEEEmployee
COMPANYCampaign
HRHR Department
MAILE-Mail Message
OTHEROther
Table 5: CURRENCY_ID – Currencies
Value Description
USD US Dollar
EUR Euro
Table 6: PRODUCT_ID – Products
Value Description
PRODUCT_1 Bitrix Site Manager
PRODUCT_2 Bitrix Intranet
OTHER Other
Aside fr om the main fields, a lead may have additional custom fields created by the CRM administrator. They can also be passed to the page.
Dear Ann,

I have a problem with send of data from parameter "PRODUCT_ID":

1. Add product "TEST" (ID:30)



2. Add "'PRODUCT_ID' => $leadData['PRODUCT_ID'],"

Code
   // get lead data from the form
   $postData = array(
      'TITLE' => $leadData['TITLE'],
      'EMAIL_HOME' => $leadData['EMAIL_HOME'],
      'NAME' => $leadData['NAME'],
      'LAST_NAME' => $leadData['LAST_NAME'],
      'PHONE_MOBILE' => $leadData['PHONE_MOBILE'],
      'PRODUCT_ID' => $leadData['PRODUCT_ID'],
      'CURRENCY_ID' => $leadData['CURRENCY_ID'],
   );
 
3. Add form fild

Code
// HTML form
 <input type="hidden" name="DATA[PRODUCT_ID]" value="30" />
or
Code
 // HTML form 
 <input type="hidden" name="DATA[PRODUCT_ID]" value="TEST" />


All data is stored in new Lead except for the product. What is wrong?
Edited: Pawel Kochanowski - 11/22/2013 22:42:42
Hi Pawel,

There is no possibiblity now to connect the lead to the product through  REST_API. The  "PRODUCT_ID" field  - is already an "old" field, and there is no possibility yet to use the new added  "PRODUCT_ROWS" field
We have informed our Development Department about this issue.

Kind Regards,

Yana.
It's been a long time coming for the documentation on that API, if it's been updated...

What about duplicate leads?  If there's a lead posted to the CRM, will the original lead be updated or will a duplicate lead be created?
Hi Jody,

Quote
What about duplicate leads?  If there's a lead posted to the CRM, will the original lead be updated or will a duplicate lead be created?
As for now  - a duplicate lead is created, but the duplicates problem will be solved this spring. Stay tuned for upcoming Bitrix24 spring release.

Quote
It's been a long time coming for the documentation on that API, if it's been updated...

If you are talking about Rest API documentation for Bitrix24 cloud service - we expect it at the end of February.


Kind Regards,

Yana.
Two Annotations:

  1. If you are using user defined fields, you can only import data if you used the internal field name. Unfortunately its not displayed anywhere , not even in an error message if the field was set as required (Bitrix team could you change that). But when you open the field editing form you will find the internal field name in the url.
    Example: url: xyz.bitrix24.com/crm/configs/fields/CRM_LEAD/edit/UF_CRM_1234567890/ where UF_CRM_1234567890 is the internal field name.

  2. Don't just copy the link provided by Slyshkina ("your_name".bitrix24.com/crm/configs/import/lead.php) if your bitrix24 instance doesn't run on a .com platform. If your instance for example runs on a .de platform, just replace .com by .de
Regards

Uwe
Thanks for your tips Uwe!
Hi EveryOne

I have problem to import leads using api and receiving the following response

[body] => {'error':'400','error_message':'The required field Industry is missing.The required field SIC Code is missing.','AUTH':'b3ea1da918e59577473bf9e0d99c21e7'}


Can anyone guide me what is this SIC Code

Thanks in Advance

Sajid Javed  
Quote
Yana Prokopets wrote:
Hi

I have problem to import leads using api and receiving the following response

[body] => {'error':'400','error_message':'The required field Industry is missing.The required field SIC Code is missing.','AUTH':'b3ea1da918e59577473bf9e0d99c21e7'}


Can anyone guide me what is this SIC Code

Thanks in Advance

Sajid Javed
Hi Please help in this issue thanks
Edited: Sajid Javed - 09/24/2014 14:18:16
Hello Sajid,

It seems that the SIC is a system for classifying industries by a four-digit code.

But there is no such field for any entity in the Bitrix24 CRM. Is this field a custom field for leads in your CRM?

If you still have any questions, please contact our Helpdesk.
Hi Ann Slyshkina

This is not a custom field in our CRM we are using default fields Please check this link
http://scanchex.net/rest.php
The issue should be investigated via the Helpdesk. Could you please create a ticket here?
Is it possible to sync the leads list through the API? For example, automatically adding leads to it through the API when they appear our internal database.
And when leads are updated in Bitrix24, is it possible to send the changes back to our company database?
Hi Brandon!

The method described above allows to add leads only- there is no automation there. If you is able to orginize automatic data transmission in the required fromat to this page "your_name".bitrix24.com/crm/configs/import/lead.php" - then you'll get the automation,

Kind Regards,

Yana.
Is it possible can we get multiple attachment form out side forms to bitrix leads in self hosted site.
Hi Mohammad!

Please refer to this API helpfor the self-hosted version.

Best,

Yana.
Hey,
I'm having a problem to import info from a web form.
when i register from localhost (127.0.0.1/) then i get the info but when same thing i did from my website(domain.in) then it doesn't give any info name.bitrix24.com/crm/lead/.
What is the reason ???
Please help !!!
Hi...I want to the use the REST API. I cannot find this page:("your_name".bitrix24.com/crm/configs/import/lead.php). Encoutering error 404.

Your help would be much appreciated.
Hi guys!

Please contact our Helpdesk directly with details. Thank you.

Best,

Yana.
Hi,

Is the workgroup lists function exposed in the API?
Pages: 1
2,000,000+
organizations
are already using Bitrix24