Accounts
Calls
notifyPhoneCall
- notifyPhoneCall(phoneNumber: string, userIds?: number[]): Promise<any>
Parameters
- phoneNumber: string
Optional
userIds: number[]
Returns Promise<any>
Companies
addCompany
- addCompany(company: Company): Promise<any>
Returns Promise<any>
getCompanies
- getCompanies(params: any): Promise<any>
Returns Promise<any>
getCompaniesCustomFieldById
- getCompaniesCustomFieldById(customFieldId: string): Promise<any>
Returns Promise<any>
getCompaniesCustomFieldGroupById
- getCompaniesCustomFieldGroupById(groupId: string): Promise<any>
Returns Promise<any>
getCompaniesCustomFieldGroups
- getCompaniesCustomFieldGroups(): Promise<any>
Returns Promise<any>
getCompaniesCustomFields
- getCompaniesCustomFields(paramsIn: any): Promise<any>
Returns Promise<any>
getCompaniesNotes
- getCompaniesNotes(params: any): Promise<any>
Returns Promise<any>
getCompaniesTags
- getCompaniesTags(paramsIn: any): Promise<any>
Returns Promise<any>
getCompany
- getCompany(companyId: number, params: any): Promise<any>
Parameters
- companyId: number
- params: any
Returns Promise<any>
getCompanyFiles
- getCompanyFiles(companyId: number): Promise<any>
Returns Promise<any>
getCompanyLinks
- getCompanyLinks(companyId: number): Promise<any>
Returns Promise<any>
getCompanyNoteById
- getCompanyNoteById(companyId: number, noteId: number): Promise<any>
Parameters
- companyId: number
- noteId: number
Returns Promise<any>
getCompanyNotes
- getCompanyNotes(companyId: number): Promise<any>
Returns Promise<any>
Constructors
Contacts
addContact
- addContact(contact: Contact): Promise<any>
Returns Promise<any>
addContactsCustomFields
- addContactsCustomFields(fields: any[]): Promise<any>
Returns Promise<any>
addNoteToContact
- addNoteToContact(contactId: number, note: Note): Promise<any>
Parameters
- contactId: number
- note: Note
Returns Promise<any>
attachChatToContact
- attachChatToContact(chatId: string, contactId: number): Promise<any>
Parameters
- chatId: string
- contactId: number
Returns Promise<any>
getContact
- getContact(contactId: number, params: any): Promise<any>
Parameters
- contactId: number
- params: any
Returns Promise<any>
getContactChats
- getContactChats(contactId: number): Promise<any>
Returns Promise<any>
getContactFiles
- getContactFiles(contactId: number): Promise<any>
Returns Promise<any>
getContactLinks
- getContactLinks(contactId: number): Promise<any>
Returns Promise<any>
getContactNoteById
- getContactNoteById(contactId: number, noteId: number): Promise<any>
Parameters
- contactId: number
- noteId: number
Returns Promise<any>
getContactNotes
- getContactNotes(contactId: number): Promise<any>
Returns Promise<any>
getContacts
- getContacts(params: any): Promise<any>
Returns Promise<any>
getContactsChats
- getContactsChats(contactIds: number[]): Promise<any>
Returns Promise<any>
getContactsCustomFieldById
- getContactsCustomFieldById(customFieldId: string): Promise<any>
Returns Promise<any>
getContactsCustomFieldGroupById
- getContactsCustomFieldGroupById(groupId: string): Promise<any>
Returns Promise<any>
getContactsCustomFieldGroups
- getContactsCustomFieldGroups(): Promise<any>
Returns Promise<any>
getContactsCustomFields
- getContactsCustomFields(paramsIn: any): Promise<any>
Returns Promise<any>
getContactsNotes
- getContactsNotes(params: any): Promise<any>
Returns Promise<any>
getContactsTags
- getContactsTags(paramsIn: any): Promise<any>
Returns Promise<any>
linkFileToContact
- linkFileToContact(fileUUID: string, contactId: number): Promise<any>
Parameters
- fileUUID: string
- contactId: number
Returns Promise<any>
updateContact
- updateContact(id: number, data: object): Promise<any>
Returns Promise<any>
Entities
getEntityFiles
- getEntityFiles(entityType: string, contactId: number): Promise<any>
Parameters
- entityType: string
- contactId: number
Returns Promise<any>
Entity
getCustomFieldById
- getCustomFieldById(entityType: string, customFieldId: string): Promise<any>
Parameters
- entityType: string
- customFieldId: string
Returns Promise<any>
getCustomFieldsByEntityType
- getCustomFieldsByEntityType(entityType: string, params: any): Promise<any>
Parameters
- entityType: string
- params: any
Returns Promise<any>
getLinksByEntityType
- getLinksByEntityType(entityType: string, entityId: number): Promise<any>
Parameters
- entityType: string
- entityId: number
Returns Promise<any>
Events
getEventById
- getEventById(eventId: number, paramWith?: any): Promise<any>
Parameters
- eventId: number
Optional
paramWith: any
Returns Promise<any>
getEvents
- getEvents(paramsIn: any): Promise<any>
Returns Promise<any>
getEventTypes
- getEventTypes(): Promise<any>
Returns Promise<any>
Leads
addLead
- addLead(leadData: any): Promise<any>
Returns Promise<any>
addLeadsCustomFields
- addLeadsCustomFields(fields: any[]): Promise<any>
Returns Promise<any>
addNoteToLead
- addNoteToLead(leadId: number, note: Note): Promise<any>
Returns Promise<any>
addTagForLeads
- addTagForLeads(tag: AddTagParams): Promise<any>
Returns Promise<any>
appendTagsToLead
- appendTagsToLead(entityId: number, tags: Tag[]): Promise<any>
Parameters
- entityId: number
- tags: Tag[]
Returns Promise<any>
getBaseLeadPayload
- getBaseLeadPayload(
name: string,
price: number,
createdBy?: number,
): { created_by: number; name: string; price: number } Parameters
- name: string
- price: number
Optional
createdBy: number
Returns { created_by: number; name: string; price: number }
getLeadById
- getLeadById(leadId: number, params: any): Promise<any>
Parameters
- leadId: number
- params: any
Returns Promise<any>
getLeadFiles
- getLeadFiles(leadId: number): Promise<any>
Returns Promise<any>
getLeadLinks
- getLeadLinks(leadId: number): Promise<any>
Returns Promise<any>
getLeadNoteById
- getLeadNoteById(leadId: number, noteId: number): Promise<any>
Parameters
- leadId: number
- noteId: number
Returns Promise<any>
getLeadsCustomFieldById
- getLeadsCustomFieldById(customFieldId: string): Promise<any>
Returns Promise<any>
getLeadsCustomFieldGroupById
- getLeadsCustomFieldGroupById(groupId: string): Promise<any>
Returns Promise<any>
getLeadsCustomFieldGroups
- getLeadsCustomFieldGroups(): Promise<any>
Returns Promise<any>
getLeadsCustomFields
- getLeadsCustomFields(paramsIn: any): Promise<any>
Returns Promise<any>
getLeadsNotes
- getLeadsNotes(params: any): Promise<any>
Returns Promise<any>
getLeadsTags
- getLeadsTags(paramsIn: any): Promise<any>
Returns Promise<any>
getLeadsWithFilter
- getLeadsWithFilter(params: any): Promise<any>
Returns Promise<any>
getLossReasons
- getLossReasons(): Promise<any>
Returns Promise<any>
getPipelineLeadPayload
- getPipelineLeadPayload(
pipelineId: number,
statusId?: number,
): { pipeline_id: number; status_id: number } Parameters
- pipelineId: number
Optional
statusId: number
Returns { pipeline_id: number; status_id: number }
getTagsForLeads
- getTagsForLeads(paramsIn: any): Promise<any>
Returns Promise<any>
linkFileToLead
- linkFileToLead(fileUUID: string, leadId: number): Promise<any>
Parameters
- fileUUID: string
- leadId: number
Returns Promise<any>
updateLead
- updateLead(data: any): Promise<any>
Returns Promise<any>
Methods
getContactPayload
- getContactPayload(name: string, phone: string): Contact
Parameters
- name: string
- phone: string
getSalesBots
- getSalesBots(): Promise<any>
Returns Promise<any>
getUrl
- getUrl(url: string, options: any): Promise<any>
Returns Promise<any>
Notes
addNote
- addNote(entityType: string, entityId: number, note: Note): Promise<any>
Parameters
- entityType: string
- entityId: number
- note: Note
Returns Promise<any>
getNoteById
- getNoteById(entityType: string, entityId: number, noteId: number): Promise<any>
Parameters
- entityType: string
- entityId: number
- noteId: number
Returns Promise<any>
getNotesByEntityId
- getNotesByEntityId(entityType: string, entityId: number): Promise<any>
Parameters
- entityType: string
- entityId: number
Returns Promise<any>
getNotesByEntityType
- getNotesByEntityType(entityType: string, paramsIn: any): Promise<any>
Parameters
- entityType: string
- paramsIn: any
Returns Promise<any>
Pipelines
getPipelineById
- getPipelineById(pipelineId: number): Promise<any>
Returns Promise<any>
getPipelines
- getPipelines(): Promise<any>
Returns Promise<any>
getPipelineStatuses
- getPipelineStatuses(pipelineId: number): Promise<any>
Returns Promise<any>
Properties
axios
axios: AxiosInstance
ShortLinks
getShortLinkForContact
- getShortLinkForContact(url: string, contactId: number): Promise<any>
Parameters
- url: string
- contactId: number
Returns Promise<any>
Sources
addSource
- addSource(params: SourceParams): Promise<any>
Returns Promise<any>
deleteSourceById
- deleteSourceById(sourceId: number): Promise<any>
Returns Promise<any>
getSourceById
- getSourceById(sourceId: number): Promise<any>
Returns Promise<any>
getSources
- getSources(): Promise<any>
Returns Promise<any>
Talks
closeTalkById
- closeTalkById(talkId: number, forceClose?: boolean): Promise<any>
Parameters
- talkId: number
Optional
forceClose: boolean
Returns Promise<any>
getTalkById
- getTalkById(talkId: number): Promise<any>
Returns Promise<any>
getTalks
- getTalks(paramsIn?: GetTalkParams): Promise<any>
Returns Promise<any>
Tasks
addTask
- addTask(task: Task): Promise<any>
Returns Promise<any>
editTask
- editTask(taskId: number, data: any): Promise<any>
Returns Promise<any>
getTaskById
- getTaskById(taskId: number): Promise<any>
Returns Promise<any>
getTasks
- getTasks(paramsIn: any): Promise<any>
Returns Promise<any>
Templates
addTemplate
- addTemplate(templates: any): Promise<any>
Returns Promise<any>
deleteTemplateById
- deleteTemplateById(templateId: string): Promise<any>
Returns Promise<any>
getTemplateById
- getTemplateById(templateId: string): Promise<any>
Returns Promise<any>
getTemplates
- getTemplates(paramsIn: any): Promise<any>
Returns Promise<any>
updateTemplateById
- updateTemplateById(templateId: string, template: any): Promise<any>
Parameters
- templateId: string
- template: any
Returns Promise<any>
Unsorted
acceptUnsorted
- acceptUnsorted(uid: string, userId: number, statusId: number): Promise<any>
Parameters
- uid: string
- userId: number
- statusId: number
Returns Promise<any>
addUnsortedForms
- addUnsortedForms(data: any): Promise<any>
Returns Promise<any>
addUnsortedSip
- addUnsortedSip(data: any): Promise<any>
Returns Promise<any>
declineUnsorted
- declineUnsorted(uid: string, userId?: number): Promise<any>
Parameters
- uid: string
Optional
userId: number
Returns Promise<any>
getUnsorted
- getUnsorted(paramsIn: any): Promise<any>
Returns Promise<any>
getUnsortedByUID
- getUnsortedByUID(uid: string): Promise<any>
Returns Promise<any>
getUnsortedSummary
- getUnsortedSummary(): Promise<any>
Returns Promise<any>
linkUnsorted
- linkUnsorted(uid: string, data: any): Promise<any>
Returns Promise<any>
Users
getUserById
- getUserById(userId: number): Promise<any>
Returns Promise<any>
getUsers
- getUsers(): Promise<any>
Returns Promise<any>
Webhooks
deleteWebhook
- deleteWebhook(__namedParameters: any): Promise<any>
Returns Promise<any>
getWebhookEvents
- getWebhookEvents(): string[]
Returns string[]
getWebhooks
- getWebhooks(): Promise<any>
Returns Promise<any>
setWebhook
- setWebhook(params: WebhookParams): Promise<any>
Returns Promise<any>
Widgets
getWidget
- getWidget(widgetCode: string): Promise<any>
Returns Promise<any>
getWidgets
- getWidgets(params: any): Promise<any>
Returns Promise<any>
See
https://www.amocrm.ru/developers/content/telephony/call_event