1457 lines
49 KiB
Go
1457 lines
49 KiB
Go
package test
|
||
|
||
var jsonUserInfo = `{
|
||
"id": 1231414,
|
||
"name": "example",
|
||
"subdomain": "example",
|
||
"current_user_id": 581651,
|
||
"country": "RU",
|
||
"customers_mode": "segments",
|
||
"is_unsorted_on": true,
|
||
"is_loss_reason_enabled": true,
|
||
"is_helpbot_enabled": false,
|
||
"is_technical_account": false,
|
||
"is_api_filter_enabled": true,
|
||
"contact_name_display_order": 1,
|
||
"amojo_id": "f3c6340d-410e-4ad1-9f7e-c5e663599909",
|
||
"uuid": "824f3a59-6154-4edf-ba90-0b5593715d07",
|
||
"drive_url": "https://drive-b.amocrm.ru",
|
||
"version": 16,
|
||
"entity_names": {
|
||
"leads": {
|
||
"ru": {
|
||
"gender": "m",
|
||
"plural_form": {
|
||
"dative": "клиентам",
|
||
"default": "клиенты",
|
||
"genitive": "клиентов",
|
||
"accusative": "клиентов",
|
||
"instrumental": "клиентами",
|
||
"prepositional": "клиентах"
|
||
},
|
||
"singular_form": {
|
||
"dative": "клиенту",
|
||
"default": "клиент",
|
||
"genitive": "клиента",
|
||
"accusative": "клиента",
|
||
"instrumental": "клиентом",
|
||
"prepositional": "клиенте"
|
||
}
|
||
},
|
||
"en": {
|
||
"singular_form": {
|
||
"default": "lead"
|
||
},
|
||
"plural_form": {
|
||
"default": "leads"
|
||
},
|
||
"gender": "f"
|
||
},
|
||
"es": {
|
||
"singular_form": {
|
||
"default": "acuerdo"
|
||
},
|
||
"plural_form": {
|
||
"default": "acuerdos"
|
||
},
|
||
"gender": "m"
|
||
}
|
||
}
|
||
},
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/account"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"amojo_rights": {
|
||
"can_direct": true,
|
||
"can_create_groups": true
|
||
},
|
||
"users_groups": [
|
||
{
|
||
"id": 0,
|
||
"name": "Отдел продаж",
|
||
"uuid": null
|
||
}
|
||
],
|
||
"task_types": [
|
||
{
|
||
"id": 1,
|
||
"name": "Связаться",
|
||
"color": null,
|
||
"icon_id": null,
|
||
"code": "FOLLOW_UP"
|
||
},
|
||
{
|
||
"id": 2,
|
||
"name": "Встреча",
|
||
"color": null,
|
||
"icon_id": null,
|
||
"code": "MEETING"
|
||
}
|
||
],
|
||
"datetime_settings": {
|
||
"date_pattern": "d.m.Y H:i",
|
||
"short_date_pattern": "d.m.Y",
|
||
"short_time_pattern": "H:i",
|
||
"date_formant": "d.m.Y",
|
||
"time_format": "H:i:s",
|
||
"timezone": "Europe/Moscow",
|
||
"timezone_offset": "+03:00"
|
||
}
|
||
}
|
||
}`
|
||
|
||
var jsonPipelines = `{
|
||
"_total_items": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"pipelines": [
|
||
{
|
||
"id": 3177727,
|
||
"name": "Воронка",
|
||
"sort": 1,
|
||
"is_main": true,
|
||
"is_unsorted_on": true,
|
||
"is_archive": false,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"statuses": [
|
||
{
|
||
"id": 32392156,
|
||
"name": "Неразобранное",
|
||
"sort": 10,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#c1c1c1",
|
||
"type": 1,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392156"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392159,
|
||
"name": "Первичный контакт",
|
||
"sort": 20,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#99ccff",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392159"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392165,
|
||
"name": "Принимают решение",
|
||
"sort": 30,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#ffcc66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392165"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 142,
|
||
"name": "Успешно реализовано",
|
||
"sort": 10000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#CCFF66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/142"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 143,
|
||
"name": "Закрыто и не реализовано",
|
||
"sort": 11000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#D5D8DB",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/143"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonPipelines2 = `{
|
||
"_total_items": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"pipelines": [
|
||
{
|
||
"id": 3177727,
|
||
"name": "Воронка11",
|
||
"sort": 1,
|
||
"is_main": true,
|
||
"is_unsorted_on": true,
|
||
"is_archive": false,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"statuses": [
|
||
{
|
||
"id": 32392156,
|
||
"name": "Неразобранное",
|
||
"sort": 10,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#c1c1c1",
|
||
"type": 1,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392156"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392159,
|
||
"name": "Первичный контакт",
|
||
"sort": 20,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#99ccff",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392159"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392165,
|
||
"name": "Принимают решение",
|
||
"sort": 30,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#ffcc66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392165"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 142,
|
||
"name": "Успешно реализовано",
|
||
"sort": 10000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#CCFF66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/142"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 143,
|
||
"name": "Закрыто и не реализовано",
|
||
"sort": 11000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#D5D8DB",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/143"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"id": 3177728,
|
||
"name": "Воронка23",
|
||
"sort": 1,
|
||
"is_main": true,
|
||
"is_unsorted_on": true,
|
||
"is_archive": false,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"statuses": [
|
||
{
|
||
"id": 32392156,
|
||
"name": "Неразобранное",
|
||
"sort": 10,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#c1c1c1",
|
||
"type": 1,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392156"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392159,
|
||
"name": "Первичный контакт",
|
||
"sort": 20,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#99ccff",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392159"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392165,
|
||
"name": "Принимают решение",
|
||
"sort": 30,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#ffcc66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392165"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 142,
|
||
"name": "Успешно реализовано",
|
||
"sort": 10000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#CCFF66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/142"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 143,
|
||
"name": "Закрыто и не реализовано",
|
||
"sort": 11000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#D5D8DB",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/143"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"id": 3177729,
|
||
"name": "Воронка32",
|
||
"sort": 1,
|
||
"is_main": true,
|
||
"is_unsorted_on": true,
|
||
"is_archive": false,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"statuses": [
|
||
{
|
||
"id": 32392156,
|
||
"name": "Неразобранное",
|
||
"sort": 10,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#c1c1c1",
|
||
"type": 1,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392156"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392159,
|
||
"name": "Первичный контакт",
|
||
"sort": 20,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#99ccff",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392159"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 32392165,
|
||
"name": "Принимают решение",
|
||
"sort": 30,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#ffcc66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392165"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 142,
|
||
"name": "Успешно реализовано",
|
||
"sort": 10000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#CCFF66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/142"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 143,
|
||
"name": "Закрыто и не реализовано",
|
||
"sort": 11000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#D5D8DB",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/143"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonStep1 = `{
|
||
"_total_items": 5,
|
||
"_embedded": {
|
||
"statuses": [
|
||
{
|
||
"id": 32392156,
|
||
"name": "Неразобранное",
|
||
"sort": 10,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#c1c1c1",
|
||
"type": 1,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392156"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
},
|
||
{
|
||
"id": 32392159,
|
||
"name": "Первичный контакт",
|
||
"sort": 20,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#99ccff",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392159"
|
||
}
|
||
},
|
||
"descriptions": [
|
||
{
|
||
"account_id": 12345678,
|
||
"created_at": "2023-05-05 09:38:00",
|
||
"created_by": 12345,
|
||
"description": "Описание статуса \"Первичный контакт\" для новичка",
|
||
"id": 489,
|
||
"level": "newbie",
|
||
"pipeline_id": 3177727,
|
||
"status_id": 32392159,
|
||
"updated_at": "2023-05-05 09:38:00",
|
||
"updated_by": null
|
||
},
|
||
{
|
||
"account_id": 12345678,
|
||
"created_at": "2023-05-05 09:38:00",
|
||
"created_by": 0,
|
||
"description": "Описание статуса \"Первичный контакт\" для кандидата",
|
||
"id": 491,
|
||
"level": "candidate",
|
||
"pipeline_id": 3177727,
|
||
"status_id": 32392159,
|
||
"updated_at": "2023-05-05 09:38:00",
|
||
"updated_by": 12345
|
||
},
|
||
{
|
||
"account_id": 12345678,
|
||
"created_at": "2023-05-05 09:38:00",
|
||
"created_by": 123456,
|
||
"description": "Описание статуса \"Первичный контакт\" для мастера",
|
||
"id": 493,
|
||
"level": "master",
|
||
"pipeline_id": 3177727,
|
||
"status_id": 32392159,
|
||
"updated_at": "2023-05-05 09:38:00",
|
||
"updated_by": 123457
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 32392165,
|
||
"name": "Принимают решение",
|
||
"sort": 30,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#ffcc66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392165"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
},
|
||
{
|
||
"id": 142,
|
||
"name": "Успешно реализовано",
|
||
"sort": 10000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#CCFF66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/142"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
},
|
||
{
|
||
"id": 143,
|
||
"name": "Закрыто и не реализовано",
|
||
"sort": 11000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#D5D8DB",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/143"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonStep2 = `{
|
||
"_total_items": 5,
|
||
"_embedded": {
|
||
"statuses": [
|
||
{
|
||
"id": 32392156,
|
||
"name": "Неразобранное update",
|
||
"sort": 10,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#c1c1c1",
|
||
"type": 1,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392156"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
},
|
||
{
|
||
"id": 32392159,
|
||
"name": "Первичный контакт update",
|
||
"sort": 20,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#99ccff",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392159"
|
||
}
|
||
},
|
||
"descriptions": [
|
||
{
|
||
"account_id": 12345678,
|
||
"created_at": "2023-05-05 09:38:00",
|
||
"created_by": 12345,
|
||
"description": "Описание статуса \"Первичный контакт\" для новичка",
|
||
"id": 489,
|
||
"level": "newbie",
|
||
"pipeline_id": 3177727,
|
||
"status_id": 32392159,
|
||
"updated_at": "2023-05-05 09:38:00",
|
||
"updated_by": null
|
||
},
|
||
{
|
||
"account_id": 12345678,
|
||
"created_at": "2023-05-05 09:38:00",
|
||
"created_by": 0,
|
||
"description": "Описание статуса \"Первичный контакт\" для кандидата",
|
||
"id": 491,
|
||
"level": "candidate",
|
||
"pipeline_id": 3177727,
|
||
"status_id": 32392159,
|
||
"updated_at": "2023-05-05 09:38:00",
|
||
"updated_by": 12345
|
||
},
|
||
{
|
||
"account_id": 12345678,
|
||
"created_at": "2023-05-05 09:38:00",
|
||
"created_by": 123456,
|
||
"description": "Описание статуса \"Первичный контакт\" для мастера",
|
||
"id": 493,
|
||
"level": "master",
|
||
"pipeline_id": 3177727,
|
||
"status_id": 32392159,
|
||
"updated_at": "2023-05-05 09:38:00",
|
||
"updated_by": 123457
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 32392165,
|
||
"name": "Принимают решение update",
|
||
"sort": 30,
|
||
"is_editable": true,
|
||
"pipeline_id": 3177727,
|
||
"color": "#ffcc66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/32392165"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
},
|
||
{
|
||
"id": 142,
|
||
"name": "Успешно реализовано update",
|
||
"sort": 10000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#CCFF66",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/142"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
},
|
||
{
|
||
"id": 143,
|
||
"name": "Закрыто и не реализовано update",
|
||
"sort": 11000,
|
||
"is_editable": false,
|
||
"pipeline_id": 3177727,
|
||
"color": "#D5D8DB",
|
||
"type": 0,
|
||
"account_id": 12345678,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/pipelines/3177727/statuses/143"
|
||
}
|
||
},
|
||
"descriptions": []
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonLeadsTags = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 17,
|
||
"name": "Заявка с сайта1",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 16,
|
||
"name": "Техническая поддержка1",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonLeadsTags2 = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 15,
|
||
"name": "Заявка с сайта update1",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 14,
|
||
"name": "Техническая поддержка update1",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonContactsTags = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 13,
|
||
"name": "ContactsTags11",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 12,
|
||
"name": "ContactsTags22",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonContactsTags2 = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 11,
|
||
"name": "ContactsTags1 update1",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 9,
|
||
"name": "ContactsTags2 update2",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCompaniesTags = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 8,
|
||
"name": "CompaniesTags11",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 7,
|
||
"name": "CompaniesTags22",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCompaniesTags2 = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 6,
|
||
"name": "CompaniesTags1 update1",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 5,
|
||
"name": "CompaniesTags2 update2",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCustomersTags = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 4,
|
||
"name": "CustomersTags11",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 3,
|
||
"name": "CustomersTags22",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCustomersTags2 = `{
|
||
"_page": 1,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=1&limit=50"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/tags?filter[id][]=2707&filter[id][]=2709&page=2&limit=50"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"tags": [
|
||
{
|
||
"id": 2,
|
||
"name": "CustomersTags1 update1",
|
||
"color": "EBEBEB"
|
||
},
|
||
{
|
||
"id": 1,
|
||
"name": "CustomersTags2 update2",
|
||
"color": null
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonLeadsFields = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 21,
|
||
"name": "Пример текстового поля",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 16,
|
||
"name": "Пример поля с типом 'data'",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonLeadsFields2 = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 15,
|
||
"name": "Пример текстового поля update",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 14,
|
||
"name": "Пример поля с типом 'data' update",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonContactsFields = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 13,
|
||
"name": "ContactsFields",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 12,
|
||
"name": "ContactsFields",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonContactsFields2 = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 11,
|
||
"name": "ContactsFields update",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 9,
|
||
"name": "ContactsFields update",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCompaniesFields = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 8,
|
||
"name": "CompaniesFields",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 7,
|
||
"name": "CompaniesFields",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCompaniesFields2 = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 6,
|
||
"name": "CompaniesFields update",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 5,
|
||
"name": "CompaniesFields update",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCustomersFields = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 4,
|
||
"name": "CustomersFields",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 3,
|
||
"name": "CustomersFields",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|
||
|
||
var jsonCustomersFields2 = `{
|
||
"_total_items": 2,
|
||
"_page": 1,
|
||
"_page_count": 10,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=1"
|
||
},
|
||
"next": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=2"
|
||
},
|
||
"last": {
|
||
"href": "https://example.amocrm.ru/api/v4/leads/custom_fields?limit=2&page=10"
|
||
}
|
||
},
|
||
"_embedded": {
|
||
"custom_fields": [
|
||
{
|
||
"id": 2,
|
||
"name": "CustomersFields update",
|
||
"sort": 504,
|
||
"type": "text",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": [
|
||
{
|
||
"status_id": 41221,
|
||
"pipeline_id": 3142
|
||
}
|
||
],
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4439091/"
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": 1,
|
||
"name": "CustomersFields update",
|
||
"sort": 505,
|
||
"type": "date",
|
||
"is_predefined": false,
|
||
"settings": null,
|
||
"remind": null,
|
||
"is_api_only": false,
|
||
"group_id": null,
|
||
"enums": null,
|
||
"required_statuses": null,
|
||
"_links": {
|
||
"self": {
|
||
"href": "https://example.amocrm.ru/api/v4/custom_fields/4440043/"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}`
|