This commit is contained in:
Viktoria Polyakova
2026-01-25 08:57:38 +00:00
commit 4fb101c5db
7657 changed files with 497012 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
{
"nestdev": {
"url": "http://test.amwork.loc",
"baseDomain": "amwork.loc",
"subdomain": "test",
"email": "test@test.com",
"password": "test",
"entityTypeId": 123,
"entityId": 123,
"teslaDealEntityId": 123,
"elonContactEntityId": 123,
"boardId": 123,
"stageId": 123,
"fieldGroupId": 123,
"activityTypeId": 123,
"taskId": 123,
"subtaskId": 123,
"taskBoardId": 123,
"taskStageId": 15022001,
"taskSettingsId": 123,
"taskCommentId": 123,
"activityId": 123,
"noteId": 123,
"userId": 123,
"budgetFieldId": 123,
"fileId": "11111111-1111-1111-1111-111111111111",
"mailboxId": 123,
"folderId": 123,
"messageId": 123,
"payloadId": 123,
"automationId": 123,
"taskAutomationId": 123,
"changeStageAutomationId": 123,
"notificationId": 123
},
"nestprod": {
"url": "https://test.amwork.com",
"baseDomain": "amwork.com",
"subdomain": "test",
"email": "test@test.com",
"password": "test",
"entityTypeId": 123,
"entityId": 123,
"teslaDealEntityId": 123,
"elonContactEntityId": 123,
"boardId": 123,
"stageId": 123,
"fieldGroupId": 123,
"activityTypeId": 123,
"taskId": 123,
"subtaskId": 123,
"taskBoardId": 123,
"taskStageId": 15022001,
"taskSettingsId": 123,
"taskCommentId": 123,
"activityId": 123,
"noteId": 123,
"userId": 123,
"budgetFieldId": 123,
"fileId": "11111111-1111-1111-1111-111111111111",
"mailboxId": 123,
"folderId": 123,
"messageId": 123,
"payloadId": 123,
"automationId": 123,
"taskAutomationId": 123,
"changeStageAutomationId": 123,
"notificationId": 123
},
"neststaging": {
"url": "https://test.amwork.com",
"baseDomain": "amwork.com",
"subdomain": "test",
"email": "test@test.com",
"password": "test",
"entityTypeId": 123,
"entityId": 123,
"teslaDealEntityId": 123,
"elonContactEntityId": 123,
"boardId": 123,
"stageId": 123,
"fieldGroupId": 123,
"activityTypeId": 123,
"taskId": 123,
"subtaskId": 123,
"taskBoardId": 123,
"taskStageId": 15022001,
"taskSettingsId": 123,
"taskCommentId": 123,
"activityId": 123,
"noteId": 123,
"userId": 123,
"budgetFieldId": 123,
"fileId": "11111111-1111-1111-1111-111111111111",
"mailboxId": 123,
"folderId": 123,
"messageId": 123,
"payloadId": 123,
"automationId": 123,
"taskAutomationId": 123,
"changeStageAutomationId": 123,
"notificationId": 123
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@@ -0,0 +1,5 @@
### Get account settings
GET {{url}}/api/account/settings
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,92 @@
### Login by subdomain
POST {{url}}/api/auth/login
Content-Type: application/json
{
"email": "{{email}}",
"password": "{{password}}"
}
> {%
client.global.set("token", response.body.token);
client.global.set("userId", response.body.userId);
%}
### Login for site
POST {{url}}/api/auth/login-site
Content-Type: application/json
{
"email": "test@test.com",
"password": "test"
}
> {%
client.global.set("loginLink", response.body.loginLink);
client.global.set("subdomain", response.body.subdomain);
%}
### Login for extension
POST {{url}}/api/auth/login-ext
Content-Type: application/json
{
"email": "test@test.com",
"password": "test"
}
> {%
client.global.set("token", response.body.token);
client.global.set("userId", response.body.userId);
%}
### Decode login link
POST {{subdomain}}.{{baseDomain}}/api/auth/decode-login-link
Content-Type: application/json
{
"loginLink": "{{loginLink}}"
}
> {%
client.global.set("token", response.body.token);
client.global.set("userId", response.body.userId);
%}
### Refresh token
POST {{url}}/api/auth/refresh-token
Content-Type: application/json
Authorization: Bearer {{token}}
> {%
client.global.set("token", response.body.token);
client.global.set("userId", response.body.userId);
%}
### Create account
POST {{url}}/api/auth/accounts
Content-Type: application/json
{
"firstName": "John",
"lastName": "Doe",
"email": "test{{$randomInt}}@test.com",
"phone": "+79998887766",
"companyName": "test5",
"password": "test",
"ref": "{{partnerRef}}",
"promoCode": "some-promo-code",
"rmsCode": "demo"
}
> {%
client.global.set("loginLink", response.body.loginLink);
client.global.set("subdomain", response.body.subdomain);
%}

View File

@@ -0,0 +1,93 @@
### Create automation with activity action
POST {{url}}/api/automation/automations
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "create_activity",
"delay": 300,
"settings": {
"responsibleUserType": "custom",
"responsibleUserId": {{userId}},
"activityTypeId": {{activityTypeId}},
"text": "some-text",
"deadlineType": "immediately",
"deadlineTime": null
}
},
"stageIds": [
{{stageId}}
],
"conditions": [
{
"type": "responsible_user",
"settings": {
"userIds": [{{userId}}]
}
},
{
"type": "field",
"settings": {
"fieldId": {{budgetFieldId}},
"fieldType": "value",
"payload": {
"from": 100,
"to": 200
}
}
}
]
}
### Update automation with activity action
PUT {{url}}/api/automation/automations/{{activityAutomationId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "create_activity",
"delay": 300,
"settings": {
"responsibleUserType": "custom",
"responsibleUserId": {{userId}},
"activityTypeId": {{activityTypeId}},
"text": "test",
"deadlineType": "immediately",
"deadlineTime": null
}
},
"stageIds": [
{{stageId}}
],
"conditions": [
{
"type": "responsible_user",
"settings": {
"userIds": [{{userId}}]
}
},
{
"type": "field",
"settings": {
"fieldId": {{budgetFieldId}},
"fieldType": "value",
"payload": {
"from": 100,
"to": 200
}
}
}
]
}

