{
	"info": {
		"_postman_id": "1321fbca-35e5-4008-b61c-f385513180b9",
		"name": "TecCom Business Cloud - Supplier",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "13060618"
	},
	"item": [
		{
			"name": "Manage Data",
			"item": [
				{
					"name": "Suppliers/Buyers",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://api.tbc.tecalliance.net/v1/data/suppliers/:SupplierTecId/buyers",
							"protocol": "https",
							"host": [
								"api",
								"tbc",
								"tecalliance",
								"net"
							],
							"path": [
								"v1",
								"data",
								"suppliers",
								":SupplierTecId",
								"buyers"
							],
							"query": [
								{
									"key": "ExcludeNonexisting",
									"value": null,
									"disabled": true
								}
							],
							"variable": [
								{
									"key": "SupplierTecId",
									"value": "{{tecId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Suppliers/Buyers/Articles",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://api.tbc.tecalliance.net/v1/data/suppliers/:SupplierTecId/buyers/:BuyerTecId/articles",
							"protocol": "https",
							"host": [
								"api",
								"tbc",
								"tecalliance",
								"net"
							],
							"path": [
								"v1",
								"data",
								"suppliers",
								":SupplierTecId",
								"buyers",
								":BuyerTecId",
								"articles"
							],
							"query": [
								{
									"key": "PageSize",
									"value": "",
									"disabled": true
								},
								{
									"key": "SearchString",
									"value": "ABC",
									"disabled": true
								},
								{
									"key": "Brand",
									"value": "",
									"disabled": true
								},
								{
									"key": "PageNumber",
									"value": "",
									"disabled": true
								},
								{
									"key": "Status",
									"value": "",
									"disabled": true
								}
							],
							"variable": [
								{
									"key": "SupplierTecId",
									"value": "{{tecId}}"
								},
								{
									"key": "BuyerTecId",
									"value": "001000106869000000000004204001"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Supplier/Buyers/Articles/Id",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://api.tbc.tecalliance.net/v1/data/suppliers/:SupplierTecId/buyers/:BuyerTecId/articles/22163721",
							"protocol": "https",
							"host": [
								"api",
								"tbc",
								"tecalliance",
								"net"
							],
							"path": [
								"v1",
								"data",
								"suppliers",
								":SupplierTecId",
								"buyers",
								":BuyerTecId",
								"articles",
								"22163721"
							],
							"query": [
								{
									"key": "language",
									"value": "en",
									"disabled": true
								}
							],
							"variable": [
								{
									"key": "SupplierTecId",
									"value": "{{tecId}}"
								},
								{
									"key": "BuyerTecId",
									"value": "001000106869000000000004204001"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Get Access Token",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"pm.test(\"Token retrieved\", function() {\r",
							"    pm.response.to.have.status(200);\r",
							"    pm.response.to.be.json;\r",
							"    pm.expect(pm.response.json()).to.have.property(\"access_token\");\r",
							"\r",
							"    pm.collectionVariables.set(\"accessToken\", (pm.response.json()).access_token);\r",
							"});\r",
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"accept": true
				}
			},
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "username",
							"value": "{{clientId}}",
							"type": "string"
						},
						{
							"key": "password",
							"value": "{{clientSecret}}",
							"type": "string"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "accept",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "content-type",
						"value": "application/x-www-form-urlencoded",
						"type": "text"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "grant_type",
							"value": "client_credentials",
							"type": "text"
						},
						{
							"key": "scope",
							"value": "paapi",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://login.tecalliance.net/oauth2/default/v1/token",
					"protocol": "https",
					"host": [
						"login",
						"tecalliance",
						"net"
					],
					"path": [
						"oauth2",
						"default",
						"v1",
						"token"
					]
				}
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"requests": {},
				"exec": [
					"var abort = ",
					"    !(",
					"        pm.environment.has(\"clientId\") &&",
					"        pm.environment.has(\"clientSecret\") &&",
					"        pm.environment.has(\"tecId\")",
					"    );",
					"",
					"if (abort) {",
					"    console.log(\"Please check your environment. Mandatory environment variables are missing.\");",
					"    throw new Error(\"Environment variables are missing\");",
					"}",
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "accessToken",
			"value": ""
		},
		{
			"key": "uploadUrl",
			"value": ""
		}
	]
}