4 "name": "01_Onboard_Vendor",
5 "_postman_id": "f646198b-2f39-fb4f-c550-7c703688ac85",
6 "description": "onboard new vendor",
7 "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
11 "name": "Get Vendor before create",
16 "type": "text/javascript",
18 "tests[\"Status code is 200\"] = responseCode.code === 200;",
20 "var jsonData = JSON.parse(responseBody);",
21 "var vendor_found = false;",
22 "for (var i = 0; i < jsonData.results.length; i++) { ",
23 " if (jsonData.results[i][\"name\"] === postman.getGlobalVariable(\"vendor_name\")) {",
24 " vendor_found = true;",
25 " postman.setGlobalVariable(\"auto_vendor_id\", \"\"+jsonData.results[i][\"id\"]+\"\");",
28 "if (vendor_found === false) {",
29 " tests[postman.getGlobalVariable(\"vendor_name\")+\" does not exists\"] = true;",
33 " tests[postman.getGlobalVariable(\"vendor_name\")+\" already exists, we stop the run\"] = true;",
34 " postman.setNextRequest(null);",
42 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
46 "key": "Content-Type",
47 "value": "application/json",
52 "value": "application/json",
56 "key": "X-TransactionId",
57 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
73 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"
80 "name": "Create Vendor",
85 "type": "text/javascript",
87 "tests[\"Status code is 200\"] = responseCode.code === 200;",
89 "var jsonData = JSON.parse(responseBody);",
90 "postman.setGlobalVariable(\"auto_vendor_id\", \"\"+jsonData[\"itemId\"]+\"\");",
91 "postman.setGlobalVariable(\"auto_vendor_version_id\", \"\"+jsonData[\"version\"][\"id\"]+\"\");",
93 "var jsonData = JSON.parse(responseBody);",
94 "tests[\"Vendor version is in Draft status\"] = jsonData[\"version\"][\"status\"] === \"Draft\";"
100 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
104 "key": "Content-Type",
105 "value": "application/json",
110 "value": "application/json",
114 "key": "X-TransactionId",
115 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
124 "key": "X-FromAppId",
125 "value": "robot-ete",
131 "raw": "{\r\n \"iconRef\": \"icon\",\r\n \"vendorName\": \"{{vendor_name}}\",\r\n \"description\": \"Vendor\"\r\n}"
138 "name": "Get Vendor after create",
143 "type": "text/javascript",
145 "tests[\"Status code is 200\"] = responseCode.code === 200;",
147 "var jsonData = JSON.parse(responseBody);",
148 "var vendor_found = false;",
149 "for (var i = 0; i < jsonData.results.length; i++) { ",
150 " if (jsonData.results[i][\"name\"] === postman.getGlobalVariable(\"vendor_name\")) {",
151 " vendor_found = true;",
152 " postman.setGlobalVariable(\"auto_vendor_id\", \"\"+jsonData.results[i][\"id\"]+\"\");",
155 "tests[postman.getGlobalVariable(\"vendor_name\")+\" found\"] = vendor_found === true;",
164 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
168 "key": "Content-Type",
169 "value": "application/json",
174 "value": "application/json",
178 "key": "X-TransactionId",
179 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
188 "key": "X-FromAppId",
189 "value": "robot-ete",
195 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"
202 "name": "Get Vendor additional info after create",
207 "type": "text/javascript",
209 "tests[\"Status code is 200\"] = responseCode.code === 200;",
219 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vendor_id}}/versions",
223 "key": "Content-Type",
224 "value": "application/json",
229 "value": "application/json",
233 "key": "X-TransactionId",
234 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
243 "key": "X-FromAppId",
244 "value": "robot-ete",
250 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"
257 "name": "Submit Vendor",
262 "type": "text/javascript",
264 "tests[\"Status code is 200\"] = responseCode.code === 200;",
272 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models/{{auto_vendor_id}}/versions/{{auto_vendor_version_id}}/actions",
276 "key": "Content-Type",
277 "value": "application/json",
282 "value": "application/json",
286 "key": "X-TransactionId",
287 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
296 "key": "X-FromAppId",
297 "value": "robot-ete",
303 "raw": "{\"action\":\"Submit\"}"
310 "name": "Get Vendor after submit",
315 "type": "text/javascript",
317 "tests[\"Status code is 200\"] = responseCode.code === 200;",
327 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
331 "key": "Content-Type",
332 "value": "application/json",
337 "value": "application/json",
341 "key": "X-TransactionId",
342 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
351 "key": "X-FromAppId",
352 "value": "robot-ete",
358 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"
365 "name": "Get Vendor additional info after Submit",
370 "type": "text/javascript",
372 "tests[\"Status code is 200\"] = responseCode.code === 200;",
374 "var jsonData = JSON.parse(responseBody);",
376 "tests[\"Vendor version is in Draft status\"] = jsonData[\"status\"] === \"Certified\";",
383 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vendor_id}}/versions/{{auto_vendor_version_id}}",
387 "key": "Content-Type",
388 "value": "application/json",
393 "value": "application/json",
397 "key": "X-TransactionId",
398 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
407 "key": "X-FromAppId",
408 "value": "robot-ete",
414 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"