-
Notifications
You must be signed in to change notification settings - Fork 0
/
intership-study.k.postman_collection.json
160 lines (160 loc) · 4.85 KB
/
intership-study.k.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"info": {
"_postman_id": "f7947bef-9eb8-4c82-8525-fd7fe700a412",
"name": "Шерстобитова С. В., тестовое задание API",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
"_exporter_id": "28617415"
},
"item": [
{
"name": "GET",
"item": [
{
"name": "Получение информации об организации - идентификатор не найден",
"request": {
"auth": {
"type": "bearer",
"bearer": {
"token": "{{token}}"
}
},
"method": "GET",
"header": [],
"url": "{{хост}}/api/v1/organization/a862c6b9-3592-42b7-b7b4-d7f4fb995670"
},
"response": []
},
{
"name": "Получение информации об организации - идентификатор найден",
"request": {
"auth": {
"type": "bearer",
"bearer": {
"token": "{{token}}"
}
},
"method": "GET",
"header": [],
"url": "{{хост}}/api/v1/de/organization/{{id}}"
},
"response": []
}
]
},
{
"name": "POST",
"item": [
{
"name": "1. Получение токена авторизации",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n\"username\": \"user\", \r\n\"password\": \"user\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": "{{хост}}/authenticate"
},
"response": []
},
{
"name": "2. Создание организации - найдена, вернуть ошибку 400 с текстом \"Организация уже зарегистрирована\".",
"request": {
"auth": {
"type": "bearer",
"bearer": {
"token": "{{token}}"
}
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Центральная энергетическая таможня\", \r\n \"inn\": \"1755941699\",\r\n \"ogrn\": \"1072072854002\",\r\n \"kpp\": \"062543052\",\r\n \"address\": \"ул. Стоянова, дом 12\", \r\n \"region\": \"33\",\r\n \"phone\": \"+79123456789\",\r\n \"head\": [\r\n {\r\n \"inn\": \"875594169959\",\r\n \"snils\": \"97444534448\",\r\n \"position\": \"Начальник таможни\",\r\n \"firstName\": \"Иван\", \r\n \"middleName\": \"Иванов\",\r\n \"lastName\": \"Иванович\", \r\n \"citizenship\": \"123\"\r\n }\r\n ]\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": "{{хост}}/api/v1/de/organization"
},
"response": []
},
{
"name": "3. Создание организации - не найдена. Сохранить данные в справочнике organizations. Сгенерировать id организации",
"protocolProfileBehavior": {
"followAuthorizationHeader": false,
"disableCookies": false
},
"request": {
"auth": {
"type": "bearer",
"bearer": {
"token": "{{token}}"
}
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Центральная энергетическая компания\", \r\n \"inn\": \"2555942844\",\r\n \"ogrn\": \"1734728542213\",\r\n \"kpp\": \"262543253\",\r\n \"address\": \"г. Москва, ул. Стоянова, дом 1\", \r\n \"region\": \"90\",\r\n \"phone\": \"979533456780099\",\r\n \"head\": [\r\n {\r\n \"inn\": \"865594269959\",\r\n \"snils\": \"94444534487\",\r\n \"position\": \"Великая укротительница багов\",\r\n \"firstName\": \"Ольга\", \r\n \"middleName\": \"Назина\",\r\n \"lastName\": \"Евгеньевна\",\r\n \"citizenship\": \"Российская Федерация\"\r\n }\r\n ]\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": "{{хост}}/api/v1/de/organization"
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "хост",
"value": "",
"type": "string"
},
{
"key": "id",
"value": "",
"type": "string"
},
{
"key": "token",
"value": "",
"type": "string"
}
]
}