View File

@@ -0,0 +1,11 @@
### Get automations
GET {{url}}/api/automation/board/{{boardId}}/automations
Content-Type: application/json
Authorization: Bearer {{token}}
### Delete automation
DELETE {{url}}/api/automation/automations/51011020
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,47 @@
### Create automation with task action
POST {{url}}/api/automation/automations
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "change_stage",
"delay": null,
"settings": {
"stageId": {{stageId}}
}
},
"stageIds": [
{{stageId}}
],
"conditions": []
}
### Update automation with task action
PUT {{url}}/api/automation/automations/{{changeStageAutomationId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "change_stage",
"delay": 300,
"settings": {
"stageId": {{stageId}}
}
},
"stageIds": [
{{stageId}}
],
"conditions": []
}

View File

@@ -0,0 +1,63 @@
### Create automation with email action
POST {{url}}/api/automation/automations
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "send_email",
"delay": null,
"settings": {
"subject": "email subject",
"content": "email body",
"signature": "some signature",
"sendAsHtml": false,
"mailboxId": 27023020,
"userId": {{userId}},
"fileIds": []
}
},
"stageIds": [
{{stageId}}
],
"conditions": [],
"isActive": true,
"applyTrigger": false
}
### Update automation with email action
PUT {{url}}/api/automation/automations/{{emailAutomationId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "send_email",
"delay": null,
"settings": {
"subject": "email subject",
"content": "email body",
"signature": "new signature",
"sendAsHtml": false,
"mailboxId": 27023020,
"userId": {{userId}},
"fileIds": []
}
},
"stageIds": [
{{stageId}}
],
"conditions": [],
"isActive": true,
"applyTrigger": false
}

View File

