API (для интеграторов)

Раздел описывающий работу по API с нашим сервисом (beta version)

 
Request URLctm/form/send
MethodsPOST, GET
DescriptionПодходит для отправки данных из формы
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parameters‘url’ => [‘string’],
’email’ => [‘string’, ‘max:255’],
‘phone’ => [‘string’, ‘max:255’],
‘name’ => [‘string’, ‘max:255’],
‘utm_source’ => [‘string’, ‘max:255’],
‘utm_campaign’ => [‘string’, ‘max:255’],
‘utm_medium’ => [‘string’, ‘max:255’],
‘utm_term’ => [‘string’, ‘max:255’],
‘utm_content’ => [‘string’, ‘max:255’],
‘sum’ => [‘integer’],
‘description’ => [‘string’, ‘max:500’],
‘guid’ => [‘string’, ‘max:255’],
‘gaid’ => [‘string’, ‘max:255’],
Output{ "ans" : "true" }
Request URLpublic/deal/add
MethodsPOST
DescriptionИспользуется сторонними сервисами для создания сделки
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parametersadditional field
‘stage_id’ => [‘integer’],
‘funnel_id’ => [‘integer’],
‘author_id’ => [‘integer’],
‘manager_id’ => [‘integer’],
‘status_id’ => [‘integer’],
‘type_id’ => [‘integer’],
‘source_id’ => [‘integer’],
common fields
‘name’ => [‘string’, ‘max:255’],
‘sum’ => [‘integer’],
‘sum_original’ => [‘integer’],
‘description’ => [‘string’, ‘max:500’],
utm marks
‘utm_source’ => [‘string’, ‘max:255’],
‘utm_medium’ => [‘string’, ‘max:255’],
‘utm_campaign’ => [‘string’, ‘max:255’],
‘utm_content’ => [‘string’, ‘max:255’],
‘utm_term’ => [‘string’, ‘max:255’],
‘website’ => [‘string’, ‘max:255’],
‘comment’ => [‘string’, ‘max:255’],
‘gaid’ => [‘string’, ‘max:255’],
contact info
’email’ => [‘string’, ‘max:255’],
‘phone’ => [‘string’, ‘max:255’],
‘client_name’ => [‘string’, ‘max:255’],
custom fields [f_1 .. f_50]
‘f_1’ => [‘string’, ‘max:255’],
Output{ "ans" : "true" }
Request URLpublic/deal/get-custom-fields
MethodsGET
DescriptionИспользуется сторонними сервисами для получения кастомных полей сделки
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parameters 
Output{ "ans": "true", "fields": [ { "type": "text", "name": "Кастомное поле 1", "field": "f_1" } ] }
Request URLpublic/contact/add
MethodsPOST
DescriptionСоздание контакта
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parameterscommon fields
‘name’ => [‘string’, ‘max:255’],
‘surname’ => [‘string’, ‘max:255’],
‘middlename’ => [‘string’, ‘max:255’],
‘phone’ => [‘string’, ‘max:255’],
‘phone_second’ => [‘string’, ‘max:255’],
’email’ => [‘string’, ‘max:255’],
’email_second’ => [‘string’, ‘max:255’],
‘position’ => [‘string’, ‘max:255’],
‘website’ => [‘string’, ‘max:255’],
‘company_id’ => [‘integer’],
‘manager_id’ => [‘integer’],
‘author_id’ => [‘integer’],
utm marks
‘utm_source’ => [‘string’, ‘max:255’],
‘utm_campaign’ => [‘string’, ‘max:255’],
‘utm_medium’ => [‘string’, ‘max:255’],
‘utm_content’ => [‘string’, ‘max:255’],
‘utm_term’ => [‘string’, ‘max:255’],
‘gaid’ => [‘string’, ‘max:255’],
‘guid’ => [‘string’, ‘max:255’],
additional fields
‘fax’ => [‘string’, ‘max:255’],
‘skype’ => [‘string’, ‘max:255’],
‘icq’ => [‘string’, ‘max:255’],
‘age’ => [‘string’, ‘max:255’],
‘vk’ => [‘string’, ‘max:255’],
‘fb’ => [‘string’, ‘max:255’],
‘linkedin’ => [‘string’, ‘max:255’],
‘map_position’ => [‘string’, ‘max:255’],
‘country’ => [‘string’, ‘max:255’],
‘city’ => [‘string’, ‘max:255’],
‘address’ => [‘string’, ‘max:255’],
‘metro’ => [‘string’, ‘max:255’],
Output{ "ans" : "true" }
Request URLpublic/task/add
MethodsPOST
DescriptionПодходит для создания задачи
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parameters‘manager_id’ => [‘integer’],
‘author_id’ => [‘integer’],
‘type_id’ => [‘integer’],
‘status_id’ => [‘integer’],
‘priority_id’ => [‘integer’],
‘name'[‘string’, ‘max:255’],
‘description’ => [‘string’, ‘max:1000’],
‘date_expired’ => [‘string’],
‘estimate_hour’ => [‘integer’],
‘estimate_minute’ => [‘integer’],
‘estimate_day’ => [‘integer’],
Output{ "ans" : "true" }
Request URLpublic/company/add
MethodsPOST
DescriptionПодходит для создания компании
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parameters‘name’ => [‘string’, ‘max:255’],
‘phone’ => [‘string’, ‘max:255’],
’email’ => [‘string’, ‘max:255’],
‘city’ => [‘string’, ‘max:255’],
‘website’ => [‘string’, ‘max:255’],
‘manager_id’ => [‘integer’],
‘author_id’ => [‘integer’],
Output{ "ans" : "true" }
Request URLpublic/managers/get
MethodsGET
DescriptionПодходит для получения списка сотрудников
Required parameters
  • public_token — {PUBLIC_TOKEN}
  • secret_token — {SECRET_TOKEN} (выдаём только по запросу)
Optional parameters 
Output{ "ans" : "true", "managers" : [ { id: 1, name: Ivanov, phone: 790000000, email: test@example.com, ava: "http://domain/path/for/ava" } ] }
Request URLpublic/funnels/get
MethodsGET
DescriptionПодходит для получения списка воронок и этапов
Required parameters
  • public_token — {PUBLIC_TOKEN}
Optional parameters 
Output{ "ans" : "true", "funnels" : [ { "id" : 1, "name" : "MyFunnels", "is_default" : "true", "stages" : [ { "id" : 1, "name" : "MyStage", "order" : 1 } ] } ] }

Где мне взять public_token?

Настройки->Код на сайт

Где взять private_token?

По запросу у администрации сайта: ka@5crm.ru