{"openapi":"3.0.3","info":{"title":"SendPulse CRM Public API","description":"Using the API for the CRM service, you can integrate your system with CRM from SendPulse and receive detailed information on pipelines, deals, contacts and their attributes and users. You can also create deals and contacts, assign and remove fields, tags, contact details and instant messengers. On the right, there is a button for authorizing requests made on this page. Click \u201cAuthorize,\u201d then insert the ID and Secret from your account. To perform a request directly from the page, click the \"Try it out\" button within each method block. Then fill in input fields if any (for URL parameters, the description is right below the URL request; for body parameters, the description is under the \u201cScheme\u201d button to the right of the example), and click \u201cRun.\u201d You will find the server response and description of received parameters below.","version":"0.1.0"},"servers":[{"url":"https:\/\/api.sendpulse.com\/crm\/v1","description":"Production server"}],"tags":[{"name":"Pipelines","description":""},{"name":"Pipeline Steps","description":""},{"name":"Deals","description":""},{"name":"Deal notes","description":""},{"name":"Deal contacts","description":""},{"name":"Deal history","description":""},{"name":"Contacts","description":""},{"name":"Contact phone number","description":""},{"name":"Contact email addresses","description":""},{"name":"Contacts messengers","description":""},{"name":"Contact tags","description":""},{"name":"Contact history","description":""},{"name":"Users","description":""},{"name":"Messengers types","description":""},{"name":"Custom Tab","description":""},{"name":"ManagerSettings","description":""},{"name":"Payments","description":""},{"name":"Telephony","description":""}],"paths":{"\/users":{"get":{"tags":["Users"],"summary":"Get a list of team members","responses":{"200":{"description":"| Returns a list of active invited users with the following information about each user: team member ID, contact details and interface settings * active users - team members who have confirmed their account through an email invitation. You can assign deals and contacts to your team members.","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/User"}}}}}}}}},"\/pipelines":{"post":{"tags":["Pipelines"],"summary":"Create new pipeline","description":"Create new pipeline with specified settings","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Pipeline name"},"settings":{"type":"array","items":{"$ref":"#\/components\/schemas\/Setting"}}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Pipeline"}}}}}}}},"get":{"tags":["Pipelines"],"summary":"Get a list of pipelines","description":"Returns a list of pipelines with information about each: pipeline ID, pipeline creator, created statuses, and pipeline settings","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Pipeline"}}}}}}}}},"\/pipelines\/{pipelineId}":{"get":{"tags":["Pipelines"],"summary":"Get information about a pipeline by ID","description":"Returns information about the specified pipeline: pipeline ID, pipeline creator, created statuses, and pipeline settings","parameters":[{"name":"pipelineId","in":"path","required":true,"description":"ID of a pipeline you need to get information about. It can be obtained with the \"Get a list of pipelines\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Pipeline"}}}}}}}},"put":{"tags":["Pipelines"],"summary":"Update information about a pipeline by its ID","description":"Updates information in the specified pipeline","parameters":[{"name":"pipelineId","in":"path","required":true,"description":"Pipeline ID to be updated.","schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Pipeline name"},"order":{"type":"integer","description":"Field display order"},"settings":{"type":"array","items":{"$ref":"#\/components\/schemas\/Setting"}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Pipeline"}}}}}}}}},"\/pipelines\/{pipelineId}\/steps":{"post":{"tags":["Pipeline Steps"],"summary":"Create a new pipeline step","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"order":{"type":"integer"},"color":{"type":"string","enum":["#000000","black"],"description":"Step color"},"addEndHours":{"type":"integer","enum":[null,1,2,3,4,5,6,8,9,10],"description":"Add number of hours or null"},"notifyIn":{"type":"string","enum":["0","15min","30min","1h","2h","3h","6h","12h","24h","2d","3d","4d","5d","6d","7d"],"description":"Time notification"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Step"}}}}}}}},"get":{"tags":["Pipeline Steps"],"summary":"Get pipeline steps","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Step"}}}}}}}}},"\/pipelines\/{pipelineId}\/steps\/{stepId}":{"put":{"tags":["Pipeline Steps"],"summary":"Update a pipeline step","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"order":{"type":"integer"},"color":{"type":"string","enum":["#000000","black"],"description":"Step color"},"addEndHours":{"type":"integer","enum":[null,1,2,3,4,5,6,8,9,10],"description":"Add number of hours or null"},"notifyIn":{"type":"string","enum":["0","15min","30min","1h","2h","3h","6h","12h","24h","2d","3d","4d","5d","6d","7d"],"description":"Time notification"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Step"}}}}}}}},"delete":{"tags":["Pipeline Steps"],"summary":"Delete a pipeline step","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/deals\/get-list":{"post":{"tags":["Deals"],"summary":"Get deals list","description":"\"status\" field values:\n0 = inactive\n1 = active\n2 = fail\n3 = success\n","requestBody":{"$ref":"#\/components\/requestBodies\/DealFilter"},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/Deal"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"searchRequest":{"type":"string"}}}}}}}}}}},"\/deals":{"post":{"tags":["Deals"],"summary":"Create a new deal","description":"Creates a new deal","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"pipelineId":{"type":"integer","description":"Pipeline ID where you need to create a deal. It can be obtained with the \"Get a list of pipelines\" method"},"stepId":{"type":"integer","description":"Pipeline step ID in which you want to create a deal. It can be obtained with the methods \"Get a list of pipelines\" and \"Get information about a pipeline by ID\""},"responsibleId":{"type":"integer","description":"Team member ID to assign to a deal. It can be obtained with the \"Get a list of team members\" method"},"name":{"type":"string","description":"Deal name. The maximum number of characters is 255"},"price":{"type":"number","description":"Deal amount"},"currency":{"type":"string","description":"Deal currency. Accepts values in the form of UAH, USD, EUR"},"sourceId":{"type":"integer","description":"Custom source ID of the deal from an external source"},"contact":{"description":"Deal contact","type":"array","items":{"type":"integer","description":"Contact ID of the deal. It can be obtained with the method \"Get contact list\""}},"attributes":{"description":"","items":{"properties":{"attributeId":{"type":"integer","description":"Attribute ID"},"value":{"type":"string","description":"Attribute value"}}}},"attachments":{"type":"array","items":{"type":"string"},"example":["\/personal\/deal\/sendPulse_crm_deals.csv"],"description":"First, the file must be uploaded to the file manager, and then the file can be attached."}},"required":["pipelineId","stepId"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Deal"}}}}}}}}},"\/deals\/{dealId}":{"get":{"tags":["Deals"],"summary":"Get information about the deal by ID","description":"Returns information about the specified deal: deal ID, ID of a pipeline where the deal was created, at what stage the deal is now, team member responsible for the deal, deal amount, deal creation source, list of notes and fields","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID for which you need to get information. You can get it in the \"Get a list of deals\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealDetailed"}}}}}}}},"put":{"tags":["Deals"],"summary":"Update information about a deal by its ID","description":"Updates information in the specified deal. Provided property values will be overwritten","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID to be updated. You can get it in the \"Get a list of deals\" method","schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"pipelineId":{"type":"integer","description":"Pipeline ID in which the deal is located. It can be obtained with the method \"Get a list of pipelines\""},"status":{"type":"integer","description":""},"stepId":{"type":"integer","description":"ID of a pipeline step where you need to place a deal. It can be obtained from the methods \"Get a list of pipelines\" and \"Get information about a pipeline by its ID\""},"responsibleId":{"type":"integer","description":"Team member ID to assign to a deal. It can be obtained with the \"Get a list of team members\" method"},"name":{"type":"string","description":"Deal name"},"price":{"type":"number","description":"Deal amount"},"currency":{"type":"string","description":"Deal currency. Accepts values in the form of UAH, USD, EUR"},"sourceId":{"type":"integer","description":"Custom source ID of the deal from an external source"},"order":{"type":"integer","description":"Field display order. If empty, the deal will be placed at the top of the list."}},"required":["pipelineId","status","stepId","name","price"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Deal"}}}}}}}},"delete":{"tags":["Deals"],"summary":"Delete a deal by its ID","description":"Deletes the selected deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID to delete","schema":{"type":"integer"}}],"responses":{"204":{"description":""}}}},"\/deals\/{dealId}\/change-pipeline":{"post":{"tags":["Deals"],"summary":"Change the pipeline of a deal by its ID.","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID to be updated. You can get it in the \"Get a list of deals\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"pipelineId":{"type":"integer","description":"Pipeline ID to which the deal will be moved. It can be obtained with the method \"Get a list of pipelines\""},"stepId":{"type":"integer","description":"ID of a pipeline step where you need to place a deal. It can be obtained from the methods \"Get a list of pipelines\" and \"Get information about a pipeline by its ID\""}}}}}},"responses":{"200":{"description":"OK"}}}},"\/deals\/{dealId}\/comments":{"get":{"tags":["Deal notes"],"summary":"Get a list of deal notes","description":"Returns a list of notes with information about each: ID, author, message and status","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID for which you want to get the list of notes. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealComment"}}}}}}}},"post":{"tags":["Deal notes"],"summary":"Add a note to a deal","description":"Adds a note to the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"ID of the deal for which you want to add a note. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","description":"Note message. The maximum number of characters is 65,535"}},"required":["message"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealComment"}}}}}}}}},"\/deals\/{dealId}\/comments\/{commentId}":{"put":{"tags":["Deal notes"],"summary":"Update a note to a deal","description":"Updates the selected note in the specified deal. Existing values will be overwritten","parameters":[{"name":"dealId","in":"path","required":true,"description":"ID of the deal for which you want to update a note. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}},{"name":"commentId","in":"path","required":true,"description":"ID of the note to be updated. It can be obtained with the \"Get a list of deal notes\" method","schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","description":"New note message. The maximum number of characters is 65,535"}},"required":["message"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealComment"}}}}}}}},"delete":{"tags":["Deal notes"],"summary":"Remove a note from the deal","description":"Removes a note from the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"ID of the deal from which you want to remove a note. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}},{"name":"commentId","in":"path","required":true,"description":"ID of the note to be removed. It can be obtained with the \"Get a list of deal notes\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":""}}}},"\/deals\/{dealId}\/contacts":{"get":{"tags":["Deal contacts"],"summary":"Get a list of contacts in a deal","description":"Returns a list of contacts in the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID for which you want to get the list of contacts. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}}}},"\/deals\/{dealId}\/contacts\/{contactId}":{"post":{"tags":["Deal contacts"],"summary":"Add a contact to a deal","description":"Adds a previously created contact to the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID in which you want to add the contact. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}},{"name":"contactId","in":"path","required":true,"description":"Contact ID you want to add to the deal. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"201":{"description":""}}},"delete":{"tags":["Deal contacts"],"summary":"Delete a contact from a deal","description":"Removes the contact from the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID from which you want to remove the contact. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}},{"name":"contactId","in":"path","required":true,"description":"Contact ID you want to remove from the deal. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":""}}}},"\/pipelines\/{pipelineId}\/attributes":{"get":{"tags":["Deal Attributes"],"summary":"Get deal attributes list","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttribute"}}}}}}}},"post":{"tags":["Deal Attributes"],"summary":"Create a deal attribute","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"type":{"type":"integer","description":"0 = Text, 1 = Number, 2 = Date, 3 = Link, 4 = Select, 5 = MultiSelect"},"mandatory":{"type":"boolean"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"required":["name","pipelineId","type"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttribute"}}}}}}}}},"\/pipelines\/{pipelineId}\/attributes\/{attributeId}":{"put":{"tags":["Deal Attributes"],"summary":"Update a deal attribute","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"type":{"type":"integer","description":"0 = Text, 1 = Number, 2 = Date, 3 = Link, 4 = Select, 5 = MultiSelect"},"mandatory":{"type":"boolean"},"order":{"type":"integer"},"status":{"type":"integer","description":"0 = Inactive, 1 = Active, 2 = Hidden"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"required":["name","order","pipelineId"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttribute"}}}}}}}},"delete":{"tags":["Deal Attributes"],"summary":"Delete a deal attribute","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/deals\/{dealId}\/attributes":{"get":{"tags":["Deal attribute Value"],"summary":"Get deal attribute values by ID","description":"Returns a list of attributes with ID, types, and values in the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID for which you want to get the fields. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttributeValue"}}}}}}}},"post":{"tags":["Deal attribute Value"],"summary":"Add a attribute value to deal by deal ID","description":"Adds a attribute with the specified value and ID to the deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID to which you want to add the field. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"attributeId":{"type":"integer","description":"Attribute ID you want to add to the deal. It can be obtained with the \"Get a list of deals\" and \"Get information about the deal by ID\" methods"},"value":{"type":"string","description":"Attribute value to be added to the deal. The maximum number of characters is 5500"}},"required":["attributeId","value"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttributeValue"}}}}}}}}},"\/deals\/attributes\/{pipelineId}":{"get":{"tags":["Deal attribute Value"],"summary":"List of all deal attribute values by pipeline","parameters":[{"name":"pipelineId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttribute"}}}}}}}}},"\/deals\/{dealId}\/attributes\/{attributeId}":{"put":{"tags":["Deal attribute Value"],"summary":"Update the deal attribute value","description":"Updates the deal attribute with the new value. Existing values will be overwritten.","parameters":[{"name":"dealId","in":"path","required":true,"description":"The deal ID for which you want to update the attribute. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"description":"The attribute ID you want update. It can be obtained with the \"Get a list of deals\" and \"Get information about the deal by ID\" methods","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"value":{"type":"string","description":"New attribute value. The maximum number of characters is 5500"}},"required":["value"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealAttributeValue"}}}}}}}},"delete":{"tags":["Deal attributes"],"summary":"Remove the deal attribute","description":"Removes the attribute from the specified deal","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID from which you want to delete the field. It can be obtained with the \"Get a list of deals\" method","schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"description":"Attribute ID you want delete. It can be obtained with the \"Get a list of deals\" and \"Get information about the deal by ID\" methods","schema":{"type":"integer"}}],"responses":{"204":{"description":""}}}},"\/messenger-types":{"get":{"tags":["Messengers types"],"summary":"Get a list of messengers","description":"Returns a list of types of available messengers for contacts","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/MessengerType"}}}}}}}}},"\/payments\/all":{"get":{"tags":["Payments"],"summary":"Get a list of payments by user","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/UserPaymentData"}},"total":{"type":"integer"}}}}}}}}},"\/payments\/deals\/{dealId}":{"get":{"tags":["Payments"],"summary":"Get a list of payments by dealId","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/Payment"}},"total":{"type":"integer"}}}}}}}}},"\/payments\/contacts\/{contactId}":{"get":{"tags":["Payments"],"summary":"Get a list of payments by contactId","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/Payment"}},"total":{"type":"integer"}}}}}}}}},"\/contacts\/get-list":{"post":{"tags":["Contacts"],"summary":"Get contacts list","requestBody":{"content":{"application\/json":{"schema":{"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"from":{"type":"string","format":"date","description":"Contact creation date, filter start date. Accepted format YYYY-MM-DD"},"to":{"type":"string","format":"date","description":"Contact creation date, filter end date. Accepted format YYYY-MM-DD"},"updateFrom":{"type":"string","format":"date","description":"Contact updated date, filter start date. Accepted format YYYY-MM-DD"},"updateTo":{"type":"string","format":"date","description":"Contact updated date, filter end date. Accepted format YYYY-MM-DD"},"firstName":{"type":"string","description":"Contacts first name you want to search for"},"lastName":{"type":"string","description":"Contacts last name you want to search for"},"responsibleIds":{"type":"array","description":"A list with the ID of users assigned to the contact you want to to search for. It can be obtained with the \"Get a list of team members\" method","items":{"type":"integer"}},"sourceType":{"type":"array","items":{"type":"integer","enum":[1,2,3,4,5,6,8,9,10]}},"phone":{"type":"string","description":"Phone number of a contact"},"email":{"type":"string"},"tagIds":{"type":"array","items":{"type":"integer"}},"messengerTypeIds":{"type":"array","items":{"type":"integer"}},"messengerLogin":{"type":"string"},"sortBy":{"type":"object","properties":{"direction":{"type":"string","description":"Sorting direction. Possible values: asc \u2014 ascending order; desc \u2014 descending order.","enum":["asc","desc"]},"fieldName":{"type":"string","enum":["id","created_at","first_name","attributeId","responsible_id"],"example":"id"}}},"attributes":{"$ref":"#\/components\/schemas\/AttributesProperty"},"location":{"type":"string"},"fieldValueConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Field name","enum":["attributes","lastName","phones","emails","messengers","location","tags"]},"expression":{"type":"string","description":"| Possible values:\n- eq (=) - neq (!=) - gt (>) - gte (>=) - lt (<) - lte (<=) - like - in (check among list of values) - empty (check empty values)."},"value":{"description":"Can have array or string type"}}}},"ids":{"type":"array","description":"Array of contacts IDs","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"list":{"items":{"$ref":"#\/components\/schemas\/Contact"}},"total":{"type":"integer"},"searchRequest":{"type":"string"}}}}}}}}}}},"\/contacts\/get-list-by-email":{"post":{"tags":["Contacts"],"summary":"Search contacts by email","description":"Returns contacts and the following information about each: the contact ID, the assigned person and the contact information","requestBody":{"content":{"application\/json":{"schema":{"properties":{"email":{"type":"string","description":"Email address of a contact"},"isEmailFullSearch":{"type":"boolean","description":"Search for emails that match completely or partially (true\/false)"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"list":{"description":"List with contacts","type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}},"total":{"description":"Total number of filtered records for pagination","type":"integer"}}}}}}}}}}},"\/contacts":{"post":{"deprecated":true,"tags":["Contacts"],"summary":"(Deprecated). Use POST \/contacts\/create instead to create a new contact","description":"Creates a contact with the given properties and returns a copy of the information, including the ID","requestBody":{"content":{"application\/json":{"schema":{"properties":{"responsibleId":{"type":"integer","description":"Team member ID to assign to a contact. It can be obtained with the \"Get a list of team members\" method"},"firstName":{"type":"string","description":"Contact first name"},"lastName":{"type":"string","description":"Contact last name"},"phones":{"type":"array","description":"List of phone numbers in the international format","items":{"type":"string"}},"emails":{"type":"array","description":"List of email addresses","items":{"type":"string"}},"tags":{"type":"array","description":"List of tag IDs to be added to a contact. It can be obtained with the \"Get a list of contact tags\" method","items":{"type":"integer"}},"attributes":{"type":"array","description":"List of fields to add to the contact. Pass in the attributes field array an object with the attributeId and value fields (will create a contact with an already existing attribute) Pass in the attributes field\narray an object with the name, type , value fields (will create a contact with a new attribute\nif there is no such attribute yet or create a contact with an existing attribute if the attribute already exists)'\n","items":{"properties":{"name":{"type":"string","description":"Attribute name"},"value":{"type":"string","description":"Attribute value"},"type":{"type":"integer","description":"0 - text, 1 - number, 2 - date, 3 - link, 4 - select , 5 - multiSelect"}},"required":["name","value"]}},"messengers":{"type":"array","description":"List of messengers to add to a contact","items":{"properties":{"typeId":{"$ref":"#\/components\/schemas\/MessengerTypeProperty"},"login":{"type":"string","description":"Contacts login in the specified messenger"}},"required":["typeId","login"]}},"attachments":{"type":"array","items":{"type":"string"},"description":"First, the file must be uploaded to the file manager, and then the file can be attached.","example":["\/personal\/deal\/sendPulse_crm_deals.csv"]}},"required":["responsibleId"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}}},"\/contacts\/create":{"post":{"tags":["Contacts"],"summary":"Create a new contact","description":"Creates a contact","requestBody":{"content":{"application\/json":{"schema":{"properties":{"responsibleId":{"type":"integer","description":"Team member ID to assign to a contact. It can be obtained with the \"Get a list of team members\" method"},"firstName":{"type":"string","description":"Contact first name"},"lastName":{"type":"string","description":"Contact last name"},"externalContactId":{"type":"string","description":"External contact ID field for services data - we do not recommend using it to add an ID from third-party systems"}},"required":["responsibleId"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}}},"\/contacts\/{contactId}":{"get":{"tags":["Contacts"],"summary":"Get information about a contact by ID","description":"Returns the following information on the specified contact: ID, team member responsible for the contact, first and Contacts last name, number of deals of the contact, list of phone numbers and email addresses, and messengers of the contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to get information. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}},"put":{"tags":["Contacts"],"summary":"Update information about the contact","description":"Update information about specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID of the contact whose information you want to update. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"responsibleId":{"type":"integer","description":"Team member ID to assign to a contact. It can be obtained with the \"Get a list of team members\" method"},"firstName":{"type":"string","description":"Contact first name"},"lastName":{"type":"string","description":"Contact last name"}},"required":["responsibleId"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}},"delete":{"tags":["Contacts"],"summary":"Remove contact by ID","description":"Removes the specified contact by ID","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID to be removed. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/deals":{"get":{"tags":["Contacts"],"summary":"Get all deals that related to contact","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"deals list","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/Deal"}}}}}}}}}},"\/contacts\/{contactId}\/comments":{"post":{"tags":["Contacts"],"summary":"Add a note to a contact","description":"Adds a note to the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID to which you want to add a note. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","minLength":1,"description":"Note message. The maximum number of characters is 65,535"}},"required":["message"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactComment"}}}}}}}}},"\/contacts\/{contactId}\/comments\/{commentId}":{"put":{"tags":["Contacts"],"summary":"Update contact note","description":"Updates the note of the specified contact. Provided property values will be overwritten.","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID contact for which you want to update the note. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"commentId","in":"path","required":true,"description":"Note ID you want to update. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","minLength":1,"description":"New note message. The maximum number of characters is 65,535"}},"required":["message"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactComment"}}}}}}}},"delete":{"tags":["Contacts"],"summary":"Remove contact note","description":"Removes a note of a specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to remove the note. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"commentId","in":"path","required":true,"description":"Note ID you want to remove. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/phones":{"post":{"tags":["Contact phone number"],"summary":"Add a phone number to the contact.","description":"Adds phone numbers to existing contacts","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID to add the phone to. Can be obtained in the \"Get contact list\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"phone":{"type":"string","minLength":1,"maxLength":50,"description":""}},"required":["phone"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactPhone"}}}}}}}}},"\/contacts\/{contactId}\/phones\/{phoneId}":{"put":{"tags":["Contact phone number"],"summary":"Update the phone number of the contact","description":"Updates the phone number of the specified contact. Provided property values will be overwritten.","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to update the phone number. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"phoneId","in":"path","required":true,"description":"The phone number ID you want to update. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"phone":{"type":"string","minLength":1,"maxLength":50,"description":"New phone number in the international format"}},"required":["phone"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactPhone"}}}}}}}},"delete":{"tags":["Contact phone number"],"summary":"Delete phone number","description":"Removes the phone number from the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID from which you want to remove the phone number. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"phoneId","in":"path","required":true,"description":"Phone number ID you want to remove. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/emails":{"post":{"tags":["Contact email addresses"],"summary":"Add an email address to the contact","description":"Adds an email address to the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID to which you want to add the email address. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","minLength":1,"maxLength":50,"description":"Email address to be added to the contact"},"isMain":{"type":"boolean","description":"Determines whether the email address is the main one"}}}}},"required":["email"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ContactEmail"}}}}}}}}}},"\/contacts\/{contactId}\/emails\/{emailId}":{"put":{"tags":["Contact email addresses"],"summary":"Update the email address of the contact","description":"Updates the email address of the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to update the email address. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"emailId","in":"path","required":true,"description":"Email address ID you want to update. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"email":{"type":"string","minLength":1,"maxLength":128,"description":"New email address"}},"required":["email"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactEmail"}}}}}}}},"delete":{"tags":["Contact email addresses"],"summary":"Remove the email address from the contact","description":"Removes the email address from the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID from which you want to remove the email address. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"emailId","in":"path","required":true,"description":"Email address ID you want to delete. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/messengers":{"post":{"tags":["Contacts messengers"],"summary":"Add messenger to contact","description":"Adds a messenger to the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID you want to add a mesenger to. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"typeId":{"$ref":"#\/components\/schemas\/MessengerTypeProperty"},"login":{"type":"string","description":"Contacts login in the specified messenger"},"isMainChatbot":{"type":"boolean","description":"Determine if chatbot messenger is the main one"}},"required":["typeId","login"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactMessenger"}}}}}}}}},"\/contacts\/{contactId}\/messengers\/{messengerId}":{"put":{"tags":["Contacts messengers"],"summary":"Update information about messenger of the contact","description":"Updates information about a given messenger for the specified contact. Provided property values will be overwritten.","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to update messenger information. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"messengerId","in":"path","required":true,"description":"Messenger ID you want to update. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"typeId":{"$ref":"#\/components\/schemas\/MessengerTypeProperty"},"login":{"type":"string","description":"Contacts login in the specified messenger"},"isMainChatbot":{"type":"boolean","description":"Determine if chatbot messenger is the main one"}},"required":["typeId","login"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactMessenger"}}}}}}}},"delete":{"tags":["Contacts messengers"],"summary":"Remove messenger from contact","description":"Removes messenger from a specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID from which you want to remove messenger. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"messengerId","in":"path","required":true,"description":"Messenger ID you want to remove. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contact-tags\/{tagId}\/contact\/{contactId}":{"post":{"tags":["Contact tags"],"summary":"Add a tag to the contact","description":"Adds a tag to the specified contact","parameters":[{"name":"tagId","in":"path","required":true,"description":"Tag ID you want to add. It can be obtained with the \"Get a list of contact tags\" method","schema":{"type":"integer"}},{"name":"contactId","in":"path","required":true,"description":"Contact ID to which you want to add the tag. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"201":{"description":"Created"}}},"delete":{"tags":["Contact tags"],"summary":"Delete a tag from a contact","description":"Removes the tag of the specified contact","parameters":[{"name":"tagId","in":"path","required":true,"description":"Tag ID you want to remove. It can be obtained with the \"Get a list of contact tags\" method","schema":{"type":"integer"}},{"name":"contactId","in":"path","required":true,"description":"Contact ID from which you want to remove the tag. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contact-tags":{"get":{"tags":["Contact tags"],"summary":"Get a list of contact tags","description":"Returns a list of contact tags with the tag ID, tag name, and the number of contacts associated with this tag","parameters":[{"name":"name","in":"query","required":false,"description":"Exact match filter by tag name","schema":{"type":"string","maxLength":64}},{"name":"search","in":"query","required":false,"description":"Partial match filter by tag name (LIKE %search%)","schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactTag"}}}}}}}},"post":{"tags":["Contact tags"],"summary":"Create a tag","description":"Creates a tag with the specified name","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Tag name to be created. The maximum number of characters is 64"},"colorText":{"type":"string","description":"Text color"},"colorBackground":{"type":"string","description":"Background color"}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactTag"}}}}}}}}},"\/contact-tags\/{tagId}":{"put":{"tags":["Contact tags"],"summary":"Update a tag","description":"Updates the specified tag with a new name. Provided property values will be overwritten.","parameters":[{"name":"tagId","in":"path","required":true,"description":"Tag ID you want to update. It can be obtained with the \"Get a list of contact tags\" method","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"New tag name. The maximum number of characters is 255"},"colorText":{"type":"string","description":"Text color"},"colorBackground":{"type":"string","description":"Background color"}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactTag"}}}}}}}},"delete":{"tags":["Contact tags"],"summary":"Remove tag","description":"Removes the specified tag","parameters":[{"name":"tagId","in":"path","required":true,"description":"Tag ID you want to remove. It can be obtained with the \"Get a list of contact tags\" method","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/attributes":{"get":{"tags":["Contact Attributes"],"summary":"Get contact attributes list","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactAttribute"}}}}}}}},"post":{"tags":["Contact Attributes"],"summary":"Create a contact attribute","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"type":{"type":"integer","description":"0 = Text, 1 = Number, 2 = Date, 3 = Link, 4 = Select, 5 = MultiSelect"},"mandatory":{"type":"boolean"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactAttribute"}}}}}}}}},"\/contacts\/attributes\/{attributeId}":{"put":{"tags":["Contact Attributes"],"summary":"Update a contact attribute","parameters":[{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"status":{"type":"integer","description":"0 = Inactive, 1 = Active, 2 = Hidden"},"type":{"type":"integer","description":"0 = Text, 1 = Number, 2 = Date, 3 = Link, 4 = Select, 5 = MultiSelect"},"mandatory":{"type":"boolean"},"contactCardShow":{"type":"boolean"},"order":{"type":"integer"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"required":["name","order"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactAttribute"}}}}}}}},"delete":{"tags":["Contact Attributes"],"summary":"Delete a contact attribute","parameters":[{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/attributes":{"get":{"tags":["Contact attributes Value"],"summary":"Get a list of specified contact attribute values","description":"Returns a list of attributes for the specified contact with information about the contacts ID, title, status, value, and options for each","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to get the list of attributes. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactAttributeValue"}}}}}}}},"post":{"tags":["Contact attributes Value"],"summary":"Add attribute value to contact","description":"Adds a attribute to the specified contact","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID to which you want to add the attribute. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"attributeId":{"type":"integer","description":"Attribute ID you want to add to the contact. It can be obtained with the \"Get a list of contacts\" and \"Get information about a contact by ID\" methods"},"value":{"type":"string","description":"The attribute value to add to the contact. The maximum number of characters is 5500"}},"required":["attributeId","value"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactAttributeValue"}}}}}}}}},"\/contacts\/{contactId}\/attributes\/{attributeId}":{"put":{"tags":["Contact attributes Value"],"summary":"Update contact attribute value","description":"Updates the attribute for the specified contact. Provided property values will be overwritten.","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID for which you want to update the field. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"description":"Attribute ID you want to update. It can be obtained with the \"Get a list of contacts\" and \"Get information about a contact by ID\" methods","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"value":{"type":"string","description":"New attribute value. The maximum number of characters is 5500"}},"required":["value"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ContactAttributeValue"}}}}}}}},"delete":{"tags":["Contact attributes Value"],"summary":"Delete contact attribute value","description":"Delete attribute for specified contact ","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID from which you want to remove the attribute. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"description":"Attribute ID you want to remove. It can be obtained with the \"Get a list of contacts\" and \"Get information about a contact by ID\" methods","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/attributes\/batch":{"post":{"tags":["Contact Attributes Values"],"summary":"Batch store contact attributes values","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"attributesValues":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"integer","description":"Attribute ID"},"value":{"type":"string","description":"Attribute value"}}}}},"required":["attributeId","value"]}}}},"responses":{"201":{"description":"Successfully stored","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"attributeId":{"type":"integer","description":"Attribute ID"},"value":{"type":"string","description":"Attribute value"}}}}}}}}}}},"\/boards":{"get":{"tags":["Tasks boards"],"summary":"Get all boards","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Boards"}}}}}}}},"post":{"tags":["Tasks boards"],"summary":"Create new board","description":"Creates a new board with the specified properties","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Board name"},"settings":{"type":"array","items":{"properties":{"name":{"type":"string","description":"Setting name","enum":["responsibleUser","color"]},"value":{"type":"string","description":"Setting value"}}}}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Boards"}}}}}}}}},"\/boards\/{boardId}":{"get":{"tags":["Tasks boards"],"summary":"Get board by ID","description":"Gets a board with all associated settings","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Boards"}}}}}}}},"put":{"tags":["Tasks boards"],"summary":"Update board by ID","description":"Updates the board with settings by ID","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"settings":{"type":"array","items":{"properties":{"name":{"type":"string"},"value":{"type":"string","example":"1 or hello"}}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Boards"}}}}}}}}},"\/boards\/{boardId}\/attributes":{"get":{"tags":["Board attributes"],"summary":"Get attribute for board","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/BoardAttribute"}}}}}}}},"post":{"tags":["Board attributes"],"summary":"Create attribute for board","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Attribute name"},"type":{"type":"number","description":"Attribute type:\n0 -string\n1 - number\n2 - date\n3 - link\n4 - list\n5 - multiList\n"},"mandatory":{"type":"boolean","description":"Is attribute required"},"options":{"type":"array","description":"Attribute options (only for \"list\" and \"multiList\" types)","default":[1,2]}}}}}},"responses":{"201":{"description":"Successfully"}}}},"\/boards\/{boardId}\/attributes\/{attributeId}":{"put":{"tags":["Board attributes"],"summary":"Update attribute for board","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Attribute name"},"type":{"type":"number","description":"Attribute type:\n0 -string\n1 - number\n2 - date\n3 - link\n4 - list\n5 - multiList\n"},"mandatory":{"type":"boolean","description":"Is attribute required"},"options":{"type":"array","description":"Attribute options (only for \"list\" and \"multiList\" types"},"order":{"type":"integer","description":"Attribute order"},"status":{"type":"integer"}}}}}},"responses":{"200":{"description":"Successfully"}}}},"\/boards\/{boardId}\/steps":{"post":{"tags":["Tasks steps"],"summary":"Create steps for board","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Step name"},"color":{"type":"string","description":"Step color"}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/BoardSteps"}}}}}}}}},"\/boards\/{boardId}\/steps\/{stepId}":{"put":{"tags":["Tasks steps"],"summary":"Update steps for board","description":"Updates board step (with order)","parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Step name"},"color":{"type":"string","description":"Step color"},"order":{"type":"integer","description":"Step order"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/BoardSteps"}}}}}}}}},"\/tasks\/list":{"post":{"tags":["Tasks"],"summary":"Get tasks","description":"Retrieves a list of tasks based on selected filters","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"boardId":{"type":"integer","example":1},"stepId":{"type":"array","description":"Array of step IDs"},"priority":{"type":"integer","example":"[ 1,2,3 ]"},"type":{"type":"integer","enum":[1,2,3]},"responsibleId":{"type":"array","description":"Array of responsible users IDs"},"parentId":{"type":"array","description":"Array of parent task IDs"},"dealName":{"type":"string","example":"name"},"observers":{"type":"array","description":"Array of users IDs acting as observers"},"tags":{"type":"array","description":"IDs of tags"},"tagMatch":{"type":"string","enum":["any","all"],"description":"Filter by tags (all - all tags, any - any tag). Default: any"},"attributes":{"type":"array","items":{"properties":{"id":{"type":"integer"},"type":{"type":"integer"},"value":{"type":"string","example":"hello | ['hello', 'hello']"}}}},"contacts":{"type":"string","example":"name"},"startAtFrom":{"type":"string","example":"2021-11-25 13:38"},"startAtTo":{"type":"string","example":"2021-11-25 13:38"},"finishAtFrom":{"type":"string","example":"2021-11-25 13:38"},"finishAtTo":{"type":"string","example":"2021-11-25 13:38"},"createdAtFrom":{"type":"string","example":"2021-11-25 13:38"},"createdAtTo":{"type":"string","example":"2021-11-25 13:38"},"updatedAtFrom":{"type":"string","example":"2025-05-03 13:00"},"updatedAtTo":{"type":"string","example":"2025-05-07 13:00"},"sort":{"type":"object","properties":{"field":{"type":"string","default":"name"},"direction":{"type":"string","default":"asc"}}},"status":{"type":"integer","enum":[1,2]},"endedAtFrom":{"type":"string","example":"2021-11-25 13:38"},"endedAtTo":{"type":"string","example":"2021-11-25 13:38"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Tasks"},"searchRequest":{"type":"string"}}}}}}}}},"\/tasks":{"post":{"tags":["Tasks"],"summary":"Create tasks","description":"repeatSetting - has 4 types: 1-daily, 2-weekly, 3-monthly, 4-yearly.\n'endSetting' - has 2 types: byDate(2021-11-25), byCount(1)\n\n1) 'repeatSetting': {'type': 1, 'startDate': '2021-11-25 13:38',\n'endSetting': {'type':'byDate','value': '2021-11-25'},'setting': {'everyDay': 2 }};\n<br> 'everyDay' - 2 (repeat every Tuesday)\n\n2) 'repeatSetting': {'type': 2, 'startDate': '2021-11-25 13:38',\n'endSetting': {'type':'byCount','value': 1},'setting': {'days': [1,4,5], 'everyWeekOfMonth': 3 }};\n'days': [1,4,5], 'everyWeekOfMonth': 3\n<br> (repeat every Monday, Thursday, Friday of every 3rd week of the month)\n\n3) 'repeatSetting': {'type': 3, 'startDate': '2021-11-25 13:38',\n'endSetting': {'type':'byDate','value': '2021-11-25'},\n'setting': {'numberOfMonth': {'everyDay': 31, 'everyMonth':5} }};\n<br> 'numberOfMonth': {'everyDay': 31, 'everyMonth':5 (repeat every 31st day of every 5th month)\n\n4) 'repeatSetting': {'type': 3, 'startDate': '2021-11-25 13:38','endSetting': {'type':'byCount','value': 11},\n'setting': {'dayOfMonth': {'everyWeek': 3, 'dayOfWeek':5, 'everyMonth':12} }};\n<br> 'dayOfMonth': {'everyWeek': 3, 'dayOfWeek':5, 'everyMonth':12} - (repeat every 3rd week every 5th day of the week every 12th month)\n","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Task name"},"boardId":{"type":"integer"},"stepId":{"type":"integer"},"observers":{"type":"array","description":"Array of users IDs acting as observers"},"priority":{"$ref":"#\/components\/schemas\/TaskPriorityProperty"},"sourceType":{"$ref":"#\/components\/schemas\/IntegerSourceTypeProperty"},"responsibleId":{"type":"integer","description":"Responsible user ID"},"parentId":{"type":"integer","description":"Parent task ID"},"description":{"type":"string","description":"Task description"},"alert":{"type":"string","description":"Notify before task expires (when notification is enabled). Allowed values - 0(not selected), 15min, 30min, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 4d, 5d, 6d, 7d"},"repeat":{"type":"integer","description":"Do you need to repeat the task"},"startAt":{"type":"string","format":"Y-m-d H:i"},"finishAt":{"type":"string","format":"Y-m-d H:i"},"repeatSetting":{"$ref":"#\/components\/schemas\/TaskRepeats"},"attributes":{"$ref":"#\/components\/schemas\/TasksAttribute"},"tags":{"type":"array","example":"[ 1,2,3 ]","description":"IDs of tags"},"checklists":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Checklist name"},"items":{"type":"array","items":{"properties":{"name":{"type":"string","description":"Checklist item name"},"isDone":{"type":"integer","description":"Is item is done (checked)"}}}}}}},"connections":{"type":"object","properties":{"dealIds":{"type":"array","example":"[ 1,2 ]"},"contactIds":{"type":"array","example":"[ 1,2 ]"},"taskIds":{"type":"array","example":"[ 1,2 ]"}}},"attachments":{"type":"array","items":{"type":"string"},"description":"First, the file must be uploaded to the file manager, and then the file can be attached.","example":["\/personal\/task\/sendPulse_crm_report.csv"]}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Tasks"}}}}}}}}},"\/tasks-repeat\/templates":{"get":{"tags":["Tasks"],"summary":"Get task templates","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Tasks"}}}}}}}}},"\/tasks\/{taskId}":{"get":{"tags":["Tasks"],"summary":"Get tasks by ID","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Tasks"}}}}}}}},"put":{"tags":["Tasks"],"summary":"Update a task by ID","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Task name"},"boardId":{"type":"integer"},"stepId":{"type":"integer"},"priority":{"$ref":"#\/components\/schemas\/TaskPriorityProperty"},"sourceType":{"$ref":"#\/components\/schemas\/IntegerSourceTypeProperty"},"responsibleId":{"type":"integer","description":"Responsible user ID"},"parentId":{"type":"integer","description":"Parent task ID"},"description":{"type":"string","description":"Task description"},"repeat":{"type":"integer","description":"Do you need to repeat the task"},"startAt":{"type":"string","format":"Y-m-d H:i"},"finishAt":{"type":"string","format":"Y-m-d H:i"},"tags":{"type":"array","example":"[ 1,2,3 ]","description":"IDs of tags"},"observers":{"type":"array","example":"[ 1,2,3 ]","description":"Array of users IDs acting as observers"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Tasks"}}}}}}}},"delete":{"tags":["Tasks"],"summary":"Delete task by ID","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/tasks\/{taskId}\/parent":{"post":{"tags":["Tasks"],"summary":"Set\/unset the parent task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"parentId":{"type":"number","nullable":true,"description":"Parent task ID or null"}}}}}},"responses":{"200":{"description":"Successfully"}}}},"\/tasks\/{taskId}\/steps\/{stepId}\/order":{"post":{"tags":["Tasks"],"summary":"Change task order","description":"Changes order of a task in the current step or in another. newStepId field is optional","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"order":{"type":"number","minimum":1,"description":"Task order in step"},"newStepId":{"type":"number","description":"New step ID"}},"required":["order"]}}}},"responses":{"200":{"description":"Successfully changed"}}}},"\/tasks\/{taskId}\/comments":{"post":{"tags":["Task Comments"],"summary":"Add comment to task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","description":"Comment message"}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskComment"}}}}}}}}},"\/tasks\/{taskId}\/comments\/{commentId}":{"put":{"tags":["Task Comments"],"summary":"Update comment in task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","description":"Comment message"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskComment"}}}}}}}}},"\/task-tags\/{tagId}\/task\/{taskId}":{"delete":{"tags":["Task Tags"],"summary":"Detach tag from a task","parameters":[{"name":"tagId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/task-tags":{"get":{"tags":["Task Tags"],"summary":"Get task tags list","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/TaskTag"}}}}}}}}},"post":{"tags":["Task Tags"],"summary":"Create a task tag","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Tag name"},"color":{"type":"string","description":"Tag color"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskTag"}}}}}}}}},"\/task-tags\/{tagId}":{"put":{"tags":["Task Tags"],"summary":"Update a task tag","parameters":[{"name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Tag name"},"color":{"type":"string","description":"Tag color"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskTag"}}}}}}}},"delete":{"tags":["Task Tags"],"summary":"Delete a task tag","parameters":[{"name":"tagId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/task-contacts\/{taskId}\/contact\/{contactId}":{"delete":{"tags":["Task Entity"],"summary":"Detach a contact from a task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/task-deals\/{taskId}\/deal\/{dealId}":{"delete":{"tags":["Task Entity"],"summary":"Detach a deal from a task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"dealId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/task-to-task\/{taskHeadId}\/task\/{taskId}":{"delete":{"tags":["Task Entity"],"summary":"Detach task from another task","parameters":[{"name":"taskHeadId","in":"path","required":true,"description":"Parent task ID","schema":{"type":"integer"}},{"name":"taskId","in":"path","required":true,"description":"Child task ID","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/tasks\/{taskId}\/entity-attach":{"post":{"tags":["Task Entity"],"summary":"Attach entity to task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"connections":{"type":"object","properties":{"dealIds":{"type":"array","example":"[ 1,2 ]"},"contactIds":{"type":"array","example":"[ 1,2 ]"},"taskIds":{"type":"array","example":"[ 1,2 ]"},"subTasksIds":{"type":"array","example":"[ 1,2 ]"}}}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TasksConnection"}}}}}}}}},"\/tasks\/{taskId}\/checklists\/single":{"post":{"tags":["Task Checklist"],"summary":"Create checklist without items in task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Checklist name"}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"taskId":{"type":"integer"},"order":{"type":"number"}}}}}}}}}}},"\/tasks\/{taskId}\/checklists\/{checklistId}\/single":{"put":{"tags":["Task Checklist"],"summary":"Update checklist without items in task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"checklistId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Checklist name"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"taskId":{"type":"integer"},"order":{"type":"number"}}}}}}}}}}},"\/tasks\/{taskId}\/checklists":{"get":{"tags":["Task Checklist"],"summary":"Get checklist list by task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskChecklist"}}}}}}}},"post":{"tags":["Task Checklist"],"summary":"Create multiple checklists with items in task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"checklists":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Checklist name"},"items":{"type":"array","items":{"properties":{"name":{"type":"string","description":"Checklist item name"},"isDone":{"type":"number","description":"Is checklist item done (checked). 0 - no, 1 - yes"}}}}}}}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskChecklist"}}}}}}}},"put":{"tags":["Task Checklist"],"summary":"Update multiple checklists with items in task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"checklists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","description":"Checklist name"},"items":{"type":"array","items":{"properties":{"id":{"type":"number"},"name":{"type":"string","description":"Checklist item name"},"isDone":{"type":"number","description":"Is checklist item done (checked). 0 - no, 1 - yes"}}}}}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TaskChecklist"}}}}}}}}},"\/tasks\/{taskId}\/checklists\/{checklistId}":{"delete":{"tags":["Task Checklist"],"summary":"Delete a checklist from a task","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"checklistId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/checklists\/{checklistId}\/items":{"post":{"tags":["Checklist Items"],"summary":"Create items for checklist","parameters":[{"name":"checklistId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Checklist item name"},"isDone":{"type":"number","description":"Is checklist item done (checked). 0 - no, 1 - yes"}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"isDone":{"type":"integer"},"order":{"type":"number"}}}}}}}}}}},"\/checklists\/{checklistId}\/items\/{itemId}":{"post":{"tags":["Checklist Items"],"summary":"Change order of item in checklist","parameters":[{"name":"checklistId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"order":{"type":"number"}}}}}},"responses":{"200":{"description":"Successfully"}}},"put":{"tags":["Checklist Items"],"summary":"Update checklist item","parameters":[{"name":"checklistId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Checklist item name"},"isDone":{"type":"number","description":"Is checklist item done (checked). 0 - no, 1 - yes"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"isDone":{"type":"integer"},"order":{"type":"number"}}}}}}}}}},"delete":{"tags":["Checklist Items"],"summary":"Delete checklist items","parameters":[{"name":"checklistId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/tasks\/{taskId}\/attributes":{"post":{"tags":["Task Attributes"],"summary":"Create attribute value","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"attributeId":{"type":"number","description":"ID of attribute"},"value":{"description":"Attribute value (string or array)"}}}}}},"responses":{"201":{"description":"Successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object","properties":{"attributeable_type":{"type":"string"},"attributeable_id":{"type":"integer"},"value":{"type":"string"},"attribute_id":{"type":"integer"},"user_id":{"type":"integer"},"id":{"type":"integer"}}}}}}}}}}}},"\/{boardId}\/attributes\/{attributeId}\/values\/{valueId}":{"put":{"tags":["Task Attributes"],"summary":"Update task attribute value","parameters":[{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"valueId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"value":{"description":"Attribute value (string or array)"}}}}}},"responses":{"200":{"description":"Successfully"}}},"delete":{"tags":["Task Attributes"],"summary":"Delete attribute value from task","parameters":[{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"valueId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully"}}}},"\/telephony\/calls\/get-list":{"post":{"tags":["Telephony"],"summary":"Get calls","requestBody":{"$ref":"#\/components\/requestBodies\/FilterTelephonyCalls"},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of calls"},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/TelephonyCall"}}}}}}}}}}}},"\/contacts\/{contactId}\/get-calls":{"post":{"tags":["Telephony"],"summary":"Get calls by contact\"","requestBody":{"$ref":"#\/components\/requestBodies\/FilterTelephonyCalls"},"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2022-06-28"},"calls":{"type":"array","items":{"$ref":"#\/components\/schemas\/TelephonyCall"}}}}}}}}}}}}},"\/deals\/{dealId}\/get-calls":{"post":{"tags":["Telephony"],"summary":"Get calls by deal","requestBody":{"$ref":"#\/components\/requestBodies\/FilterTelephonyCalls"},"parameters":[{"name":"dealId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2022-06-28"},"calls":{"type":"array","items":{"$ref":"#\/components\/schemas\/TelephonyCall"}}}}}}}}}}}}},"\/deals\/{dealId}\/attach-call":{"post":{"tags":["Telephony"],"summary":"Attach call to deal","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"callId":{"type":"integer"}}}}}},"parameters":[{"name":"dealId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/TelephonyCall"}}}}}}}}},"\/deals\/{dealId}\/expiration":{"put":{"tags":["Deal Expiration"],"summary":"Update or create deal expiration","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID","schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"date":{"type":"string","format":"date","description":"Expiration date"},"time":{"type":"string","format":"time","description":"Expiration time"},"notifyIn":{"type":"string","nullable":true,"description":"Notify before deal expires (when notification is enabled). Allowed values - 0(not selected), 15min, 30min, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 4d, 5d, 6d, 7d"},"dealAction":{"type":"integer","nullable":true,"description":"Allowed values 1 - created, 2 - updated"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealExpiration"}}}}}}}},"delete":{"tags":["Deal Expiration"],"summary":"Remove deal expiration","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal ID","schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/contacts\/{contactId}\/edu-payments":{"get":{"tags":["Contacts"],"summary":"Get EDU payments by contact","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"courseId":{"type":"integer"},"name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}}},"status":{"type":"integer"},"paymentMethod":{"type":"string","enum":["YooMoney","PayPal","Fondy","ROBOKASSA","Stripe","MERCADOPAGO","LiqPay"]},"createdAt":{"type":"string","format":"date-time"}}}}}}}}}}}}}},"\/contacts\/{contactId}\/edu-statistic":{"get":{"tags":["Contacts"],"summary":"Get EDU statistics for a contact","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"},"statusStudentOnCourse":{"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"lessons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"statusStudentOnLesson":{"type":"object","properties":{"status":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}}},"tests":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"string"}}}}}}}}}}}}}}}}},"\/files\/upload":{"post":{"tags":["File Manager"],"summary":"Upload files","requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"files[]":{"type":"array","description":"Array of file binaries","items":{"type":"string","format":"binary"}}}}}}},"responses":{"201":{"description":"Created successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object","properties":{"link":{"type":"string"}}}}}}}}}}}},"\/attachments":{"post":{"tags":["Attachments"],"summary":"Attach file","description":"First, the file must be uploaded to the file manager, and then the file can be attached.","requestBody":{"$ref":"#\/components\/requestBodies\/AttachmentBody"},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/EntityAttachment"}}}}}}}}},"\/attachments\/batch":{"post":{"tags":["Attachments"],"summary":"Create attachment","description":"First, the file must be uploaded to the file manager, and then the file can be attached.","requestBody":{"content":{"application\/json":{"schema":{"properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"link":{"type":"string"},"entityId":{"type":"integer"},"entityType":{"type":"string","enum":["deal","task","contact","dealComment","taskComment","contactComment"]}}}}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/EntityAttachment"}}}}}}}}}},"\/attachments\/{attachmentId}":{"put":{"tags":["Attachments"],"summary":"Update file attachment","description":"First, the file must be uploaded to the file manager, and then the file can be attached.","parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"$ref":"#\/components\/requestBodies\/AttachmentUpdateBody"},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/EntityAttachment"}}}}}}}},"delete":{"tags":["Attachments"],"summary":"Delete file attachment","parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully detached"}}}},"\/companies\/short-data":{"post":{"tags":["Company"],"summary":"Get companies short data","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"companyName":{"type":"string"},"companyIds":{"type":"array"},"email":{"type":"string"},"phone":{"type":"string"},"responsibleId":{"type":"array"},"messengerLogin":{"type":"string"},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer"},"withoutContacts":{"type":"boolean"},"searchString":{"type":"string","description":"If you pass a search string, all other filters will be ignored."},"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"expression":{"type":"string"}}}},"sortBy":{"type":"object","properties":{"attributeId":{"type":"integer"},"fieldName":{"type":"string","enum":["name","address","annualBusinessVolume","createdAt"]},"direction":{"type":"string","enum":["asc","desc"]}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/CompanySortData"}},"metadata":{"type":"object","properties":{"total":{"type":"integer"}}}}}}}}}}},"\/companies\/list":{"post":{"tags":["Company"],"summary":"Get companies","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"companyName":{"type":"string"},"companyIds":{"type":"array"},"email":{"type":"string"},"phone":{"type":"string"},"responsibleId":{"type":"array"},"messengerLogin":{"type":"string"},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer"},"withoutContacts":{"type":"boolean"},"searchString":{"type":"string","description":"If you pass a search string, all other filters will be ignored."},"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"expression":{"type":"string"}}}},"sortBy":{"type":"object","properties":{"attributeId":{"type":"integer"},"fieldName":{"type":"string","enum":["name","address","annualBusinessVolume","createdAt"]},"direction":{"type":"string","enum":["asc","desc"]}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/CompanySortData"}},"metadata":{"type":"object","properties":{"total":{"type":"integer"}}}}}}}}}}},"\/companies":{"post":{"tags":["Company"],"summary":"Create company","requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"companyName":{"type":"string","minimum":1,"maximum":100},"responsibleId":{"type":"integer","description":"If you do not send the responsible ID, the system will automatically identify the responsible person."},"address":{"type":"string"},"annualBusinessVolume":{"type":"integer"},"currency":{"type":"string","description":"The parameter is required if you send a annualBusinessVolume parameter"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Company"}}}}}}}}},"\/companies\/{companyId}":{"get":{"tags":["Company"],"summary":"Get company by id","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Company"}}}}}}}},"put":{"tags":["Company"],"summary":"Update company","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"companyName":{"type":"string","minimum":1,"maximum":100},"responsibleId":{"type":"integer"},"annualBusinessVolume":{"type":"integer"},"currency":{"type":"string"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Company"}}}}}}}},"delete":{"tags":["Company"],"summary":"Delete company","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/companies\/{companyId}\/history":{"get":{"tags":["Company history"],"summary":"get Company history","parameters":[{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","format":"date-time","example":1730463132}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","format":"date-time","example":1730463132}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/History"}},"metadata":{"type":"object","properties":{"total":{"type":"integer"}}}}}}}}}}},"\/companies\/attributes":{"get":{"tags":["Company Attributes"],"summary":"Get company attributes list","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Attribute"}}}}}}}},"post":{"tags":["Company Attributes"],"summary":"Create a company attribute","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"type":{"type":"integer","description":"0 = Text, 1 = Number, 2 = Date, 3 = Link, 4 = Select, 5 = MultiSelect"},"mandatory":{"type":"boolean"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Attribute"}}}}}}}}},"\/companies\/attributes\/{attribute}":{"put":{"tags":["Company Attributes"],"summary":"Update a company attribute","parameters":[{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"status":{"type":"integer","description":"0 = Inactive, 1 = Active, 2 = Hidden"},"type":{"type":"integer","description":"0 = Text, 1 = Number, 2 = Date, 3 = Link, 4 = Select, 5 = MultiSelect"},"mandatory":{"type":"boolean"},"order":{"type":"integer"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"required":["name","order"]}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Attribute"}}}}}}}},"delete":{"tags":["Company Attributes"],"summary":"Delete a company attribute","parameters":[{"name":"attributeId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/companies\/{companyId}\/emails":{"get":{"tags":["Emails"],"summary":"Get emails","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Email"}},"metadata":{"type":"object","properties":{"total":{"type":"integer"}}}}}}}}}},"post":{"tags":["Emails"],"summary":"Create email","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"isMain":{"type":"boolean"},"email":{"type":"string"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Email"}}}}}}}}},"\/companies\/{companyId}\/emails\/batch":{"post":{"tags":["Emails"],"summary":"Batch create email","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","minLength":1,"maxLength":50},"isMain":{"type":"boolean"}}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Email"}}}}}}}}}},"\/companies\/{companyId}\/emails\/{emailId}":{"put":{"tags":["Emails"],"summary":"Update email","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"emailId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"isMain":{"type":"boolean"},"email":{"type":"string"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Messenger"}}}}}}}},"delete":{"tags":["Emails"],"summary":"Delete email","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"emailId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/companies\/{companyId}\/phones":{"get":{"tags":["Phones"],"summary":"Get phones","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Phone"}},"metadata":{"type":"object","properties":{"total":{"type":"integer"}}}}}}}}}},"post":{"tags":["Phones"],"summary":"Create phone","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"typeId":{"type":"integer"},"login":{"type":"string"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Phone"}}}}}}}}},"\/companies\/{companyId}\/phones\/batch":{"post":{"tags":["Phones"],"summary":"Batch create phone","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","minLength":1,"maxLength":50},"isMain":{"type":"boolean"}}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Phone"}}}}}}}}}},"\/companies\/{companyId}\/phones\/{phoneId}":{"put":{"tags":["Phones"],"summary":"Update phone","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"phoneId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"isMain":{"type":"boolean"},"phone":{"type":"string"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Phone"}}}}}}}},"delete":{"tags":["Phones"],"summary":"Delete phone","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"phoneId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/companies\/{companyId}\/messengers":{"get":{"tags":["messengers"],"summary":"Get messengers","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Messenger"}},"metadata":{"type":"object","properties":{"total":{"type":"integer"}}}}}}}}}},"post":{"tags":["messengers"],"summary":"Create messenger","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"typeId":{"type":"integer"},"login":{"type":"string"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Messenger"}}}}}}}}},"\/companies\/{companyId}\/messengers\/batch":{"post":{"tags":["messengers"],"summary":"Batch create messenger","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"messengers":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"integer"},"login":{"type":"string"},"botId":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Messenger"}}}}}}}}}},"\/companies\/{companyId}\/messengers\/{messengerId}":{"put":{"tags":["messengers"],"summary":"Update messenger","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"messengerId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"typeId":{"type":"integer"},"login":{"type":"string"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Messenger"}}}}}}}},"delete":{"tags":["messengers"],"summary":"Delete messenger","parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string","enum":["company"]}},{"name":"entityId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"messengerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Successfully deleted"}}}},"\/deals\/{dealId}\/history":{"get":{"tags":["Deal history"],"summary":"Deal history","description":"Get deal history by ID within a date range.","parameters":[{"name":"dealId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"fromDate","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2024-12-12 12:12:12"}},{"name":"toDate","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2024-12-12 12:12:12"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/DealHistory"}}}}}}}}},"\/contacts\/{contactId}\/history":{"get":{"tags":["Contact history"],"summary":"Contact history","description":"Get contact history by ID within a date range.","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"fromDate","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2024-12-12 12:12:12"}},{"name":"toDate","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2024-12-12 12:12:12"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/ContactHistory"}}}}}}}},"\/tasks\/{taskId}\/history":{"get":{"tags":["Task history"],"summary":"Get task history","description":"Get task history by ID within a date range.","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"fromDate","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2024-12-12 12:12:12"}},{"name":"toDate","in":"query","required":true,"schema":{"type":"string","format":"date-time","example":"2024-12-12 12:12:12"}}],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TaskHistory"}}}}}}}}}},"\/products\/all":{"post":{"tags":["ECommerce Product"],"summary":"Get products by filter","requestBody":{"content":{"application\/json":{"schema":{"properties":{"categoryId":{"type":"number","description":"Category ID to filter products."},"dateFrom":{"type":"string","description":"Start date for filtering (format: YYYY-MM-DD)."},"dateTo":{"type":"string","description":"End date for filtering (format: YYYY-MM-DD)."},"search":{"type":"string","description":"Text search by product name or code."},"balance":{"type":"object","description":"Filter by product stock balance and unit type.","properties":{"expression":{"type":"string","enum":["=",">=","<="],"description":"Comparison operator for balance."},"type":{"type":"number","enum":[1,2,3,4,5,6,7],"description":"Unit type of the product balance."},"value":{"type":"number","description":"Stock quantity value to compare."}}},"description":{"type":"string","description":"Description for products"},"purchases":{"type":"object","description":"Filter by number of purchases.","properties":{"expression":{"type":"string","enum":["=",">=","<="],"description":"Comparison operator for purchases."},"value":{"type":"number","description":"Number of purchases to compare."}}},"price":{"type":"object","description":"Filter by product price or old price.","properties":{"expression":{"type":"string","enum":["=",">=","<="],"description":"Comparison operator for price."},"currency":{"type":"string","description":"Currency of the price (e.g., USD, EUR)."},"value":{"type":"number","description":"Current price value."},"oldValue":{"type":"number","description":"Previous price value."}}},"visible":{"type":"number","enum":[0,1],"description":"Product visibility status (0 = hidden, 1 = visible)."},"typeProduct":{"type":"number","enum":[1,2],"description":"Product type (1 = physical, 2 = digital\/service)."},"limit":{"type":"number","description":"Maximum number of results to return."},"offset":{"type":"number","description":"Offset for pagination."},"orderBy":{"type":"object","description":"Sorting options.","properties":{"fieldName":{"type":"string","enum":["id","balance","price"],"description":"Field to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sorting direction (asc or desc)."}}},"sections":{"type":"array","description":"Filter by section-specific key-value attributes.","items":{"properties":{"key":{"type":"string","example":"new","description":"Section attribute key (e.g., color)."},"value":{"type":"string","example":"york","description":"Section attribute value (e.g., red)."}}}},"categoryIds":{"type":"array","description":"List of category IDs to include in filter.","items":{"type":"number"}}}}}}},"responses":{"200":{"description":"Successful response containing product data.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Product data result.","properties":{"id":{"type":"integer","description":"Product ID."},"name":{"type":"string","description":"Product name."},"userId":{"type":"integer","description":"Owner user ID."},"images":{"type":"array","items":{"type":"string"},"default":["url1","url2"],"description":"List of product image URLs."},"vendorCode":{"type":"string","description":"Product vendor or article code."},"type":{"type":"number","description":"Product internal type code."},"categoryId":{"type":"number","description":"Product category ID."},"visible":{"type":"boolean","description":"Visibility flag (true = visible)."},"balance":{"type":"object","description":"Product stock info.","properties":{"type":{"type":"number","description":"Stock unit type (same as input)."},"value":{"type":"number","description":"Stock quantity."}}},"price":{"type":"object","description":"Product pricing info.","properties":{"id":{"type":"number","description":"Price record ID."},"currency":{"type":"string","description":"Currency code (e.g., USD)."},"value":{"type":"number","description":"Current price value."},"oldValue":{"type":"number","description":"Previous price value."}}},"countSales":{"type":"number","description":"Total number of product sales."},"createdAt":{"type":"string","description":"Product creation datetime."},"typeProduct":{"type":"number","enum":[1,2],"description":"Product type (1 = physical, 2 = digital\/service)."}}}}}}}}}}},"\/products\/categories\/{categoryId}\/{productId}":{"get":{"tags":["ECommerce Product"],"summary":"Get products by id","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"}},{"name":"categoryId","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"shortDescription":{"type":"string"},"images":{"type":"array","default":["url1","url2"]},"vendorCode":{"type":"string"},"categoryId":{"type":"number"},"balance":{"type":"object","properties":{"type":{"type":"number"},"value":{"type":"number"}}},"availability":{"type":"number"},"visible":{"type":"number"},"userId":{"type":"number"},"seo":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"keys":{"type":"string"}}},"prices":{"type":"array","items":{"properties":{"id":{"type":"number"},"currency":{"type":"string"},"value":{"type":"number"},"oldValue":{"type":"number"},"isDefault":{"type":"boolean"},"productId":{"type":"number"}}}},"sections":{"type":"array","items":{"properties":{"id":{"type":"number"},"name":{"type":"string"},"productId":{"type":"number"},"values":{"type":"array","items":{"properties":{"id":{"type":"number"},"sectionId":{"type":"number"},"key":{"type":"string"},"value":{"type":"string"}}}}}}},"categorySections":{"type":"array","items":{"properties":{"id":{"type":"number"},"name":{"type":"string"},"categoryId":{"type":"number"},"values":{"type":"array","items":{"properties":{"id":{"type":"number"},"sectionId":{"type":"number"},"key":{"type":"string"},"value":{"type":"string"}}}}}}}}}}}}}}}}},"\/products\/deals":{"post":{"tags":["ECommerce Product"],"summary":"Add product to deal","requestBody":{"content":{"application\/json":{"schema":{"properties":{"productId":{"type":"number"},"dealId":{"type":"number"},"productPriceISO":{"type":"string","default":"UAH"},"productPriceValue":{"type":"number"},"quantity":{"type":"number"},"allow_out_of_stock":{"type":"boolean","description":"When true the product is attached even if stock is zero and inventory is not decremented"}}}}}},"responses":{"200":{"description":"OK"}}}},"\/products\/deals\/{dealId}":{"get":{"tags":["ECommerce Product"],"summary":"Get products by deal id","parameters":[{"name":"dealId","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"totalAmount":{"type":"integer"},"currency":{"type":"string"},"items":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"images":{"type":"array","default":["url1","url2"]},"vendorCode":{"type":"string"},"extra":{"type":"object","properties":{"quantity":{"type":"number"},"amount":{"type":"number"},"currency":{"type":"string"},"totalAmount":{"type":"number"},"outOfStock":{"type":"boolean"}}}}}}}}}}}}}}}},"\/products\/deals\/{headId}":{"put":{"tags":["ECommerce Product"],"summary":"Update quantity or amount products in deal","parameters":[{"name":"headId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"quantity":{"type":"integer","description":"Product quantity in the deal"},"amount":{"type":"integer","description":"Product amount in the deal"}}}}}},"responses":{"200":{"description":"OK"}}}},"\/products\/contacts\/{contactId}\/deals":{"get":{"tags":["ECommerce Product"],"summary":"Get products by contact id","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"totalAmount":{"type":"integer"},"currency":{"type":"string"},"items":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"images":{"type":"array","default":["url1","url2"]},"vendorCode":{"type":"string"},"extra":{"type":"object","properties":{"quantity":{"type":"number"},"amount":{"type":"number"},"currency":{"type":"string"},"totalAmount":{"type":"number"},"outOfStock":{"type":"boolean"}}}}}}}}}}}}}}}},"\/products\/categories\/{categoryId}\/{productId}\/deals\/{headId}":{"delete":{"tags":["ECommerce Product"],"summary":"Detach products from deal","parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"number"}},{"name":"productId","in":"path","required":true,"schema":{"type":"number"}},{"name":"headId","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"OK"}}}},"\/products\/{productId}":{"get":{"tags":["ECommerce Product"],"summary":"Get products by id","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"shortDescription":{"type":"string"},"images":{"type":"array","default":["url1","url2"]},"vendorCode":{"type":"string"},"type":{"type":"number"},"categoryId":{"type":"number"},"balance":{"type":"object","properties":{"type":{"type":"number"},"value":{"type":"number"}}},"availability":{"type":"number"},"visible":{"type":"number"},"userId":{"type":"number"},"seo":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"keys":{"type":"string"}}},"prices":{"type":"array","items":{"properties":{"id":{"type":"number"},"currency":{"type":"string"},"value":{"type":"number"},"oldValue":{"type":"number"},"isDefault":{"type":"boolean"},"productId":{"type":"number"}}}},"sections":{"type":"array","items":{"properties":{"id":{"type":"number"},"name":{"type":"string"},"productId":{"type":"number"},"values":{"type":"array","items":{"properties":{"id":{"type":"number"},"sectionId":{"type":"number"},"key":{"type":"string"},"value":{"type":"string"}}}}}}},"categorySections":{"type":"array","items":{"properties":{"id":{"type":"number"},"name":{"type":"string"},"categoryId":{"type":"number"},"values":{"type":"array","items":{"properties":{"id":{"type":"number"},"sectionId":{"type":"number"},"key":{"type":"string"},"value":{"type":"string"}}}}}}},"dimensions":{"type":"object","nullable":true,"properties":{"weight":{"type":"object","nullable":true,"properties":{"value":{"type":"string","nullable":true,"example":"500.00"},"unit":{"type":"string","nullable":true,"enum":["g","kg"],"example":"g"}}},"length":{"type":"string","nullable":true,"example":"20.00"},"width":{"type":"string","nullable":true,"example":"15.00"},"height":{"type":"string","nullable":true,"example":"10.00"}}}}}}}}}}}},"put":{"tags":["ECommerce Product"],"summary":"Update product by id","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"},"description":"ID of the product to update"}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Product name"},"description":{"type":"string","description":"Full product description"},"shortDescription":{"type":"string","description":"Short product summary"},"images":{"type":"array","default":["url1","url2"],"description":"Array of product image URLs"},"vendorCode":{"type":"string","description":"Vendor or manufacturer code"},"categoryId":{"type":"number","description":"Category ID the product belongs to"},"balance":{"type":"object","description":"Stock balance information","properties":{"type":{"type":"number","description":"Balance type (e.g. available, reserved)"},"value":{"type":"number","description":"Balance quantity"}}},"availability":{"type":"number","description":"Product availability status"},"visible":{"type":"number","description":"Visibility flag (0 - hidden, 1 - visible)"},"seo":{"type":"object","description":"SEO-related metadata","properties":{"name":{"type":"string","description":"SEO title"},"description":{"type":"string","description":"SEO description"},"keys":{"type":"string","description":"SEO keywords"}}},"digitalInfo":{"type":"object","description":"Digital product details","properties":{"productLink":{"type":"string","description":"Direct link to digital product"},"productLinkPreview":{"type":"string","description":"Link to preview of digital product"},"isProductLinkExternal":{"type":"boolean","description":"Is product link external"},"isProductLinkPreviewExternal":{"type":"boolean","description":"Is preview link external"}}},"dimensions":{"type":"object","nullable":true,"description":"Physical dimensions of the product","properties":{"weight":{"type":"object","nullable":true,"properties":{"value":{"type":"string","nullable":true,"example":"500.00"},"unit":{"type":"string","nullable":true,"enum":["g","kg"],"example":"g"}}},"length":{"type":"string","nullable":true,"example":"20.00"},"width":{"type":"string","nullable":true,"example":"15.00"},"height":{"type":"string","nullable":true,"example":"10.00"}}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer","description":"Product ID"},"name":{"type":"string","description":"Product name"},"description":{"type":"string","description":"Full product description"},"shortDescription":{"type":"string","description":"Short product summary"},"images":{"type":"array","default":["url1","url2"],"description":"Array of product image URLs"},"vendorCode":{"type":"string","description":"Vendor or manufacturer code"},"type":{"type":"number","description":"Product type"},"categoryId":{"type":"number","description":"Category ID"},"balance":{"type":"object","description":"Stock balance info","properties":{"type":{"type":"number","description":"Balance type"},"value":{"type":"number","description":"Balance value"}}},"availability":{"type":"number","description":"Availability status"},"visible":{"type":"number","description":"Visibility flag"},"userId":{"type":"number","description":"ID of the user who owns or created the product"},"seo":{"type":"object","description":"SEO metadata","properties":{"name":{"type":"string","description":"SEO title"},"description":{"type":"string","description":"SEO description"},"keys":{"type":"string","description":"SEO keywords"}}},"prices":{"type":"array","items":{"properties":{"id":{"type":"number","description":"Price ID"},"currency":{"type":"string","description":"Currency code"},"value":{"type":"number","description":"Current price"},"oldValue":{"type":"number","description":"Old price (before discount)"},"isDefault":{"type":"boolean","description":"Flag indicating default price"},"productId":{"type":"number","description":"Associated product ID"}}}},"sections":{"type":"array","items":{"properties":{"id":{"type":"number","description":"Section ID"},"name":{"type":"string","description":"Section name"},"productId":{"type":"number","description":"Related product ID"},"status":{"type":"number","description":"Section status"},"values":{"type":"array","items":{"properties":{"id":{"type":"number","description":"Value ID"},"sectionId":{"type":"number","description":"Section ID this value belongs to"},"key":{"type":"string","description":"Parameter key"},"value":{"type":"string","description":"Parameter value"},"status":{"type":"number","description":"Status of the parameter"}}}}}}},"digitalInfo":{"type":"object","description":"Digital product info","properties":{"productLink":{"type":"string","description":"Digital product link"},"productLinkPreview":{"type":"string","description":"Preview link for digital product"},"isProductLinkExternal":{"type":"boolean","description":"Is digital product link external"},"isProductLinkPreviewExternal":{"type":"boolean","description":"Is preview link external"}}},"dimensions":{"type":"object","nullable":true,"description":"Physical dimensions of the product","properties":{"weight":{"type":"object","nullable":true,"properties":{"value":{"type":"string","nullable":true,"example":"500.00"},"unit":{"type":"string","nullable":true,"enum":["g","kg"],"example":"g"}}},"length":{"type":"string","nullable":true,"example":"20.00"},"width":{"type":"string","nullable":true,"example":"15.00"},"height":{"type":"string","nullable":true,"example":"10.00"}}}}}}}}}}}},"delete":{"tags":["ECommerce Product"],"summary":"Delete product by id","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"},"description":"ID of the product to delete"}],"responses":{"204":{"description":"OK"}}}},"\/products\/categories\/{categoryId}":{"put":{"tags":["ECommerce Product"],"summary":"Update users category by id","parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"parentId":{"type":"number"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"userId":{"type":"integer"},"parentId":{"type":"integer"}}}}}}}}}},"delete":{"tags":["ECommerce Product"],"summary":"Delete users category by id","parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"204":{"description":"OK"}}}},"\/contacts\/external\/{externalContactId}":{"get":{"tags":["Contacts"],"summary":"Get contact exists by external contact Id","parameters":[{"name":"externalContactId","in":"path","required":true,"description":"External contact id from another source system","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"data":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}}}}},"\/products\/categories":{"get":{"tags":["ECommerce Product"],"summary":"Get users categories","responses":{"200":{"description":"List of user categories in a nested tree structure","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"tree":{"type":"array","description":"Hierarchical structure of categories","items":{"properties":{"id":{"type":"integer","description":"Category ID"},"name":{"type":"string","description":"Category name"},"parent_id":{"type":"integer","description":"ID of the parent category"},"depth":{"type":"integer","description":"Level of category in the tree"},"path":{"type":"integer","description":"Encoded tree path or identifier"},"children":{"type":"array","description":"List of subcategories","items":{"properties":{"id":{"type":"integer","description":"Category ID"},"name":{"type":"string","description":"Category name"},"parent_id":{"type":"integer","description":"ID of the parent category"},"depth":{"type":"integer","description":"Level of category in the tree"},"path":{"type":"integer","description":"Encoded tree path or identifier"},"children":{"type":"array","description":"Nested children categories"}}}}}}},"count":{"type":"integer","description":"Total number of categories"}}}}}}}}}}},"post":{"tags":["ECommerce Product"],"summary":"Store users categories","requestBody":{"content":{"application\/json":{"schema":{"properties":{"parentId":{"type":"number","description":"ID of parent category. Null for root."},"name":{"type":"string","description":"Name of the category"},"sections":{"type":"array","description":"Sections belonging to the category","items":{"properties":{"name":{"type":"string","description":"Section name"},"status":{"type":"integer","description":"Section status (e.g., 1 - active)"},"values":{"type":"array","description":"List of values for the section","items":{"properties":{"key":{"type":"string","description":"Attribute key"},"value":{"type":"string","description":"Attribute value"},"status":{"type":"integer","description":"Status of the attribute value"}}}}}}}}}}}},"responses":{"201":{"description":"Category successfully created","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer","description":"Newly created category ID"},"name":{"type":"string","description":"Name of the created category"},"userId":{"type":"integer","description":"ID of the user who created the category"},"parentId":{"type":"integer","description":"ID of the parent category"}}}}}}}}}}},"\/products\/{productId}\/prices":{"put":{"tags":["ECommerce Product"],"summary":"Update price in product","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"},"description":"ID of the product to update prices for"}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"prices":{"type":"array","description":"List of prices for the product","items":{"properties":{"id":{"type":"number","description":"ID of the price record"},"currency":{"type":"string","description":"Currency code (e.g., USD, EUR)"},"value":{"type":"number","description":"Current price value"},"oldValue":{"type":"number","description":"Previous price value"},"isDefault":{"type":"boolean","description":"Whether this price is the default one"}}}}}}}}},"responses":{"200":{"description":"Prices successfully updated"}}}},"\/products\/{productId}\/sections":{"post":{"tags":["ECommerce Product"],"summary":"Update section in product","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"},"description":"ID of the product to update sections for"}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"sections":{"type":"array","description":"List of sections to update","items":{"properties":{"id":{"type":"number","description":"ID of the section"},"name":{"type":"string","description":"Section name"},"status":{"type":"number","description":"Section status (e.g., 1 - active)"},"values":{"type":"array","description":"Attributes or values inside the section","items":{"properties":{"id":{"type":"number","description":"ID of the value"},"key":{"type":"string","description":"Name of the attribute"},"value":{"type":"string","description":"Value of the attribute"},"status":{"type":"number","description":"Status of the attribute value"}}}}}}}}}}}},"responses":{"201":{"description":"Sections successfully created"}}},"put":{"tags":["ECommerce Product"],"summary":"Update section in product","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"number"},"description":"ID of the product to update sections for"}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"sections":{"type":"array","description":"List of sections to update","items":{"properties":{"id":{"type":"number","description":"ID of the section"},"name":{"type":"string","description":"Section name"},"status":{"type":"number","description":"Section status (e.g., 1 - active)"},"values":{"type":"array","description":"Attributes or values inside the section","items":{"properties":{"id":{"type":"number","description":"ID of the value"},"key":{"type":"string","description":"Name of the attribute"},"value":{"type":"string","description":"Value of the attribute"},"status":{"type":"number","description":"Status of the attribute value"}}}}}}}}}}}},"responses":{"200":{"description":"Sections successfully updated"}}}},"\/products\/{productId}\/sections\/{sectionId}":{"delete":{"tags":["ECommerce Product"],"summary":"Delete products section","parameters":[{"name":"productId","in":"path","required":true,"description":"ID of the product to delete sections from","schema":{"type":"number"}},{"name":"sectionId","in":"path","required":true,"schema":{"type":"number"},"description":"ID of the section to delete"}],"responses":{"204":{"description":"OK"}}}},"\/contacts\/messenger-external\/{messengerContactId}":{"get":{"tags":["Contacts"],"summary":"Get contact by messenger contact id","parameters":[{"name":"messengerContactId","in":"path","required":true,"description":"External contact id from messenger","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"data":{"$ref":"#\/components\/schemas\/Contact"}}}}}}}}}}},"\/contacts\/{contactId}\/relation\/{companyId}":{"post":{"tags":["Contacts"],"summary":"Add contact to a company","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID you want to add to the company. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"companyId","in":"path","required":true,"description":"Company ID you want to add to the contact. It can be obtained with the \"Get a list of company\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"Contact successfully added to a company"}}},"delete":{"tags":["Contacts"],"summary":"Delete a contact from the company","parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact ID you want to delete from the company. It can be obtained with the \"Get a list of contacts\" method","schema":{"type":"integer"}},{"name":"companyId","in":"path","required":true,"description":"Company ID you want to delete from the contact. It can be obtained with the \"Get a list of company\" method","schema":{"type":"integer"}}],"responses":{"200":{"description":"Contact successfully deleted from the company"}}}},"\/manager-settings\/sections":{"get":{"tags":["ManagerSettings"],"summary":"Get all sections","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/ManagerSettings"}}}}}}}}}},"\/manager-settings\/managers":{"get":{"tags":["ManagerSettings"],"summary":"Get all managers","responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/ManagerSettings"}}}}}}}}}},"\/manager-settings":{"post":{"tags":["ManagerSettings"],"summary":"Create managers from category","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"integer"},"responsibleIds":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ManagerSettings"}}}}}}}}},"\/manager-settings\/{settingId}":{"put":{"tags":["ManagerSettings"],"summary":"Update managers from category","parameters":[{"name":"settingId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"integer"},"responsibleIds":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/ManagerSettings"}}}}}}}},"delete":{"tags":["ManagerSettings"],"summary":"Delete managers from category","parameters":[{"name":"settingId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"responsibleIds":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"204":{"description":"Successfully deleted"}}}},"\/manager-settings\/{sectionId}":{"get":{"tags":["ManagerSettings"],"summary":"Get managers by section","parameters":[{"name":"sectionId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"items":{"$ref":"#\/components\/schemas\/ManagerSettings"}}}}}}}}}},"\/custom-tab":{"get":{"tags":["Custom Tab"],"summary":"Get all users custom tabs","responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"type":"object","properties":{"contact":{"type":"array","items":{"$ref":"#\/components\/schemas\/CustomTabWithAttribute"}},"pipeline":{"type":"array","items":{"$ref":"#\/components\/schemas\/CustomTabWithAttribute"}},"board":{"type":"array","items":{"$ref":"#\/components\/schemas\/CustomTabWithAttribute"}},"company":{"type":"array","items":{"$ref":"#\/components\/schemas\/CustomTabWithAttribute"}}}}}}}}},"post":{"tags":["Custom Tab"],"summary":"Create custom tab","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of custom tab"},"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - company"},"entityId":{"type":"integer","description":"Related entity ID. Only for pipelines and boards"}}}}}},"responses":{"201":{"description":"created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CustomTab"}}}}}}},"\/custom-tab\/{customTabId}":{"put":{"tags":["Custom Tab"],"summary":"Update custom tabs","parameters":[{"name":"customTabId","in":"path","required":true,"schema":{"type":"number"},"description":"Custom tab ID"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"order":{"type":"integer","description":"Custom tab order"},"name":{"type":"string","description":"Custom tab name"},"isVisible":{"type":"boolean","description":"Indicates whether the entity is visible to users"},"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - company"},"entityId":{"type":"integer","description":"Related entity ID. Only for pipelines and boards"}}}}}},"responses":{"200":{"description":"Ok","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CustomTab"}}}}}},"delete":{"tags":["Custom Tab"],"summary":"Delete custom tabs","parameters":[{"name":"customTabId","in":"path","required":true,"schema":{"type":"number"},"description":"Custom tab ID"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - company"},"entityId":{"type":"integer","description":"Related entity ID. Only for pipelines and boards"}}}}}},"responses":{"204":{"description":"deleted"}}}},"\/custom-tab\/{customTabId}\/relation":{"post":{"tags":["Custom Tab"],"summary":"Add new relation with attribute","parameters":[{"name":"customTabId","in":"path","required":true,"schema":{"type":"number"},"description":"Custom tab ID"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - company"},"entityId":{"type":"integer","description":"Related entity ID. Only for pipelines and boards"},"entityIds":{"type":"array","items":{"type":"integer"},"description":"Related attributes IDs."}}}}}},"responses":{"200":{"description":"OK"}}},"delete":{"tags":["Custom Tab"],"summary":"Delete relation with attribute","parameters":[{"name":"customTabId","in":"path","required":true,"schema":{"type":"number"},"description":"Custom tab ID"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - company"},"entityId":{"type":"integer","description":"Related entity ID. Only for pipelines and boards"},"entityIds":{"type":"array","items":{"type":"integer"},"description":"Related attributes IDs."}}}}}},"responses":{"200":{"description":"OK"}}}},"\/products":{"post":{"tags":["ECommerce Product"],"summary":"Create a new product","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","description":"Product name. Max length 255"},"description":{"type":"string","description":"Product description. Max length 10000"},"shortDescription":{"type":"string","description":"Product short description. Max length 10000"},"images":{"type":"array","default":["url1","url2"],"description":"Product images. Path from File manager service"},"vendorCode":{"type":"string","description":"Product vendor code. Max length 255"},"type":{"type":"number","default":1,"description":"Product type . 1 - product, 2 - service, 3 - subscription (expected soon)"},"productType":{"type":"number","default":1,"enum":[1,2,3],"description":"Product type. 1 - physical, 2 - digital"},"categoryId":{"type":"number","description":"Category ID. It can be obtained with the \"Get users categories\" method"},"balance":{"type":"object","properties":{"type":{"type":"number","description":"Product balance type. 1 - piece, 2 - service, 3 - meter, 4 - set, 5 - liter, 6 - kilogram, 7 - package"},"value":{"type":"number","description":"Product balance value. Max 11 digits"},"oldValue":{"type":"number","description":"Product balance value. Max 11 digits"}},"description":"Product balance."},"availability":{"type":"number","enum":[1,2,3],"description":"Product availability. 1 - available, 2 - unavailable, 3 - expecting"},"visible":{"type":"number","enum":[0,1],"description":"Product visibility. 0 - not visible, 1 - visible"},"digitalInfo":{"type":"object","properties":{"productLink":{"type":"string","description":"Product link. Max length 255. Path from File manager service"},"productLinkPreview":{"type":"string","description":"Product link preview. Max length 255. Path from File manager service"},"isProductLinkExternal":{"type":"boolean","description":"Flag which indicates whether the product link is external."},"isProductLinkPreviewExternal":{"type":"boolean","description":"Flag which indicates whether the product link preview is external."}},"description":"Product digital info."},"dimensions":{"type":"object","nullable":true,"description":"Physical dimensions of the product.","properties":{"weight":{"type":"object","nullable":true,"properties":{"value":{"type":"string","nullable":true,"example":"500.00"},"unit":{"type":"string","nullable":true,"enum":["g","kg"],"example":"g"}}},"length":{"type":"string","nullable":true,"example":"20.00"},"width":{"type":"string","nullable":true,"example":"15.00"},"height":{"type":"string","nullable":true,"example":"10.00"}}},"seo":{"type":"object","properties":{"name":{"type":"string","description":"Product name. Max length 255"},"description":{"type":"string","description":"Product description. Max length 255"},"keys":{"type":"string","description":"Product keys. Max length 255"}},"description":"Product SEO info."},"prices":{"type":"array","items":{"properties":{"currency":{"type":"string","description":"Product currency. Max length 3. ISO CODE"},"value":{"type":"number","description":"Product price. Between 0.01,999999999.99"},"oldValue":{"type":"number","description":"Product old price. Between 0.01,999999999.99"},"isDefault":{"type":"boolean","description":"Flag which indicates whether the product price is default."}}}},"sections":{"type":"array","items":{"properties":{"name":{"type":"string","description":"Product section name. Max length 255"},"status":{"type":"number","description":"Product section status. 1 - active, 0 - inactive"},"values":{"type":"array","items":{"properties":{"key":{"type":"string","description":"Product section key. Max length 255"},"value":{"type":"string","description":"Product section value. Max length 2000"},"status":{"type":"number","description":"Product section value status. 1 - active, 0 - inactive"}}},"description":"Product section values."}}},"description":"Product sections."}}}}}},"responses":{"201":{"description":"","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"shortDescription":{"type":"string"},"images":{"type":"array","default":["url1","url2"]},"vendorCode":{"type":"string"},"type":{"type":"number"},"categoryId":{"type":"number"},"balance":{"type":"object","properties":{"type":{"type":"number"},"value":{"type":"number"}}},"availability":{"type":"number"},"visible":{"type":"number"},"userId":{"type":"number"},"productType":{"type":"number","default":1,"enum":[1,2]},"seo":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"keys":{"type":"string"}}},"prices":{"type":"array","items":{"properties":{"id":{"type":"number"},"currency":{"type":"string"},"value":{"type":"number"},"oldValue":{"type":"number"},"isDefault":{"type":"boolean"},"productId":{"type":"number"}}}},"sections":{"type":"array","items":{"properties":{"id":{"type":"number"},"name":{"type":"string"},"productId":{"type":"number"},"status":{"type":"number"},"values":{"type":"array","items":{"properties":{"id":{"type":"number"},"sectionId":{"type":"number"},"key":{"type":"string"},"value":{"type":"string"},"status":{"type":"number"}}}}}}},"digitalInfo":{"type":"object","properties":{"productLink":{"type":"string"},"productLinkPreview":{"type":"string"},"isProductLinkExternal":{"type":"boolean"},"isProductLinkPreviewExternal":{"type":"boolean"}}},"dimensions":{"type":"object","nullable":true,"properties":{"weight":{"type":"object","nullable":true,"properties":{"value":{"type":"string","nullable":true,"example":"500.00"},"unit":{"type":"string","nullable":true,"enum":["g","kg"],"example":"g"}}},"length":{"type":"string","nullable":true,"example":"20.00"},"width":{"type":"string","nullable":true,"example":"15.00"},"height":{"type":"string","nullable":true,"example":"10.00"}}}}}}}}}}}}},"\/payments":{"post":{"tags":["Payments"],"summary":"Create  payment","description":"Create new manual payment.","requestBody":{"content":{"application\/json":{"schema":{"properties":{"dealId":{"type":"integer","description":"Deal ID for which you need to create payment."},"contactId":{"type":"integer","description":"Contact ID for which you need to create payment."},"description":{"type":"string"},"price":{"type":"integer","description":"Payment amount"},"currency":{"type":"string","description":"Payment currency"}}}}}},"responses":{"201":{"description":"created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Payment"}}}}}}},"\/payments\/{paymentId}\/approve":{"post":{"tags":["Payments"],"summary":"Approve manual payment.","description":"Set approval status for manually created payment","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"number"},"description":"The unique identifier of the manually created payment to approve"}],"responses":{"200":{"description":"Payment successfully approved"}}}},"\/payments\/{paymentId}\/cancel":{"post":{"tags":["Payments"],"summary":"Cancel manual payment","description":"Set payment status to canceled for manually created payment.","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"number"},"description":"The unique identifier of the payment to cancel"}],"responses":{"200":{"description":"Payment successfully canceled"}}}}},"components":{"schemas":{"CommentCompany":{"type":"object","properties":{"id":{"type":"integer"},"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CompanySortData":{"type":"object","properties":{"id":{"type":"integer"},"companyName":{"type":"string"},"responsibleId":{"type":"integer"},"address":{"type":"string"},"annualBusinessVolume":{"type":"integer"},"currency":{"type":"string"}}},"Company":{"type":"object","properties":{"id":{"type":"integer"},"companyName":{"type":"string"},"responsibleId":{"type":"integer"},"address":{"type":"string"},"annualBusinessVolume":{"type":"integer"},"currency":{"type":"string"},"messengers":{"type":"array","items":{"$ref":"#\/components\/schemas\/Messenger"}},"phones":{"type":"array","items":{"$ref":"#\/components\/schemas\/Phone"}},"emails":{"type":"array","items":{"$ref":"#\/components\/schemas\/Email"}},"attributes":{"type":"array","items":{"$ref":"#\/components\/schemas\/Attribute"}},"contacts":{"type":"array"},"attachments":{"type":"array","items":{"$ref":"#\/components\/schemas\/AttachmentResource"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"History":{"type":"object","properties":{"eventType":{"type":"string"},"eventData":{"type":"array"},"date":{"type":"string"}}},"Email":{"type":"object","properties":{"id":{"type":"integer"},"isMain":{"type":"boolean"},"email":{"type":"string"}}},"Phone":{"type":"object","properties":{"id":{"type":"integer"},"isMain":{"type":"boolean"},"phone":{"type":"string"}}},"Messenger":{"type":"object","properties":{"id":{"type":"integer"},"typeId":{"type":"integer"},"login":{"type":"string"}}},"AttachmentResource":{"type":"object","properties":{"id":{"type":"integer"},"link":{"type":"array"},"entityId":{"type":"integer"},"entityType":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"Pipeline":{"type":"object","properties":{"id":{"type":"integer","description":"Pipeline ID"},"userId":{"type":"integer","description":"ID of the user who created the pipeline"},"name":{"type":"string","description":"Pipeline name"},"status":{"$ref":"#\/components\/schemas\/DefaultStatusProperty"},"order":{"type":"integer","description":"Pipelines order"},"steps":{"type":"array","items":{"$ref":"#\/components\/schemas\/Step"}},"settings":{"type":"array","items":{"$ref":"#\/components\/schemas\/Setting"}}}},"Step":{"type":"object","properties":{"id":{"type":"integer","description":"Step ID"},"pipelineId":{"type":"integer","description":"Pipeline ID"},"name":{"type":"string","description":"Step name"},"order":{"type":"integer","description":"Step order"},"status":{"$ref":"#\/components\/schemas\/DefaultStatusProperty"},"color":{"type":"string","enum":["#000000","black"],"description":"Step color"},"addEndHours":{"type":"integer","enum":[null,1,2,3,4,5,6,8,9,10],"description":"Add number of hours or null"},"notifyIn":{"type":"string","enum":["0","15min","30min","1h","2h","3h","6h","12h","24h","2d","3d","4d","5d","6d","7d"],"description":"Time notification"}}},"Setting":{"type":"object","properties":{"name":{"type":"string","description":"Setting name"},"value":{"type":"string","description":"Setting value"}}},"Deal":{"type":"object","properties":{"id":{"type":"integer","description":"Deal ID"},"pipelineId":{"type":"integer","description":"Pipeline ID"},"status":{"$ref":"#\/components\/schemas\/DealStatusProperty"},"stepId":{"type":"integer","description":"Pipeline step ID"},"responsibleId":{"type":"integer","description":"ID of the responsible for the deal user. Can be obtained in the \u201cGet list of invited users\u201d method"},"number":{"type":"integer","description":"Deal number, the number is generated automatically according to the order in which deal was created. Used in deal name if a custom value has not been specified"},"name":{"type":"string","description":"Deal name"},"price":{"type":"number","description":"Deal price"},"currency":{"type":"string","description":"Deal currency. Example: UAH, USD, EUR"},"profit":{"type":"number","description":"Deal profit in major currency units"},"hasExpense":{"type":"boolean","description":"Shows if the deal has at least one expense"},"order":{"type":"integer","description":"Deal order"},"sourceType":{"$ref":"#\/components\/schemas\/DealSourceType"},"sourceId":{"type":"integer","description":"ID of external source"},"history":{"items":{"$ref":"#\/components\/schemas\/DealHistory"}},"comments":{"items":{"$ref":"#\/components\/schemas\/DealComment"}},"attributes":{"items":{"$ref":"#\/components\/schemas\/DealAttributeValue"}},"expiration":{"$ref":"#\/components\/schemas\/DealExpiration"},"attachments":{"$ref":"#\/components\/schemas\/EntityAttachment"},"tasks":{"type":"array","items":{"type":"integer"}},"createdAt":{"type":"string","format":"date-time","description":"The date and time the transaction was created. Output in YYYY-MM-DD hh:mm:ss format with fractions of a second and time zone"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the transaction information was last updated. Output in YYYY-MM-DD hh:mm:ss format with fractions of a second and time zone"}}},"DealDetailed":{"type":"object","properties":{"id":{"type":"integer","description":"Deal ID"},"pipelineId":{"type":"integer","description":"Pipeline ID"},"status":{"$ref":"#\/components\/schemas\/DealStatusProperty"},"stepId":{"type":"integer","description":"Pipeline step ID"},"responsibleId":{"type":"integer","description":"ID of the responsible for the deal user. Can be obtained in the \u201cGet list of invited users\u201d method"},"number":{"type":"integer","description":"Deal number, the number is generated automatically according to the order in which deal was created. Used in deal name if a custom value has not been specified"},"name":{"type":"string","description":"Deal name"},"price":{"type":"number","description":"Deal price"},"currency":{"type":"string","description":"Deal currency. Example: UAH, USD, EUR"},"profit":{"type":"number","description":"Deal profit in major currency units"},"hasExpense":{"type":"boolean","description":"Shows if the deal has at least one expense"},"order":{"type":"integer","description":"Deal order"},"sourceType":{"$ref":"#\/components\/schemas\/DealSourceType"},"sourceId":{"type":"integer","description":"ID of external source"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the transaction was created. Output in YYYY-MM-DD hh:mm:ss format with fractions of a second and time zone"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the transaction information was last updated. Output in YYYY-MM-DD hh:mm:ss format with fractions of a second and time zone"},"history":{"$ref":"#\/components\/schemas\/DealHistory"},"comments":{"$ref":"#\/components\/schemas\/DealComment"},"attributes":{"$ref":"#\/components\/schemas\/DealAttributeValue"}}},"DealType":{"type":"object","properties":{"id":{"type":"integer","description":""},"name":{"type":"string","description":""},"status":{"type":"integer","description":""}}},"DealSourceType":{"type":"object","properties":{"id":{"type":"integer","description":""},"name":{"type":"string","description":""}}},"DealComment":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"eventData":{"type":"object","properties":{"text":{"type":"string"}}},"status":{"type":"integer"},"eventTime":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"attachments":{"items":{"$ref":"#\/components\/schemas\/EntityAttachment"}},"childCount":{"type":"integer"},"childUsers":{"type":"array","items":{"type":"integer"}}}},"Source":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"DealHistory":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"eventData":{"type":"array"},"eventType":{"type":"string"},"eventTime":{"type":"string","format":"date-time"},"currentData":{"type":"object","properties":{"contactFirstName":{"type":"string"},"contactLastName":{"type":"string"}}}}},"MessengerType":{"type":"object","properties":{"id":{"$ref":"#\/components\/schemas\/MessengerTypeProperty"},"name":{"type":"string","description":"Messenger name"}}},"Payment":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"price":{"$ref":"#\/components\/schemas\/PaymentOrderPrice"},"status":{"type":"integer"},"orderId":{"type":"string"},"paymentDescription":{"type":"string","nullable":true},"paymentMethod":{"type":"string","enum":["Fondy","YooMoney","PayPal"]},"createdAt":{"type":"string","format":"date-time"},"promoCode":{"type":"string"},"promoCodeDiscount":{"type":"number"}}},"UserPaymentData":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"contactId":{"type":"integer"},"dealId":{"type":"integer"},"status":{"type":"integer"},"firstName":{"type":"string"},"lastName":{"type":"string"},"name":{"type":"string"},"responsibleId":{"type":"integer"},"price":{"type":"object","properties":{"amount":{"type":"integer"},"currency":{"type":"string"}}},"description":{"type":"string"},"merchantName":{"type":"string"},"merchantUuid":{"type":"string"},"paymentMethod":{"type":"string"},"promoCode":{"type":"string"},"promoCodeDiscount":{"type":"string"},"createdAt":{"type":"string"},"externalContactId":{"type":"string"},"paymentItems":{"type":"array","items":{"properties":{"name":{"type":"string"},"productId":{"type":"string"},"type":{"type":"integer","enum":["1 (product)","2 (crmProduct)","3 (delivery)"]},"quantity":{"type":"string"},"amount":{"type":"integer"}}}}}},"Contact":{"type":"object","properties":{"id":{"type":"integer","description":"Contact ID"},"userId":{"type":"integer","description":"ID of user who created the contact"},"sourceType":{"type":"string","enum":["manually","chatbot","subscription_form","landing","a360","payments"]},"responsibleId":{"type":"integer","description":"ID of user responsible for the contact. Can be obtained in the \u201cGet list of invited users\u201d method"},"firstName":{"type":"string","description":"Contact first name"},"lastName":{"type":"string","description":"Contact last name"},"dealsQty":{"type":"integer"},"externalContactId":{"type":"string"},"comments":{"items":{"$ref":"#\/components\/schemas\/ContactComment"}},"tags":{"items":{"$ref":"#\/components\/schemas\/ContactTag"}},"phones":{"items":{"$ref":"#\/components\/schemas\/ContactPhone"}},"emails":{"items":{"$ref":"#\/components\/schemas\/ContactEmail"}},"messengers":{"items":{"$ref":"#\/components\/schemas\/ContactMessenger"}},"attributes":{"items":{"$ref":"#\/components\/schemas\/ContactAttributeValue"}},"history":{"items":{"$ref":"#\/components\/schemas\/ContactHistory"}},"tasks":{"type":"array","items":{"type":"integer"}},"createdAt":{"type":"string","format":"date-time","description":"The date and time the contact was created. Output in YYYY-MM-DD hh:mm:ss format with fractions of a second and time zone"},"updatedAt":{"type":"string","format":"date-time"},"attachments":{"$ref":"#\/components\/schemas\/EntityAttachment"}}},"ContactComment":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"attachments":{"$ref":"#\/components\/schemas\/EntityAttachment"},"childCount":{"type":"integer"},"childUsers":{"type":"array","items":{"type":"integer"}}}},"ContactHistory":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"contactId":{"type":"integer"},"eventType":{"type":"string"},"eventTime":{"type":"string","format":"date-time"},"eventData":{"type":"object","properties":{"dealName":{"type":"string"}}}}},"ContactPhone":{"type":"object","properties":{"id":{"type":"integer","description":"Contact phone ID"},"phone":{"type":"string"},"isMain":{"type":"boolean"}}},"ContactEmail":{"type":"object","properties":{"id":{"type":"integer","description":"Email address ID"},"email":{"type":"string","description":"Email address"},"isMain":{"type":"boolean","description":"Determines whether the email address is the main one"}}},"ContactMessenger":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the added messenger"},"typeId":{"type":"integer","description":"Messenger type"},"login":{"type":"string","description":"Contact login in the specified messenger"},"botId":{"type":"string","description":"External bot ID"},"contactId":{"type":"string","description":"External contact ID"},"status":{"type":"integer"},"chatbotUrl":{"type":"string","description":"URL of the chatbot from which the contact was received"},"isMainChatbot":{"type":"boolean","description":"Determine if chatbot messenger is the main one"}}},"ContactTag":{"type":"object","properties":{"id":{"type":"integer","description":"Tag ID"},"name":{"type":"string","description":"Tag name"},"colorText":{"type":"string"},"colorBackground":{"type":"string"},"contactCount":{"type":"integer","description":"Number of contacts associated with the tag"},"taskCount":{"type":"integer","description":"Number of tasks associated with a tag"}}},"ContactAttribute":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"integer","description":"| Status\n* 0 \u2014 inactive (deleted by user) * 1 \u2014 active * 2 \u2014 hidden"},"order":{"type":"integer"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":"Items of \"List\" field type"}}},"Attribute":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"integer"},"type":{"type":"integer"},"mandatory":{"type":"boolean"},"order":{"type":"integer"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"ContactAttributeValue":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"integer","description":"| Status\n* 0 \u2014 inactive (deleted by user) * 1 \u2014 active * 2 \u2014 hidden"},"type":{"type":"integer"},"mandatory":{"type":"boolean"},"contactCardShow":{"type":"boolean"},"order":{"type":"integer"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":"Items of \"List\" field type"},"value":{"properties":{"type":{"type":"string","description":"Field type"},"value":{"type":"string","description":"Field value"}},"description":""},"default":{"type":"boolean","description":""}}},"DealAttribute":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"$ref":"#\/components\/schemas\/DefaultStatusProperty"},"type":{"type":"integer","description":""},"mandatory":{"type":"boolean","description":""},"order":{"type":"integer"},"options":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":"Items of \"List\" field type"}}},"DealAttributeValue":{"type":"object","properties":{"id":{"type":"integer"},"pipelineId":{"type":"integer"},"name":{"type":"string"},"status":{"type":"integer"},"type":{"type":"integer"},"mandatory":{"type":"boolean"},"order":{"type":"integer"},"options":{"type":"array","description":"Items of \"List\" field type","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"value":{"properties":{"value":{"type":"string"}}}}},"Comment":{"type":"object","properties":{"id":{"type":"integer","description":""},"userId":{"type":"integer","description":""},"text":{"type":"string","description":""},"status":{"type":"integer","description":""},"createdAt":{"type":"string","format":"date-time","description":""},"updatedAt":{"type":"string","format":"date-time","description":""}}},"User":{"type":"object","properties":{"id":{"type":"integer"},"firstname":{"type":"string","description":"User first name"},"lastname":{"type":"string","description":"User last name"},"email":{"type":"string","description":"Email"},"avatar":{"type":"string","description":"Link to profile picture"},"lang":{"type":"string","description":"The interface language set in the interface of the invited user. Can be: en_US, es_MX, fr_FR, pt_BR, ru_RU, tr_TR, uk_UA"},"timezone":{"type":"integer","description":"Time zone set in user settings"},"currency":{"type":"string","description":"Currency set in settings"}}},"ContactsAutocomplete":{"type":"array","items":{"properties":{"id":{"type":"integer"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}}},"DealsAutocomplete":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"responsibleId":{"type":"number"},"stepId":{"type":"number"}}}},"TaskAutocomplete":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"responsibleId":{"type":"integer"},"boardId":{"type":"integer"},"stepId":{"type":"integer"},"observers":{"type":"array"}}}},"TaskTotals":{"type":"object","properties":{"total":{"type":"integer"},"steps":{"type":"array","items":{"properties":{"stepId":{"type":"integer"},"total":{"type":"integer"}}}}}},"TasksAttribute":{"type":"array","items":{"properties":{"attributeId":{"type":"integer"},"value":{"type":"string","example":"string or number or array"}}}},"Attributes":{"type":"object","properties":{"type":{"type":"integer","enum":[1,2,3,4,5,6]},"name":{"type":"string"},"status":{"type":"boolean"},"value":{"type":"array","items":{"$ref":"#\/components\/schemas\/AttributeValue"}}}},"AttributeValue":{"type":"object","properties":{"id":{"type":"number"},"value":{"type":"string"}}},"TaskRepeats":{"type":"object","properties":{"type":{"type":"integer","description":"Repetition frequency\n\n* 1 - daily\n* 2 - weekly\n* 3 - monthly\n* 4 - yearly\n"},"startDate":{"type":"string","format":"date-time","description":"Format - 2021-11-25 13:38"},"endSetting":{"type":"object","properties":{"type":{"type":"string","description":"* byDate - Complete task on the specified date\n* byCount - Complete task after task performs \"byCount\" times\n"},"value":{"description":"Has Date type if \"byDate\" type, Number if \"byCount\""}}},"setting":{"type":"object","properties":{"everyDay":{"type":"number"},"days":{"type":"array","description":"Array of ordinal days of the week","example":"[1, 3, 5] - repeat every Monday, Wednesday and Friday"},"everyWeekOfMonth":{"type":"integer","description":"Ordinal number of week of the month (from 1 to 4)"},"numberOfMonth":{"type":"object","properties":{"everyDay":{"type":"integer","description":"Ordinal number of the day of the month"},"everyMonth":{"type":"integer","description":"Ordinal number of the month"}}},"dayOfMonth":{"type":"object","properties":{"dayOfWeek":{"type":"integer","description":"Ordinal day of the week"},"everyMonth":{"type":"integer","description":"Ordinal month of the year"},"everyWeek":{"type":"integer","description":"Ordinal number of week of the month (from 1 to 4)"}}}}}}},"TasksConnection":{"type":"object","properties":{"tasks":{"$ref":"#\/components\/schemas\/TaskAutocomplete"},"deals":{"$ref":"#\/components\/schemas\/DealsAutocomplete"},"contacts":{"$ref":"#\/components\/schemas\/ContactsAutocomplete"},"subTasks":{"$ref":"#\/components\/schemas\/TaskAutocomplete"}}},"TaskComment":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"taskId":{"type":"integer"},"userId":{"type":"integer"},"body":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"attachments":{"items":{"$ref":"#\/components\/schemas\/EntityAttachment"}},"childCount":{"type":"integer"},"childUsers":{"type":"array","items":{"type":"integer"}}}},"TaskAttachment":{"type":"object","properties":{"id":{"type":"integer"},"link":{"type":"string"},"taskId":{"type":"integer"}}},"TaskChecklist":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"taskId":{"type":"integer"},"isDone":{"type":"boolean"},"items":{"$ref":"#\/components\/schemas\/ChecklistItems"}}},"ChecklistItems":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"order":{"type":"number"},"isDone":{"type":"boolean"}}},"TaskTag":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"colorText":{"type":"string"},"colorBackground":{"type":"string"}}},"Pagination":{"type":"object","properties":{"currentPage":{"type":"integer"},"lastPage":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"}}},"Tasks":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"userId":{"type":"integer"},"responsibleId":{"type":"integer"},"parentId":{"type":"integer"},"boardId":{"type":"integer"},"stepId":{"type":"integer"},"priority":{"type":"integer"},"order":{"type":"integer"},"description":{"type":"integer"},"alert":{"type":"string","description":"Notify before task expires (when notification is enabled). Allowed values - 0(not selected), 15min, 30min, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 4d, 5d, 6d, 7d"},"repeat":{"type":"integer"},"startAt":{"type":"string","description":"Format - 2021-11-25 13:38"},"finishAt":{"type":"string","description":"Format - 2021-11-25 13:38"},"observers":{"type":"array","items":{"type":"integer"}},"checklists":{"$ref":"#\/components\/schemas\/TaskChecklist"},"attachments":{"$ref":"#\/components\/schemas\/EntityAttachment"},"attributes":{"$ref":"#\/components\/schemas\/Attributes"},"comments":{"$ref":"#\/components\/schemas\/TaskComment"},"histories":{"$ref":"#\/components\/schemas\/TaskHistory"},"tags":{"$ref":"#\/components\/schemas\/TaskTag"},"deals":{"type":"array","description":"Array of deal IDs"},"tasks":{"type":"array","description":"Array of task IDs"},"contacts":{"type":"array","description":"Array of contact IDs"},"subTasks":{"type":"array","description":"Array of task IDs"},"updatedDaysAt":{"type":"number"},"createdDaysAt":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"Boards":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"userId":{"type":"integer"},"order":{"type":"integer"},"steps":{"$ref":"#\/components\/schemas\/BoardSteps"},"settings":{"$ref":"#\/components\/schemas\/BoardSettings"},"attributes":{"$ref":"#\/components\/schemas\/BoardAttribute"}}},"BoardAttribute":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"type":{"type":"integer"},"mandatory":{"type":"boolean"},"options":{"type":"array","default":[1,2]},"status":{"type":"integer"},"order":{"type":"integer"}}},"BoardSettings":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"},"boardId":{"type":"number"}}},"BoardSteps":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"integer"},"boardId":{"type":"integer"}}},"EntityFilterList":{"type":"array","items":{"properties":{"attributeId":{"type":"integer","description":"Attribute ID (optional)"},"name":{"type":"string","description":"Attribute\/Field name"},"isFilterable":{"type":"boolean","description":"Is attribute filterable"}}}},"TaskHistory":{"type":"object","properties":{"id":{"type":"integer"},"taskId":{"type":"integer"},"eventTime":{"type":"string"},"eventType":{"type":"string"},"eventData":{"type":"object"},"userId":{"type":"number"}}},"TelephonyCall":{"type":"object","properties":{"id":{"type":"integer"},"integrationId":{"type":"integer"},"integrationGroupId":{"type":"integer"},"responsibleId":{"type":"integer"},"phone":{"type":"string","description":"Contact phone, used in this call"},"callDuration":{"type":"integer","description":"Duration of the call"},"callType":{"type":"integer","description":"Type of the call (0 - incoming, 1 - outgoing)"},"state":{"type":"integer","description":"State of the call (1 - pending, 2 - successful, 3 - failed)"},"callRecordLink":{"type":"string","description":"Link to call record"},"createdAt":{"type":"string","format":"date-time","example":"2022-06-28 18:17"},"contact":{"type":"object","nullable":true,"properties":{"id":{"type":"integer"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"deal":{"type":"object","nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}},"EntityAttachment":{"type":"object","properties":{"id":{"type":"integer"},"link":{"type":"string"},"entityId":{"type":"number"},"entityType":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"DealExpiration":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Deal expiration date"},"time":{"type":"string","format":"time","nullable":true,"description":"Deal expiration time"},"dateTime":{"type":"string","format":"date-time","description":"Deal expiration DateTime"},"notificationEnabled":{"type":"boolean","description":"Is notification enabled"},"notifyIn":{"type":"string","nullable":true,"description":"Notify before deal expires (when notification is enabled). Allowed values - 0(not selected), 15min, 30min, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 4d, 5d, 6d, 7d"},"expired":{"type":"boolean","description":"The deal has expired"},"expires_within_day":{"type":"boolean","description":"The deal expires within 24 hours"}}},"IntegerSourceTypeProperty":{"type":"integer","description":"| * 1 - chatbot * 2 - manually * 3 - subscription_form * 4 - landing * 5 - a360 * 6 - payments * 7 - import * 8 - public_api * 9 - education * 10 - integration * 11 - popup * 12 - emailService"},"TaskPriorityProperty":{"type":"integer","description":"| Task priority\n* 1 - low * 2 - middle * 3 - high"},"DealStatusProperty":{"type":"integer","description":"| Step status\n* 0 \u2014 inactive (deleted by user) * 1 \u2014 active * 2 - completed deal as \u201cUnsuccessful\u201d * 3 - completed deal as \u201cSuccessful\u201d"},"DefaultStatusProperty":{"type":"integer","description":"| Status\n* 0 \u2014 inactive (deleted by user) * 1 \u2014 active"},"MessengerTypeProperty":{"type":"integer","description":"| Messenger type. Possible values: * 1 \u2014 Telegram * 2 \u2014 Facebook * 4 \u2014 Instagram * 5 \u2014 WhatsApp * 6 \u2014 Viber"},"AttributesProperty":{"type":"array","description":"Filter by attributes only","items":{"type":"object","properties":{"id":{"type":"string","description":"Attribute ID"},"expression":{"$ref":"#\/components\/schemas\/FilterExpressionProperty"},"value":{"maxLength":255,"description":"Can have string value or array of strings"}}}},"FilterExpressionProperty":{"type":"string","description":"| Possible values:\n- eq (=) - neq (!=) - gt (>) - gte (>=) - lt (<) - lte (<=) - like - in (check among list of values) - empty (check empty values)."},"ManagerSettings":{"type":"object","properties":{"sectionId":{"type":"integer"},"responsibleId":{"type":"integer"}}},"CustomTab":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","description":"Custom tab name"},"userId":{"type":"integer","description":"Custom tab owner"},"isVisible":{"type":"boolean","description":"Indicates whether the entity is visible to users"},"isDefault":{"type":"boolean","description":"Indicates whether the entity is default and cannot be changed"},"type":{"type":"integer","enum":[0,1],"description":"0 - attributes, 1 - integration"},"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - company"},"entityId":{"type":"integer","description":"Related entity ID. Only for boards and pipelines"}}},"CustomTabWithAttribute":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","description":"Custom tab name"},"userId":{"type":"integer","description":"Custom tab owner"},"isVisible":{"type":"boolean","description":"Indicates whether the entity is visible to users"},"isDefault":{"type":"boolean","description":"Indicates whether the entity is default and cannot be changed"},"type":{"type":"integer","enum":[0,1],"description":"0 - attributes, 1 - integration"},"entityType":{"type":"integer","enum":[0,1,2,3],"description":"0 - contact, 1 - pipeline, 2 - board, 3 - companies"},"entityId":{"type":"integer","description":"Related entity ID. Only for boards and pipelines"},"attributes":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"integer"},"attributeType":{"type":"integer"}}}}}},"PaymentOrderPrice":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}}}},"requestBodies":{"DealFilter":{"content":{"application\/json":{"schema":{"properties":{"limit":{"type":"integer","default":10,"description":"Limit on the number of records displayed. Default value \u2014 10"},"offset":{"type":"integer","default":0,"description":"Offset \u2014 0"},"sortBy":{"type":"object","properties":{"fieldName":{"type":"string","example":"id"},"direction":{"type":"string","example":"desc"}},"description":"Sorting direction. Possible values: asc \u2014 ascending order; desc \u2014 descending order.","enum":["asc","desc"]},"filter":{"type":"array","description":"Filter by deal fields (example \"id\", \"stepId\" ...)","items":{"type":"object","properties":{"name":{"type":"string","description":"| Deal field name (for example \"id\"). Can not filter by attributes. For filtering by attributes use \"attributes\" property. Possible values:\n- id - pipelineId - status - stepId - name - responsibleId - number - Deal number - price - currency - Deal currency. Accepts values in the form of UAH, USD, EUR - sourceType - Contact source - sourceId - Custom source ID of the deal from an external source - createdAt - updatedAt"},"expression":{"$ref":"#\/components\/schemas\/FilterExpressionProperty"},"value":{"maxLength":255,"description":"Can have string value or array of strings"}}}},"unlimited":{"type":"boolean","description":"Return all active deals without limit"},"email":{"type":"string","description":"Email address of the contact where you need to find deals"},"phone":{"type":"string","description":"Phone number of the contact you need to use to find deals"},"firstName":{"type":"string","description":"Name of the contact by whom you want to find deals"},"lastName":{"type":"string","description":"Filter by contact last name"},"name":{"type":"string","description":"Filter by deal name"},"completionDateFrom":{"type":"string","description":"Deal completion date from"},"completionDateTo":{"type":"string","description":"Deal completion date to"},"pipelineIds":{"type":"array","description":"Filter by pipeline Ids","example":"[1,2,3]","items":{"type":"integer"}},"attributes":{"$ref":"#\/components\/schemas\/AttributesProperty"},"expiration":{"type":"integer","description":"Filter by deal expiration date (1 - without date, 2 - overdue, 3 - within day, 4 - within week, 5 - within month)"}}}}}},"FilterTelephonyCalls":{"content":{"application\/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Date from"},"to":{"type":"string","format":"date-time","description":"Date to"},"responsibleIds":{"type":"array","description":"List of responsible user IDs","items":{"type":"integer"}},"callType":{"type":"integer","description":"Type of the call (0 - incoming, 1 - outgoing)"},"state":{"type":"integer","description":"State of the call (pending - 1, successful - 2, failed - 3)"},"integrationGroupId":{"type":"integer"},"contactFirstName":{"type":"string"},"contactLastName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":"string"}}}}}},"AttachmentBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"link":{"type":"string","example":"\/contacts\/sendPulse_crm_report.pdf","description":"First, the file must be uploaded to the file manager, and then the file can be attached."},"entityId":{"type":"number","description":"ID of entityType (example - id of task, if entityType=task)"},"entityType":{"type":"string","description":"One of entity types: task, deal, contact"}}}}}},"AttachmentUpdateBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"link":{"type":"string","example":"\/contacts\/sendPulse_crm_report.pdf","description":"First, the file must be uploaded to the file manager, and then the file can be attached."}}}}}}},"responses":{"404":{"description":"Record not found","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}}}}},"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https:\/\/api.sendpulse.com\/oauth\/access_token","scopes":[]}}}}},"security":[{"OAuth2":["read","write"]}]}