@@ -0,0 +1,57 @@
### Create automation with task action
POST {{url}}/api/automation/automations
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_or_create_entity",
"settings": null
},
"action": {
"type": "create_task",
"delay": 300,
"settings": {
"responsibleUserType": "custom",
"responsibleUserId": {{userId}},
"title": "some-title",
"text": "some-text",
"deadlineType": "immediately",
"deadlineTime": null
}
},
"stageIds": [
{{stageId}}
],
"conditions": []
}
### Update automation with task action
PUT {{url}}/api/automation/automations/{{taskAutomationId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"trigger": {
"type": "move_entity",
"settings": null
},
"action": {
"type": "create_task",
"delay": 3000,
"settings": {
"responsibleUserType": "custom",
"responsibleUserId": {{userId}},
"title": "new-title",
"text": "new-text",
"deadlineType": "custom",
"deadlineTime": 3000
}
},
"stageIds": [
{{stageId}}
],
"conditions": []
}

View File

@@ -0,0 +1,35 @@
### Get boards
GET {{url}}/api/crm/boards
Content-Type: application/json
Authorization: Bearer {{token}}
### Create board
POST {{url}}/api/crm/boards
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Board name",
"sortOrder": 1,
"type": "entity_type",
"recordId": {{entityTypeId}}
}
### Update board
PUT {{url}}/api/crm/boards/{{boardId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Board name",
"sortOrder": 1
}
### Delete board
DELETE {{url}}/api/crm/boards/321
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,72 @@
### Create entity type
POST {{url}}/api/crm/constructor/create-entity-type
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Object",
"entityCategory": "universal",
"fieldGroups": [
{
"id": {{fieldGroupId}},
"name": "Details",
"sortOrder": 0,
"state": "created"
}
],
"fields": [
{
"id": 4201,
"name": "Field name",
"type": "text",
"sortOrder": 1,
"fieldGroupId": {{fieldGroupId}},
"state": "created"
},
{
"id": 4202,
"name": "Field name",
"type": "select",
"sortOrder": 1,
"fieldGroupId": {{fieldGroupId}},
"options": [
{
"id": 1,
"label": "Option 1",
"sortOrder": 0,
"state": "created"
},
{
"id": 2,
"label": "Option 2",
"sortOrder": 1,
"state": "created"
}
],
"state": "created"
}
],
"featureIds": [1, 2, 3],
"taskSettingsActiveFields": ["planned_time", "board_name", "start_date", "end_date", "description", "subtasks"],
"linkedEntityTypes": [
{
"sortOrder": 0,
"targetEntityTypeId": "{{entityTypeId}}"
}
],
"linkedEntityCategories": [{
"entityCategory": "contact",
"entityTypeName": "Partner contact",
"sectionName": "Partner contacts"
}, {
"entityCategory": "company",
"entityTypeName": "Partner company",
"sectionName": "Partner companies"
}],
"section": {
"name": "Objects",
"view": "board",
"icon": "crown"
}
}

View File

@@ -0,0 +1,10 @@
### Delete user and change responsible
DELETE {{url}}/api/crm/user/delete
Content-Type: application/json
Authorization: Bearer {{token}}
{
"currentUserId": 12022001,
"newUserId": 12022002
}

View File

