{"id":476013,"date":"2026-04-15T09:37:10","date_gmt":"2026-04-15T09:37:10","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=476013"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=476013","title":{"rendered":"\u041d\u0435 \u043e\u0431\u0449\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041a\u0430\u043a \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0443\u044e \u0441\u0432\u044f\u0437\u043a\u0443 \u0414\u0438\u0430\u0434\u043e\u043a-\u0411\u0438\u0442\u0440\u0438\u043a\u044124"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u0432\u0430\u043d, \u044f \u0431\u0438\u0442\u0440\u0438\u043a\u0441-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. <\/p>\n<p><em>\u0417\u0430\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u043a-\u0442\u043e \u0432 \u0431\u0430\u0440 \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0438 \u0414\u0438\u0430\u0434\u043e\u043a \u2014 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0438\u043c \u043f\u043e\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u043e. \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438, \u0414\u0438\u0430\u0434\u043e\u043a \u2014 \u0437\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044b. \u0410 \u0431\u0438\u0437\u043d\u0435\u0441\u0443 \u043d\u0443\u0436\u043d\u0430 \u0435\u0434\u0438\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430: \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 \u0414\u0438\u0430\u0434\u043e\u043a\u0435 \u2014 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u0438\u0442 \u0435\u0433\u043e \u0432 CRM \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u0440\u0443\u0447\u043d\u044b\u0445 \u0441\u0432\u0435\u0440\u043e\u043a.<\/em><\/p>\n<p>\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u043a\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u043d\u0443\u043b\u044f. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0432 \u0411\u0438\u0442\u0440\u0438\u043a\u044124. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043b\u0438\u0434\u044b, \u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u044b, \u0444\u0430\u0439\u043b\u044b \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 CRM.<\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430<\/strong><\/p>\n<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441\u043f\u0435\u0446\u0442\u0435\u0445\u043d\u0438\u043a\u0438. \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u044f\u0449\u0438\u043a \u0414\u0438\u0430\u0434\u043e\u043a \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0431\u043e\u0440\u043e\u0442\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0411\u0438\u0442\u0440\u0438\u043a\u044124;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0432 \u0411\u0438\u0442\u0440\u0438\u043a\u044124, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u0432 \u043b\u0438\u0434\u044b. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u044b, \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u044f\u043c\u043e \u0432 CRM, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u0439\u0442 \u043a\u0430\u043a \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0431\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438.<\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0449\u0435 \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435, \u0430 \u0441\u0430\u0439\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0440\u043e\u043b\u044c \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0414\u0438\u0430\u0434\u043e\u043a\u043e\u043c \u0438 CRM.<\/p>\n<h3>\u041a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e<\/h3>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430:<\/p>\n<p><strong>1. \u041e\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 Protocol Buffers.<\/strong>\u00a0\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u043e\u0442 \u0414\u0438\u0430\u0434\u043e\u043a\u0430: \u0441\u0442\u0430\u0442\u0443\u0441\u044b, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0421\u043e\u0437\u0434\u0430\u043b\u0438 proto-\u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u0438\u0445 \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 proto2 \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 proto3. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 PHP-\u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<p><strong>2. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 API \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430. <\/strong>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 REST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u044f\u0449\u0438\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c.<\/p>\n<p><strong>3. \u0421\u0432\u044f\u0437\u0430\u043b\u0438 \u0441\u0430\u0439\u0442 \u0438 \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438. <\/strong>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0447\u0435\u0440\u0435\u0437 REST API. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438:\u00a0\u00a0<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043b\u0438\u0434\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 CRM \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u2014 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<h3>\u0422\u043e\u0447\u043a\u0438 \u0440\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430<\/h3>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<ol>\n<li>\n<p><strong>\u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. <\/strong><\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Protocol Buffers \u2014 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0441\u0430\u043c \u0414\u0438\u0430\u0434\u043e\u043a. \u041e\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442,\u00a0 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439, \u0447\u0435\u043c JSON.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 proto2, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Protocol Buffers \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 PHP \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0447\u0430\u043b\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f, \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 API. <\/strong><\/p>\n<p>\u0423 API \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439, \u0438 \u043d\u0435 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<br \/>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 \/V3\/GetDocflowEvents \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043d\u0435 \u0431\u044b\u043b\u043e. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0430, \u0447\u0442\u043e \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e.<\/p>\n<p>\u041c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \/V2\/GetDocflowEvents, \u0433\u0434\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0435\u0441\u0442\u044c. \u041f\u043e\u0437\u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0432 \u0432\u0435\u0440\u0441\u0438\u044e V3.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php namespace O2k\\Diadoc\\Integration;class Api{private const API_KEY = '';private const SERVICE_URL = 'https:\/\/diadoc-api.kontur.ru';private const RESOURCE_AUTHENTICATE = '\/V3\/Authenticate';private const RESOURCE_GET_DOCFLOWS_EVENTS_V2 = '\/V2\/GetDocflowEvents';private const RESOURCE_GET_DOCFLOWS_EVENTS_V3 = '\/V3\/GetDocflowEvents';private const RESOURCE_GET_DOCUMENT = '\/V3\/GetDocument';private const RESOURCE_GET_DOCUMENT_TYPES = '\/V2\/GetDocumentTypes';private const RESOURCE_GET_BOX = '\/GetBox';private const RESOURCE_PARSE_TITLE_XML = '\/ParseTitleXml';private const RESOURCE_GET_ENTITY_CONTENT = '\/V4\/GetEntityContent';private const RESOURCE_GENERATE_PRINT_FORM_FROM_ATTACHMENT = '\/GeneratePrintFormFromAttachment';private const RESOURCE_GET_GENERATED_PRINT_FORM = '\/GetGeneratedPrintForm';private const RESOURCE_GET_MESSAGE = '\/V5\/GetMessage';const METHOD_GET = 'GET';    const METHOD_POST = 'POST';private $token;public function getDocflowEventsV3($boxId,$startTimestamp,$endTimestamp,$sortDirection = 1,$afterIndexKey = null,$populateDocuments = false,$injectEntityContent = false,$populatePreviousDocumentStates = false)    {if (!$boxId) {return false;}$uriParameters = ['boxId' =&gt; $boxId,];$startProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp(['Ticks' =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($startTimestamp)]);$endProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp(['Ticks' =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($endTimestamp)]);$protoFilter = new \\Diadoc\\Api\\Proto\\TimeBasedFilter();$protoFilter-&gt;setFromTimestamp($startProtoTimestamp);$protoFilter-&gt;setToTimestamp($endProtoTimestamp);$protoFilter-&gt;setSortDirection($sortDirection);$getDocflowEventsRequest = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsRequest(['Filter' =&gt; $protoFilter,'AfterIndexKey' =&gt; $afterIndexKey,'PopulateDocuments' =&gt; $populateDocuments,'InjectEntityContent' =&gt; $injectEntityContent,'PopulatePreviousDocumentStates' =&gt; $populatePreviousDocumentStates]);$serializedProtoData = $getDocflowEventsRequest-&gt;serializeToString();$response = $this-&gt;doRequest(            self::RESOURCE_GET_DOCFLOWS_EVENTS_V3,            [                'boxId' =&gt; $boxId,            ],'POST',$serializedProtoData        );$docflowEvents = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsResponseV3;$docflowEvents-&gt;mergeFromString($response);return $docflowEvents;    }public function getDocflowEventsV2($boxId,$startTimestamp,$endTimestamp,$sortDirection = 1,$afterIndexKey = null,$populateDocuments = false,$injectEntityContent = false,$populatePreviousDocumentStates = false)    {if (!$boxId) {return false;}$uriParameters = ['boxId' =&gt; $boxId,];$startProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp(['Ticks' =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($startTimestamp)]);$endProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp(['Ticks' =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($endTimestamp)]);$protoFilter = new \\Diadoc\\Api\\Proto\\TimeBasedFilter();$protoFilter-&gt;setFromTimestamp($startProtoTimestamp);$protoFilter-&gt;setToTimestamp($endProtoTimestamp);$protoFilter-&gt;setSortDirection($sortDirection);$getDocflowEventsRequest = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsRequest(['Filter' =&gt; $protoFilter,'AfterIndexKey' =&gt; $afterIndexKey,'PopulateDocuments' =&gt; $populateDocuments,'InjectEntityContent' =&gt; $injectEntityContent,'PopulatePreviousDocumentStates' =&gt; $populatePreviousDocumentStates]);$serializedProtoData = $getDocflowEventsRequest-&gt;serializeToString();$response = $this-&gt;doRequest(            self::RESOURCE_GET_DOCFLOWS_EVENTS_V2,            [               'boxId' =&gt; $boxId,            ],'POST',$serializedProtoData        );$docflowEvents = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsResponse;$docflowEvents-&gt;mergeFromString($response);return $docflowEvents;    }public function getMessage($boxId, $messageId, $entityId, $originalSignature = false, $injectEntityContent = false){$requestData = ['boxId' =&gt; $boxId,'messageId' =&gt; $messageId,'entityId' =&gt; $entityId];if ($originalSignature) {$requestData['originalSignature'] = $originalSignature;}if ($injectEntityContent) {$requestData['injectEntityContent'] = $injectEntityContent;}$response = $this-&gt;doRequest(            self::RESOURCE_GET_MESSAGE,            $requestData        );$message = new \\Diadoc\\Api\\Proto\\Events\\Message;$message-&gt;mergeFromString($response);        return $message;}public function getEntityContent($boxId, $messageId, $entityId){$response = $this-&gt;doRequest(            self::RESOURCE_GET_ENTITY_CONTENT,            [                'boxId' =&gt;  $boxId,                'messageId' =&gt;  $messageId,                'entityId'  =&gt;  $entityId            ]        );        return $response;}public function generatePrintFormFromAttachment($documentType, $fromBoxId, $documentContent){$response = $this-&gt;doRequest(            self::RESOURCE_GENERATE_PRINT_FORM_FROM_ATTACHMENT,            [                'documentType' =&gt; $documentType,                'fromBoxId' =&gt; $fromBoxId            ],'POST',$documentContent        );        return $response;}public function getGeneratedPrintForm($printFormId){$response = $this-&gt;doRequest(            self::RESOURCE_GET_GENERATED_PRINT_FORM,            [                'printFormId' =&gt; $printFormId,            ]        );        return $response;}public function parseTitleXml($boxId, $documentTypeNamedId, $documentFunction, $documentVersion, $titleIndex, $xmlFileContent){$response = $this-&gt;doRequest(            self::RESOURCE_PARSE_TITLE_XML,            [                'boxId' =&gt; $boxId,                'documentTypeNamedId' =&gt; $documentTypeNamedId,                'documentFunction' =&gt; $documentFunction,                'documentVersion' =&gt; $documentVersion,                'titleIndex' =&gt; $titleIndex            ],'POST',$xmlFileContent        );        return $response;}public function getDocumentTypes($boxId)    {$response = $this-&gt;doRequest(self::RESOURCE_GET_DOCUMENT_TYPES,['boxId' =&gt; $boxId,]);$documentTypes = new \\Diadoc\\Api\\Proto\\Documents\\Types\\GetDocumentTypesResponseV2();$documentTypes-&gt;mergeFromString($response);        return $documentTypes;}public function getBox($boxId)    {        $response = $this-&gt;doRequest(            self::RESOURCE_GET_BOX,            [                'boxId' =&gt; $boxId            ]        );$box = new \\Diadoc\\Api\\Proto\\Box();$box-&gt;mergeFromString($response);        return $box;    }public function authenticateByPassword($login, $password)    {$uriParameters = ['type' =&gt; 'password',];$protoData = new \\Diadoc\\Api\\Proto\\LoginPassword(['Login' =&gt; $login, 'Password' =&gt; $password]);$serializedProtoData = $protoData-&gt;serializeToString();$response = $this-&gt;doRequest(            self::RESOURCE_AUTHENTICATE,            $uriParameters,'POST',$serializedProtoData        );        $this-&gt;setToken($response);        return $response;    }protected function getUri($action, $params = []){$uri = self::SERVICE_URL.$action;if ($params) {$uri .= '?'.http_build_query($params);}return $uri;}protected function doRequest($resource, $params = [], $method = self::METHOD_GET, $data = array())   {$uri = sprintf(            '%s%s?%s',            self::SERVICE_URL,            $resource,            http_build_query($params)        );        $ch = curl_init($uri);        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);curl_setopt($ch, CURLOPT_TIMEOUT, 180);        curl_setopt($ch, CURLOPT_HTTPHEADER, $this-&gt;buildRequestHeaders());        if ($method == self::METHOD_POST) {            curl_setopt($ch, CURLOPT_POST, 0);            curl_setopt($ch, CURLOPT_POSTFIELDS, is_array($data) ? http_build_query($data) : $data);        }        elseif ($method == self::METHOD_GET) {            curl_setopt($ch, CURLOPT_HTTPGET, 1);            curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);        }        $response = curl_exec($ch);        curl_close($ch);      return $response;    }    protected function getToken()    {        return $this-&gt;token;    }    public function setToken($token)    {        $this-&gt;token = $token;    }protected function buildRequestHeaders()    {        $header = 'DiadocAuth ddauth_api_client_id='.self::API_KEY;        if ($token = $this-&gt;getToken()) {            $header .= ', ddauth_token='.$token;        }        return ['Authorization: ' . $header];    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<h3>\u0421\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u0437 \u0441\u043a\u0440\u0438\u043f\u0430<\/h3>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0446\u0438\u043a\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442. \u0417\u0430 \u043e\u0434\u0438\u043d \u0442\u0430\u043a\u043e\u0439 \u0446\u0438\u043a\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0431\u043e\u0440\u043e\u0442\u0435 \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 CRM. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p><strong>1. \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e. <\/strong>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f PHP-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a API \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0438 \u0411\u0438\u0442\u0440\u0438\u043a\u044124.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">$diadocEngine = new O2k\\Diadoc\\Integration\\Api;$controller = new \\O2k\\Diadoc\\Integration\\Bitrix24\\Controller($diadocEngine);if ($eventsData = $controller-&gt;getDocflowEventsV2Data()) {$arExternalData = $controller-&gt;getExternalView($eventsData);if ($arExternalData) {$arExistingLeads = $controller-&gt;getLeadList(array_keys($arExternalData));$existingExternalIds = array_keys($arExistingLeads);$result = $controller-&gt;prepareData($arExternalData, $arExistingLeads);foreach ($result as $externalId =&gt; $arLeadData) {if (in_array($externalId, $existingExternalIds)) {$controller-&gt;updateLead($arExistingLeads[$externalId], $arLeadData);} else {$controller-&gt;addLead($arLeadData);}}}}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p><strong>2. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430. <\/strong>\u0427\u0435\u0440\u0435\u0437 REST API \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442: \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b.<\/p>\n<p><strong>3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0411\u0438\u0442\u0440\u0438\u043a\u044124. <\/strong>\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u043a\u043e\u0434\u0443. \u0415\u0441\u043b\u0438 \u043b\u0438\u0434 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u2014 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u043b\u0438\u0434\u0430 \u043d\u0435\u0442 \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439.<\/p>\n<p><strong>4. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. <\/strong>\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0414\u0438\u0430\u0434\u043e\u043a\u043e\u043c. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430, \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0444\u0430\u0439\u043b\u0430, \u0431\u0435\u0437 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p><strong>5. \u041f\u0440\u0438\u043d\u044f\u0442\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. <\/strong>\u0415\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u043e\u0432\u044b\u0439 \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0434 \u0441 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0435\u0439. \u0415\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u2014 \u043b\u0438\u0431\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u0434\u0430, \u043b\u0438\u0431\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438.<\/p>\n<p><strong>6. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u043b\u0435\u043d\u0442\u0435. <\/strong>\u0412\u0441\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d, \u043d\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0438, \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d \u2014 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u0438\u0434\u0430. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u0438\u0434\u0438\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u0414\u0438\u0430\u0434\u043e\u043a.<\/p>\n<p><strong>7. \u0425\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. <\/strong>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0445\u044d\u0448\u0438. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u2014 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 CRM \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u0439, \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044f\u0441\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0430\u0442\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c3b\/fcb\/e0a\/c3bfcbe0a6fd9154d28930497822a8fa.jpg\" width=\"1680\" height=\"896\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c3b\/fcb\/e0a\/c3bfcbe0a6fd9154d28930497822a8fa.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c3b\/fcb\/e0a\/c3bfcbe0a6fd9154d28930497822a8fa.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c81\/cb3\/15c\/c81cb315c36f835e01cef9dd369f48a3.jpg\" width=\"1680\" height=\"1185\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c81\/cb3\/15c\/c81cb315c36f835e01cef9dd369f48a3.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c81\/cb3\/15c\/c81cb315c36f835e01cef9dd369f48a3.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/22d\/9d2\/106\/22d9d21061b2a843414928be60ebb3d5.jpg\" width=\"1680\" height=\"988\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/22d\/9d2\/106\/22d9d21061b2a843414928be60ebb3d5.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/22d\/9d2\/106\/22d9d21061b2a843414928be60ebb3d5.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e37\/04f\/214\/e3704f214e860bd7bc610e73d30eee35.jpg\" width=\"1680\" height=\"908\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e37\/04f\/214\/e3704f214e860bd7bc610e73d30eee35.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e37\/04f\/214\/e3704f214e860bd7bc610e73d30eee35.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h3>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0431\u0435\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u0421\u0430\u0439\u0442 \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u043e\u0439 \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0431\u043e\u0440\u043e\u0442\u043e\u043c \u0438 CRM \u0441\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u0436, \u0438 \u0434\u043b\u044f IT-\u043e\u0442\u0434\u0435\u043b\u0430. \u0412\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b:<\/p>\n<ol>\n<li>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0431\u043e\u0440\u043e\u0442\u0430. <\/strong>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043b\u0438\u0434\u044b \u0432 CRM \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0442\u0440\u0430\u0442. <\/strong>\u0411\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0442 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044e \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. <\/strong>\u0421\u0442\u0430\u0442\u0443\u0441\u044b \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0435. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u0432\u0438\u0434\u044f\u0442 \u0432\u0441\u044e \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430. <\/strong>\u0412\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u0440\u0435\u0430\u043a\u0446\u0438\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 API. <\/strong>\u0422\u043e\u0447\u0435\u0447\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b\u043e \u043b\u0438\u0448\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043a \u0441\u0431\u043e\u044f\u043c. <\/strong>\u0415\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0435\u0442, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u044c \u043a \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044e. <\/strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044f\u0449\u0438\u043a\u0438 \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<p><em>\u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0414\u0438\u0430\u0434\u043e\u043a \u0438 CRM, \u043d\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0443\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u0430 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438, \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/em><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1023702\/\">https:\/\/habr.com\/ru\/articles\/1023702\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u0432\u0430\u043d, \u044f \u0431\u0438\u0442\u0440\u0438\u043a\u0441-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0417\u0430\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u043a-\u0442\u043e \u0432 \u0431\u0430\u0440 \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0438 \u0414\u0438\u0430\u0434\u043e\u043a \u2014 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0438\u043c \u043f\u043e\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u043e. \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438, \u0414\u0438\u0430\u0434\u043e\u043a \u2014 \u0437\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044b. \u0410 \u0431\u0438\u0437\u043d\u0435\u0441\u0443 \u043d\u0443\u0436\u043d\u0430 \u0435\u0434\u0438\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430: \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 \u0414\u0438\u0430\u0434\u043e\u043a\u0435 \u2014 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u0438\u0442 \u0435\u0433\u043e \u0432 CRM \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u0440\u0443\u0447\u043d\u044b\u0445 \u0441\u0432\u0435\u0440\u043e\u043a.\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u043a\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u043d\u0443\u043b\u044f. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0432 \u0411\u0438\u0442\u0440\u0438\u043a\u044124. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043b\u0438\u0434\u044b, \u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u044b, \u0444\u0430\u0439\u043b\u044b \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 CRM.\u0417\u0430\u0434\u0430\u0447\u0430\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441\u043f\u0435\u0446\u0442\u0435\u0445\u043d\u0438\u043a\u0438. \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:\u044f\u0449\u0438\u043a \u0414\u0438\u0430\u0434\u043e\u043a \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043e\u0431\u043e\u0440\u043e\u0442\u043e\u043c;\u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0411\u0438\u0442\u0440\u0438\u043a\u044124;\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442.\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0432 \u0411\u0438\u0442\u0440\u0438\u043a\u044124, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u0432 \u043b\u0438\u0434\u044b. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u044b, \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u044f\u043c\u043e \u0432 CRM, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438.\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u0439\u0442 \u043a\u0430\u043a \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0431\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438.\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0449\u0435 \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435, \u0430 \u0441\u0430\u0439\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0440\u043e\u043b\u044c \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0414\u0438\u0430\u0434\u043e\u043a\u043e\u043c \u0438 CRM.\u041a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430:1. \u041e\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 Protocol Buffers.\u00a0\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u043e\u0442 \u0414\u0438\u0430\u0434\u043e\u043a\u0430: \u0441\u0442\u0430\u0442\u0443\u0441\u044b, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0421\u043e\u0437\u0434\u0430\u043b\u0438 proto-\u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u0438\u0445 \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 proto2 \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 proto3. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 PHP-\u043a\u043b\u0430\u0441\u0441\u044b.2. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 API \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0414\u0438\u0430\u0434\u043e\u043a\u0430. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 REST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u044f\u0449\u0438\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c.3. \u0421\u0432\u044f\u0437\u0430\u043b\u0438 \u0441\u0430\u0439\u0442 \u0438 \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0411\u0438\u0442\u0440\u0438\u043a\u044124 \u0447\u0435\u0440\u0435\u0437 REST API. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438:\u00a0\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043b\u0438\u0434\u043e\u0432;\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445;\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 CRM \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u2014 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443.\u0422\u043e\u0447\u043a\u0438 \u0440\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438:\u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Protocol Buffers \u2014 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0441\u0430\u043c \u0414\u0438\u0430\u0434\u043e\u043a. \u041e\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442,\u00a0 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439, \u0447\u0435\u043c JSON.\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 proto2, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Protocol Buffers \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 PHP \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0447\u0430\u043b\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f, \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e.\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 API. \u0423 API \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439, \u0438 \u043d\u0435 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 \/V3\/GetDocflowEvents \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043d\u0435 \u0431\u044b\u043b\u043e. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0414\u0438\u0430\u0434\u043e\u043a\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0430, \u0447\u0442\u043e \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e.\u041c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \/V2\/GetDocflowEvents, \u0433\u0434\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0435\u0441\u0442\u044c. \u041f\u043e\u0437\u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0432 \u0432\u0435\u0440\u0441\u0438\u044e V3.\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442&lt;?php namespace O2k\\Diadoc\\Integration;class Api{private const API_KEY = &#187;;private const SERVICE_URL = &#8216;https:\/\/diadoc-api.kontur.ru&#8217;;private const RESOURCE_AUTHENTICATE = &#8216;\/V3\/Authenticate&#8217;;private const RESOURCE_GET_DOCFLOWS_EVENTS_V2 = &#8216;\/V2\/GetDocflowEvents&#8217;;private const RESOURCE_GET_DOCFLOWS_EVENTS_V3 = &#8216;\/V3\/GetDocflowEvents&#8217;;private const RESOURCE_GET_DOCUMENT = &#8216;\/V3\/GetDocument&#8217;;private const RESOURCE_GET_DOCUMENT_TYPES = &#8216;\/V2\/GetDocumentTypes&#8217;;private const RESOURCE_GET_BOX = &#8216;\/GetBox&#8217;;private const RESOURCE_PARSE_TITLE_XML = &#8216;\/ParseTitleXml&#8217;;private const RESOURCE_GET_ENTITY_CONTENT = &#8216;\/V4\/GetEntityContent&#8217;;private const RESOURCE_GENERATE_PRINT_FORM_FROM_ATTACHMENT = &#8216;\/GeneratePrintFormFromAttachment&#8217;;private const RESOURCE_GET_GENERATED_PRINT_FORM = &#8216;\/GetGeneratedPrintForm&#8217;;private const RESOURCE_GET_MESSAGE = &#8216;\/V5\/GetMessage&#8217;;const METHOD_GET = &#8216;GET&#8217;;    const METHOD_POST = &#8216;POST&#8217;;private $token;public function getDocflowEventsV3($boxId,$startTimestamp,$endTimestamp,$sortDirection = 1,$afterIndexKey = null,$populateDocuments = false,$injectEntityContent = false,$populatePreviousDocumentStates = false)    {if (!$boxId) {return false;}$uriParameters = [&#8216;boxId&#8217; =&gt; $boxId,];$startProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp([&#8216;Ticks&#8217; =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($startTimestamp)]);$endProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp([&#8216;Ticks&#8217; =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($endTimestamp)]);$protoFilter = new \\Diadoc\\Api\\Proto\\TimeBasedFilter();$protoFilter-&gt;setFromTimestamp($startProtoTimestamp);$protoFilter-&gt;setToTimestamp($endProtoTimestamp);$protoFilter-&gt;setSortDirection($sortDirection);$getDocflowEventsRequest = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsRequest([&#8216;Filter&#8217; =&gt; $protoFilter,&#8217;AfterIndexKey&#8217; =&gt; $afterIndexKey,&#8217;PopulateDocuments&#8217; =&gt; $populateDocuments,&#8217;InjectEntityContent&#8217; =&gt; $injectEntityContent,&#8217;PopulatePreviousDocumentStates&#8217; =&gt; $populatePreviousDocumentStates]);$serializedProtoData = $getDocflowEventsRequest-&gt;serializeToString();$response = $this-&gt;doRequest(            self::RESOURCE_GET_DOCFLOWS_EVENTS_V3,            [                &#8216;boxId&#8217; =&gt; $boxId,            ],&#8217;POST&#8217;,$serializedProtoData        );$docflowEvents = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsResponseV3;$docflowEvents-&gt;mergeFromString($response);return $docflowEvents;    }public function getDocflowEventsV2($boxId,$startTimestamp,$endTimestamp,$sortDirection = 1,$afterIndexKey = null,$populateDocuments = false,$injectEntityContent = false,$populatePreviousDocumentStates = false)    {if (!$boxId) {return false;}$uriParameters = [&#8216;boxId&#8217; =&gt; $boxId,];$startProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp([&#8216;Ticks&#8217; =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($startTimestamp)]);$endProtoTimestamp = new \\Diadoc\\Api\\Proto\\Timestamp([&#8216;Ticks&#8217; =&gt; \\O2k\\DateTime\\Helper::convertTimestampToTicks($endTimestamp)]);$protoFilter = new \\Diadoc\\Api\\Proto\\TimeBasedFilter();$protoFilter-&gt;setFromTimestamp($startProtoTimestamp);$protoFilter-&gt;setToTimestamp($endProtoTimestamp);$protoFilter-&gt;setSortDirection($sortDirection);$getDocflowEventsRequest = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsRequest([&#8216;Filter&#8217; =&gt; $protoFilter,&#8217;AfterIndexKey&#8217; =&gt; $afterIndexKey,&#8217;PopulateDocuments&#8217; =&gt; $populateDocuments,&#8217;InjectEntityContent&#8217; =&gt; $injectEntityContent,&#8217;PopulatePreviousDocumentStates&#8217; =&gt; $populatePreviousDocumentStates]);$serializedProtoData = $getDocflowEventsRequest-&gt;serializeToString();$response = $this-&gt;doRequest(            self::RESOURCE_GET_DOCFLOWS_EVENTS_V2,            [               &#8216;boxId&#8217; =&gt; $boxId,            ],&#8217;POST&#8217;,$serializedProtoData        );$docflowEvents = new \\Diadoc\\Api\\Proto\\Docflow\\GetDocflowEventsResponse;$docflowEvents-&gt;mergeFromString($response);return $docflowEvents;    }public function getMessage($boxId, $messageId, $entityId, $originalSignature = false, $injectEntityContent = false){$requestData = [&#8216;boxId&#8217; =&gt; $boxId,&#8217;messageId&#8217; =&gt; $messageId,&#8217;entityId&#8217; =&gt; $entityId];if ($originalSignature) {$requestData[&#8216;originalSignature&#8217;] = $originalSignature;}if ($injectEntityContent) {$requestData[&#8216;injectEntityContent&#8217;] = $injectEntityContent;}$response = $this-&gt;doRequest(            self::RESOURCE_GET_MESSAGE,            $requestData        );$message = new \\Diadoc\\Api\\Proto\\Events\\Message;$message-&gt;mergeFromString($response);        return $message;}public function getEntityContent($boxId, $messageId, $entityId){$response = $this-&gt;doRequest(            self::RESOURCE_GET_ENTITY_CONTENT,            [                &#8216;boxId&#8217; =&gt;  $boxId,                &#8216;messageId&#8217; =&gt;  $messageId,                &#8216;entityId&#8217;  =&gt;  $entityId            ]        );        return $response;}public function generatePrintFormFromAttachment($documentType, $fromBoxId, $documentContent){$response = $this-&gt;doRequest(            self::RESOURCE_GENERATE_PRINT_FORM_FROM_ATTACHMENT,            [                &#8216;documentType&#8217; =&gt; $documentType,                &#8216;fromBoxId&#8217; =&gt; $fromBoxId            ],&#8217;POST&#8217;,$documentContent        );        return $response;}public function getGeneratedPrintForm($printFormId){$response = $this-&gt;doRequest(            self::RESOURCE_GET_GENERATED_PRINT_FORM,            [                &#8216;printFormId&#8217; =&gt; $printFormId,            ]        );        return $response;}public function parseTitleXml($boxId, $documentTypeNamedId, $documentFunction, $documentVersion, $titleIndex, $xmlFileContent){$response = $this-&gt;doRequest(            self::RESOURCE_PARSE_TITLE_XML,            [                &#8216;boxId&#8217; =&gt; $boxId,                &#8216;documentTypeNamedId&#8217; =&gt; $documentTypeNamedId,                &#8216;documentFunction&#8217; =&gt; $documentFunction,                &#8216;documentVersion&#8217; =&gt; $documentVersion,                &#8216;titleIndex&#8217; =&gt; $titleIndex            ],&#8217;POST&#8217;,$xmlFileContent        );        return $response;}public function getDocumentTypes($boxId)    {$response = $this-&gt;doRequest(self::RESOURCE_GET_DOCUMENT_TYPES,[&#8216;boxId&#8217; =&gt; $boxId,]);$documentTypes = new \\Diadoc\\Api\\Proto\\Documents\\Types\\GetDocumentTypesResponseV2();$documentTypes-&gt;mergeFromString($response);        return $documentTypes;}public function getBox($boxId)    {        $response = $this-&gt;doRequest(            self::RESOURCE_GET_BOX,            [                &#8216;boxId&#8217; =&gt; $boxId            ]        );$box = new \\Diadoc\\Api\\Proto\\Box();$box-&gt;mergeFromString($response);        return $box;    }public function authenticateByPassword($login, $password)&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-476013","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/476013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=476013"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/476013\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=476013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=476013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=476013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}