@@ -0,0 +1,5 @@
### Create demo massive data
POST {{url}}/api/crm/demo-massive-data
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,76 @@
### Get entity type
GET {{url}}/api/crm/entity-types/{{entityTypeId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get entity types
GET {{url}}/api/crm/entity-types
Content-Type: application/json
Authorization: Bearer {{token}}
### Delete entity type
DELETE {{url}}/api/crm/entity-types/321
Content-Type: application/json
Authorization: Bearer {{token}}
### Update entity type
PUT {{url}}/api/crm/entity-types/{{entityTypeId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"id": {{entityTypeId}},
"name": "Deal",
"cardView": "fields_and_notes",
"fieldGroups": [
{
"id": {{fieldGroupId}},
"name": "Details",
"sortOrder": 0,
"state": "created"
}
],
"fields": [
{
"id": 4201,
"name": "Field name",
"type": "text",
"sortOrder": 1,
"fieldGroupId": {{fieldGroupId}},
"state": "updated"
},
{
"id": 4202,
"name": "Field name",
"type": "select",
"sortOrder": 1,
"fieldGroupId": {{fieldGroupId}},
"options": [
{
"id": 1,
"label": "Option 1",
"sortOrder": 0,
"state": "created"
},
{
"id": 2,
"label": "Option 2",
"sortOrder": 1,
"state": "created"
}
],
"state": "created"
}
],
"featureIds": [1, 2, 3],
"taskSettingsActiveFields": ["planned_time", "board_name", "start_date", "end_date", "description", "subtasks"],
"linkedEntityTypes": [],
"section": {
"name": "Deals",
"view": "board",
"icon": "crown"
}
}

View File

@@ -0,0 +1,108 @@
### Get entity
GET {{url}}/api/crm/entities/{{entityId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Create entity
POST {{url}}/api/crm/entities
Content-Type: application/json
Authorization: Bearer {{token}}
{
"id": {{$randomInt}},
"name": "Tesla",
"responsibleUserId": {{userId}},
"entityTypeId": {{entityTypeId}},
"stageId": {{stageId}},
"fieldValues": [
{
"id": {{$randomInt}},
"fieldId": {{budgetFieldId}},
"fieldType": "number",
"payload": {
"value": 100000
},
"state": "created"
}
],
"entityLinks": [
{
"id": {{$randomInt}},
"sourceId": {{entityId}},
"targetId": {{elonContactEntityId}},
"sortOrder": 0,
"state": "created"
}
]
}
### Update entity
PUT {{url}}/api/crm/entities/{{entityId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"id": {{entityId}},
"name": "Tesla",
"responsibleUserId": {{userId}},
"entityTypeId": {{entityTypeId}},
"stageId": {{stageId}},
"fieldValues": [
{
"fieldId": {{budgetFieldId}},
"fieldType": "number",
"payload": {
"value": 10000
},
"state": "updated"
}
],
"entityLinks": [
{
"id": {{$randomInt}},
"sourceId": {{entityId}},
"targetId": {{elonContactEntityId}},
"sortOrder": 0,
"state": "created"
}
]
}
### Update entity stage
PUT {{url}}/api/crm/entities/{{entityId}}/stage/{{stageId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Delete entity
DELETE {{url}}/api/crm/entities/321
Content-Type: application/json
Authorization: Bearer {{token}}
### Get entities for board
GET {{url}}/api/crm/entities/{{entityTypeId}}/{{boardId}}/cards
Content-Type: application/json
Authorization: Bearer {{token}}
### Get entities list items
GET {{url}}/api/crm/entities/{{entityTypeId}}/list-items
Content-Type: application/json
Authorization: Bearer {{token}}
### Search entities in name, all fields and linked entities
GET {{url}}/api/crm/entities/{{entityTypeId}}/search?value=book
Content-Type: application/json
Authorization: Bearer {{token}}
### Search entities by name or field value
GET {{url}}/api/crm/entities/{{entityTypeId}}/search/fields?name=book&field[42022001]=4&field[42022003]=com
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,15 @@
### Create external link
POST {{url}}/api/extension/external-link
Content-Type: application/json
Authorization: Bearer {{token}}
{
"url": "https://salesforce.com",
"name": "Tesla",
"responsibleUserId": {{userId}},
"entityTypeId": {{entityTypeId}},
"stageId": {{stageId}},
"fieldValues": [],
"entityLinks": []
}

View File

@@ -0,0 +1,5 @@
### Get feed items for entity with paging
GET {{url}}/api/crm/feed-items?entityId={{entityId}}&offset=0&limit=10
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,17 @@
### Send feedback
POST {{url}}/api/mailing/feedback
Content-Type: application/json
Authorization: Bearer {{token}}
{
"type": "trial_expired",
"payload": {
"name": "John Dow",
"phone": "+1234567890",
"email": "john.dow@company.com",
"userNumber": 10,
"subscribe": "yearly",
"plan": "basic"
}
}

View File

@@ -0,0 +1,18 @@
### Get fields settings
GET {{url}}/api/crm/entity-types/13022735/fields-settings
Content-Type: application/json
Authorization: Bearer {{token}}
### Update fields settings
PUT {{url}}/api/crm/entity-types/13022735/fields-settings
Content-Type: application/json
Authorization: Bearer {{token}}
{
"activeFieldCodes": [
"participants",
"description"
]
}

View File

@@ -0,0 +1,14 @@
### Save field value
POST {{url}}/api/crm/entities/{{entityId}}/field-values/{{budgetFieldId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"fieldId": {{budgetFieldId}},
"fieldType": "value",
"payload": {
"value": 500
},
"state": "updated"
}

View File

@@ -0,0 +1,48 @@
### Update entity type fields and groups
PUT {{url}}/api/crm/entity-types/{{entityTypeId}}/fields-and-groups
Content-Type: application/json
Authorization: Bearer {{token}}
{
"fieldGroups": [
{
"id": {{fieldGroupId}},
"name": "Details",
"sortOrder": 0,
"state": "created"
}
],
"fields": [
{
"id": 4201,
"name": "Field name",
"type": "text",
"sortOrder": 1,
"fieldGroupId": {{fieldGroupId}},
"state": "updated"
},
{
"id": 4202,
"name": "Field name",
"type": "select",
"sortOrder": 1,
"fieldGroupId": {{fieldGroupId}},
"options": [
{
"id": 1,
"label": "Option 1",
"sortOrder": 0,
"state": "created"
},
{
"id": 2,
"label": "Option 2",
"sortOrder": 1,
"state": "created"
}
],
"state": "created"
}
]
}

View File

@@ -0,0 +1,5 @@
### Delete file
DELETE {{url}}/api/crm/file-link/1
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,31 @@
### Send contact us form
POST {{url}}/api/forms/contact-us
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "test 10",
"phone": "+7999888776633",
"email": "test@test.com",
"comment": "some comment"
}
### Send partner form
POST {{url}}/api/forms/partner
Content-Type: application/json
Authorization: Bearer {{token}}
{
"firstName": "John",
"lastName": "Doe",
"phone": "+7999888776633",
"email": "test@test.com",
"company": "Tesla",
"country": "USA",
"website": "tesla.com",
"employees": "10000",
"comment": "some comment"
}

View File

@@ -0,0 +1,17 @@
### Get next identity for sequence
GET {{url}}/api/crm/identity/board_id_seq
Content-Type: application/json
Authorization: Bearer {{token}}
### Get all identities pool
GET {{url}}/api/crm/identities/all
Content-Type: application/json
Authorization: Bearer {{token}}
### Get identities pool
GET {{url}}/api/crm/identities/feed_item_id_seq
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,5 @@
### Get import template for entityType
GET {{url}}/api/crm/entity-types/{{entityTypeId}}/template
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,30 @@
### Get mails for mailbox
GET {{url}}/api/mailing/mailboxes/{{mailboxId}}/messages?folderId={{folderId}}&offset=0&limit=50
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mails for section
GET {{url}}/api/mailing/section/inbox/messages?mailboxId={{mailboxId}}&offset=0&limit=50
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mail thread
GET {{url}}/api/mailing/mailboxes/{{mailboxId}}/threads/1234567890
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mail message
GET {{url}}/api/mailing/mailboxes/{{mailboxId}}/messages/{{messageId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mail attachment
GET {{url}}'/api/mailing/mailboxes/{{mailboxId}}/messages/{{messageId}}/attachments/{{payloadId}}
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,76 @@
### Create mailbox
POST {{url}}/api/mailing/settings/mailboxes
Content-Type: application/json
Authorization: Bearer {{token}}
{
"email": "test@company.com"
}
### Update mailbox
PUT {{url}}/api/mailing/settings/mailboxes/{{mailboxId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"email": "test2@company.com",
"ownerId": {{userid}},
"accessibleUserIds": [{{userid}}],
"createContact": true,
"syncDays": 7
}
### Delete mailbox
DELETE {{url}}/api/mailing/settings/mailboxes/{{mailboxId}}?save=true
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mailboxes for settings
GET {{url}}/api/mailing/settings/mailboxes
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mailbox for settings
GET {{url}}/api/mailing/settings/mailboxes/{{mailboxId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get mailbox manual settings
GET {{url}}/api/mailing/settings/mailboxes/{{mailboxId}}/manual
Content-Type: application/json
Authorization: Bearer {{token}}
### Update mailbox manual settings
POST {{url}}/api/mailing/settings/mailboxes/{{mailboxId}}/manual
Content-Type: application/json
Authorization: Bearer {{token}}
{
"password": "12345678",
"imapServer": "imap.company.com",
"imapPort": 993,
"imapSecure": true,
"smtpServer": "smtp.company.com",
"smtpPort": 465,
"smtpSecure": true
}
### Get Gmail connection string for redirect
GET {{url}}/api/mailing/settings/mailboxes/gmail/connect/{{mailboxId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Gmail callback endpoint
GET {{url}}/api/mailing/settings/mailboxes/gmail/callback?state={{mailboxId}}&code=1234567890
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,5 @@
### Get mailboxes
GET {{url}}/api/mailing/mailboxes
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,5 @@
### Run migration
POST {{url}}/api/crm/run-migration
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,17 @@
### Get modules
GET {{url}}/api/crm/modules
Content-Type: application/json
Authorization: Bearer {{token}}
### Activate module
POST {{url}}/api/crm/modules/{{moduleId}}/activate
Content-Type: application/json
Authorization: Bearer {{token}}
### Deactivate module
POST {{url}}/api/crm/modules/{{moduleId}}/deactivate
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,27 @@
### Create note
POST {{url}}/api/crm/notes
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entityId": {{entityId}},
"text": "Hello world!!!"
}
### Update note
PUT {{url}}/api/crm/notes/{{noteId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entityId": {{entityId}},
"text": "Updated note"
}
### Delete note
DELETE {{url}}/api/crm/notes/321
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,23 @@
### Get notifications
GET {{url}}/api/notifications
Content-Type: application/json
Authorization: Bearer {{token}}
### Get unseen count
GET {{url}}/api/notifications/unseen-count
Content-Type: application/json
Authorization: Bearer {{token}}
### Mark seen all
PUT {{url}}/api/notifications/seen
Content-Type: application/json
Authorization: Bearer {{token}}
### Mark seen notification
PUT {{url}}/api/notifications/{{notificationId}}/seen
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,11 @@
### Get partner summary
GET {{url}}/api/partners/{{partnerId}}/summary
Content-Type: application/json
Authorization: Bearer {{token}}
### Get partner leads
GET {{url}}/api/partners/{{partnerId}}/leads
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,5 @@
### Get order statuses
GET {{url}}/api/products/order-statuses
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,92 @@
### Get entity order
GET {{url}}/api/products/orders/entity/{{entityId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get entity order products count
GET {{url}}/api/products/orders/entity/{{entityId}}/products-count
Content-Type: application/json
Authorization: Bearer {{token}}
### Create order
POST {{url}}/api/products/orders
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entityId": {{entityId}},
"currency": "USD",
"taxIncluded": true,
"statusId": {{orderStatusId}},
"warehouseId": {{warehouseId}},
"items": [
{
"productId": {{productId}},
"quantity": 5,
"unitPrice": 100,
"tax": 10,
"discount": 0,
"sortOrder": 0,
"reservations": [
{
"warehouseId": {{warehouseId}},
"quantity": 5
},
{
"warehouseId": {{secondWarehouseId}},
"quantity": 10
}
]
}
]
}
### Update order
PUT {{url}}/api/products/orders/{{orderId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entityId": {{entityId}},
"currency": "USD",
"taxIncluded": true,
"statusId": {{orderStatusId}},
"warehouseId": {{secondWarehouseId}},
"items": [
{
"id": 14,
"productId": {{productId}},
"quantity": 10,
"unitPrice": 200,
"tax": 10,
"discount": 30,
"sortOrder": 2,
"reservations": [
{
"warehouseId": {{warehouseId}},
"quantity": 5
}
]
},
{
"id": -1,
"productId": {{productId}},
"quantity": 20,
"unitPrice": 100,
"tax": 20,
"discount": 30,
"sortOrder": 3,
"reservations": []
}
]
}
### Change order status
PUT {{url}}/api/products/orders/{{orderId}}/status/{{orderStatusId}}
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,32 @@
### Get categories
GET {{url}}/api/products/categories
Content-Type: application/json
Authorization: Bearer {{token}}
### Create category
POST {{url}}/api/products/categories
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Category 1",
"parentId": null
}
### Update category
PUT {{url}}/api/products/categories/{{productCategoryId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Category new name"
}
### Delete category
DELETE {{url}}/api/products/categories/123
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,29 @@
### Create product price
POST {{url}}/api/products/{{productId}}/prices
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": null,
"unitPrice": 100,
"currency": "EUR"
}
### Update product price
PUT {{url}}/api/products/{{productId}}/prices/{{productPriceId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Updated price",
"unitPrice": 200,
"currency": "USD"
}
### Delete product price
DELETE {{url}}/api/products/{{productId}}/prices/67
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,86 @@
### Get products
GET {{url}}/api/products?categoryId={{productCategoryId}}&search=some&offset=0&limit=10
Content-Type: application/json
Authorization: Bearer {{token}}
### Get products by ids
GET {{url}}/api/products?ids=1,2,3
Content-Type: application/json
Authorization: Bearer {{token}}
### Get product
GET {{url}}/api/products/{{productId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Create product
POST {{url}}/api/products
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Some product",
"type": "service",
"description": "Some description",
"sku": "some-product",
"unit": "some-unit",
"tax": 10,
"categoryId": {{productCategoryId}},
"prices": [
{
"name": "Price in USD",
"unitPrice": 100,
"currency": "USD"
},
{
"name": "Price in KZT",
"unitPrice": 200,
"currency": "KZT"
}
],
"photoFileIds": ["c7d48430-a2b7-4ea5-96a2-58bc40d90574"],
"stocks": [
{
"warehouseId": {{warehouseId}},
"stockQuantity": 100
}
]
}
### Update product
PUT {{url}}/api/products/{{productId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "New product name",
"description": "New description",
"sku": "new-product",
"unit": "new-unit",
"tax": 20,
"categoryId": {{productCategoryId}}
}
### Delete product
DELETE {{url}}/api/products/123
Content-Type: application/json
Authorization: Bearer {{token}}
### Upload product photos
POST {{url}}/api/products/{{productId}}/photos
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary="abcd"
--abcd
Content-Disposition: form-data; name="test"; filename="test.png"
Content-Type: image/png
< ../_resources/test.png
--abcd--

View File

@@ -0,0 +1,5 @@
### Get shipment statuses
GET {{url}}/api/products/shipment-statuses
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,17 @@
### Get shipments
GET {{url}}/api/products/shipments?offset=0&limit=10
Content-Type: application/json
Authorization: Bearer {{token}}
### Get shipment by id
GET {{url}}/api/products/shipments/{{shipmentId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Change shipment status
PUT {{url}}/api/products/shipments/{{shipmentId}}/status/{{shipmentStatusId}}
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,18 @@
### Update product stocks
PUT {{url}}/api/products/{{productId}}/stocks
Content-Type: application/json
Authorization: Bearer {{token}}
{
"stocks": [
{
"warehouseId": {{warehouseId}},
"stockQuantity": 100
},
{
"warehouseId": {{secondWarehouseId}},
"stockQuantity": 200
}
]
}

View File

@@ -0,0 +1,31 @@
### Get warehouses
GET {{url}}/api/products/warehouses
Content-Type: application/json
Authorization: Bearer {{token}}
### Create warehouse
POST {{url}}/api/products/warehouses
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Some warehouse"
}
### Update warehouse
PUT {{url}}/api/products/warehouses/{{warehouseId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "New warehouse name"
}
### Delete warehouse
DELETE {{url}}/api/products/warehouses/123
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,5 @@
### Send event to rabbit
POST {{url}}/api/rabbit
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,10 @@
### Get industries
GET {{url}}/api/crm/rms/industries
Content-Type: application/json
### Delete demo data
DELETE {{url}}/api/crm/rms/demo-data
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,47 @@
### Get all stages or by boardId
GET {{url}}/api/crm/stages
Content-Type: application/json
Authorization: Bearer {{token}}
### Save stages batch
POST {{url}}/api/crm/stages/batch
Content-Type: application/json
Authorization: Bearer {{token}}
{
"stages": [
{
"id": "172",
"name": "Stage 1",
"color": "#fff",
"code": null,
"isSystem": false,
"sortOrder": 1,
"boardId": {{boardId}},
"state": "unchanged"
},
{
"id": "298",
"name": "Stage 2",
"color": "#fff",
"code": null,
"isSystem": false,
"sortOrder": 2,
"boardId": {{boardId}},
"state": "updated"
},
{
"id": "{{$randomInt}}",
"name": "Stage 4",
"color": "#fff",
"code": null,
"isSystem": false,
"sortOrder": 1,
"boardId": {{boardId}},
"state": "added"
}
]
}

View File

@@ -0,0 +1,12 @@
### Delete file link by id
DELETE {{url}}/api/crm/file-links/123
Content-Type: application/json
Authorization: Bearer {{token}}
### Delete file links by ids
DELETE {{url}}/api/crm/file-links?ids=72,73
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,24 @@
### Upload file
POST {{url}}/api/storage/upload
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary="abcd"
--abcd
Content-Disposition: form-data; name="test"; filename="test.png"
Content-Type: image/png
< ../_resources/test.png
--abcd--
### Delete file
DELETE {{url}}/api/storage/file/{{fileId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get file
GET {{url}}/api/storage/file/{{fileId}}
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,27 @@
### Create subtask
POST {{url}}/api/crm/tasks/{{taskId}}/subtasks
Content-Type: application/json
Authorization: Bearer {{token}}
{
"text": "new subtask",
"resolved": false
}
### Update subtask
PUT {{url}}/api/crm/tasks/{{taskId}}/subtasks/{{subtaskId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"text": "updated subtask",
"resolved": false
}
### Delete subtask
DELETE {{url}}/api/crm/tasks/{{taskId}}/subtasks/46022010
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,11 @@
### Like task comment
POST {{url}}/api/crm/tasks/{{taskId}}/comments/{{taskCommentId}}/like
Content-Type: application/json
Authorization: Bearer {{token}}
### Unlike task comment
POST {{url}}/api/crm/tasks/{{taskId}}/comments/{{taskCommentId}}/unlike
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,33 @@
### Get task comments
GET {{url}}/api/crm/tasks/{{taskId}}/comments?offset=0&limit=10
Content-Type: application/json
Authorization: Bearer {{token}}
### Create task comment
POST {{url}}/api/crm/tasks/{{taskId}}/comments
Content-Type: application/json
Authorization: Bearer {{token}}
{
"text": "Hello world!!!",
"fileIds": []
}
### Update task comment
PUT {{url}}/api/crm/tasks/{{taskId}}/comments/{{taskCommentId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"text": "New text"
}
### Delete task comment
DELETE {{url}}/api/crm/tasks/{{taskId}}/comments/47022018
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,39 @@
### Get task settings
GET {{url}}/api/crm/task-settings
Content-Type: application/json
Authorization: Bearer {{token}}
### Create task settings
POST {{url}}/api/crm/task-settings
Content-Type: application/json
Authorization: Bearer {{token}}
{
"type": "task_board",
"recordId": 123,
"activeFields": [
"planned_time",
"board_name",
"start_date",
"end_date"
]
}
### Update task settings
PUT {{url}}/api/crm/task-settings/{{taskSettingsId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"activeFields": [
"planned_time",
"board_name",
"start_date",
"end_date",
"description",
"subtasks"
]
}

View File

@@ -0,0 +1,21 @@
### Get task types
GET {{url}}/api/crm/task-types
Content-Type: application/json
Authorization: Bearer {{token}}
### Create task type
POST {{url}}/api/crm/task-types
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Call"
}
### Delete task type
DELETE {{url}}/api/crm/task-types/321
Content-Type: application/json
Authorization: Bearer {{token}}

134
backend/artifacts/task.http Normal file
View File

@@ -0,0 +1,134 @@
### Get task by id
GET {{url}}/api/crm/tasks/{{taskId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Create task
POST {{url}}/api/crm/tasks
Content-Type: application/json
Authorization: Bearer {{token}}
{
"responsibleUserId": {{userId}},
"startDate": "2022-11-21T17:37:03",
"endDate": "2022-11-22T17:37:03",
"text": "Task with start and end time",
"isResolved": false,
"result": null,
"entityId": {{entityId}},
"title": "Task 1",
"plannedTime": 3600,
"stageId": {{taskStageId}},
"settingsId": {{taskSettingsId}},
"subtasks": [
{"text": "subtask 1", "resolved": true},
{"text": "subtask 2", "resolved": false}
]
}
### Update task
PUT {{url}}/api/crm/tasks/{{taskId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"responsibleUserId": {{userId}},
"startDate": "2022-11-23T17:37:03",
"endDate": "2022-11-24T17:37:03",
"text": "Updated Task 1 with start and end time",
"isResolved": true,
"result": "Result",
"entityId": {{entityId}},
"title": "Updated Task 1"
}
### Delete task
DELETE {{url}}/api/crm/tasks/321
Content-Type: application/json
Authorization: Bearer {{token}}
### Create activity
POST {{url}}/api/crm/activities
Content-Type: application/json
Authorization: Bearer {{token}}
{
"responsibleUserId": {{userId}},
"startDate": "2022-11-21T17:37:03",
"endDate": "2022-11-22T17:37:03",
"text": "Activity with start and end time",
"isResolved": false,
"result": null,
"entityId": {{entityId}},
"activityTypeId": {{activityTypeId}}
}
### Update activity
PUT {{url}}/api/crm/activities/{{activityId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"responsibleUserId": {{userId}},
"startDate": "2022-11-23T17:37:03",
"endDate": "2022-11-24T17:37:03",
"text": "Updated Activity 1 with start and end time",
"isResolved": true,
"result": "Result",
"entityId": {{entityId}},
"activityTypeId": {{activityTypeId}}
}
### Delete activity
DELETE {{url}}/api/crm/activities/321
Content-Type: application/json
Authorization: Bearer {{token}}
### Get activities
GET {{url}}/api/crm/activities/cards?responsibleUserId={{userId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get tasks by time
POST {{url}}/api/crm/tasks/by_time
Content-Type: application/json
Authorization: Bearer {{token}}
### Get time board meta
POST {{url}}/api/crm/tasks/by_time/meta
Content-Type: application/json
Authorization: Bearer {{token}}
{
"stageIds": [{{taskStageId}}]
}
### Get tasks by board
POST {{url}}/api/crm/tasks/boards/{{taskBoardId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"ownerIds": [{{userId}}]
}
### Get tasks board meta
POST {{url}}/api/crm/tasks/boards/{{taskBoardId}}/meta
Content-Type: application/json
Authorization: Bearer {{token}}
{
"stageIds": [{{taskStageId}}]
}

View File

@@ -0,0 +1,73 @@
### Get user by id
GET {{url}}/api/users/{{userId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Create user
POST {{url}}/api/settings/users
Content-Type: application/json
Authorization: Bearer {{token}}
{
"firstName": "Genadiy",
"lastName": "Genadiyev",
"email": "genadiy.genadiyev@test1.amwork.com",
"password": "123",
"phone": "+79998887766",
"role": "user"
}
### Update user
PUT {{url}}/api/settings/users/{{userId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"firstName": "Genadiy!",
"lastName": "Genadiyev!",
"email": "genadiy.genadiyev@test1.amwork.com",
"password": "123",
"phone": "+79998887766",
"role": "admin"
}
### Delete activity
DELETE {{url}}/api/settings/users/{{userId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get user list
GET {{url}}/api/settings/users
Content-Type: application/json
Authorization: Bearer {{token}}
### Get user by id
GET {{url}}/api/settings/users/{{userId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Update user profile
PUT {{url}}/api/user/{{userId}}/profile
Content-Type: application/json
Authorization: Bearer {{token}}
{
"birthDate": "1996-11-25T14:36:45",
"phone": "+79998887766"
}
### Get user profile by user id
GET {{url}}/api/user/{{userId}}/profile
Content-Type: application/json
Authorization: Bearer {{token}}