{
	"info": {
		"_postman_id": "b95194b2-43df-4ef1-b299-080a8f81eacb",
		"name": "Global.Inventory.Tutorial",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "GetToken",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"let jsonData = pm.response.json();\r",
							"let auth = jsonData.access_token\r",
							"pm.environment.set('auth', jsonData.access_token)\r",
							"\r",
							"pm.test(\"Status code is 200\", function () {\r",
							"    pm.response.to.have.status(200);\r",
							"});"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"auth": {
					"type": "bearer"
				},
				"method": "POST",
				"header": [],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "client_id",
							"value": "{{client_id}}",
							"type": "text"
						},
						{
							"key": "client_secret",
							"value": "{{client_secret}}",
							"type": "text"
						},
						{
							"key": "grant_type",
							"value": "client_credentials",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{authorization-host}}{{connect}}{{token}}",
					"host": [
						"{{authorization-host}}{{connect}}{{token}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "CreateInventory",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"pm.test(\"Status code is 202\", () => pm.response.to.have.status(202));"
						],
						"type": "text/javascript"
					}
				},
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var uuid = require('uuid')\r",
							"var vehicleId = uuid.v4();\r",
							"pm.environment.set('randomVehicleid', vehicleId);"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"type": "text",
						"value": "application/json"
					},
					{
						"key": "Authorization",
						"type": "text",
						"value": "Bearer {{auth}}"
					},
					{
						"key": "x-seller-identifier",
						"value": "{{sellerId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"PublishingDestinations\": [\r\n    {\r\n      \"Name\": \"OneAutoGate\"\r\n    }\r\n  ],\r\n  \"Media\": {\r\n    \"Photos\": [\r\n      {\r\n        \"Url\": \"https://images.pickles.com.au/image/upload/f_auto,q_auto,w_768/c_scale,g_south_east,l_pickles-logo-white_mipoap,o_60,w_0.5,fl_relative,x_0.02,y_0.02,fl_region_relative/v1627521253/1129298037.jpg\",\r\n        \"Order\": 0\r\n      },\r\n      {\r\n        \"Url\": \"https://images.pickles.com.au/image/upload/f_auto,q_auto,w_768/c_scale,g_south_east,l_pickles-logo-white_mipoap,o_60,w_0.5,fl_relative,x_0.02,y_0.02,fl_region_relative/v1627521253/1129298038.jpg\",\r\n        \"Order\": 1\r\n      }\r\n    ]\r\n  },\r\n  \"Specification\": {     \r\n    \"Make\": \"Mitsubishi\",\r\n    \"Model\": \"Eclipse Cross\",\r\n    \"SpecificationCode\": \"AUVMITS2020AEER\",\r\n    \"SpecificationSource\": \"Redbook\",\r\n    \"ReleaseDate\": {\r\n      \"Year\": 2020,\r\n      \"Month\": 10\r\n    }\r\n  },\r\n  \"Identifier\": \"{{randomVehicleid}}\",\r\n  \"Type\": \"CAR\",\r\n  \"ListingType\": \"Used\",\r\n  \"SaleStatus\": \"In Stock\",\r\n  \"Description\": \"This is a comment\",\r\n  \"Registration\": {\r\n    \"Number\": \"NWF303\",\r\n    \"OwnerCount\": 0\r\n  },\r\n  \"Colours\": [\r\n    {\r\n      \"Location\": \"Exterior\",\r\n      \"Generic\": \"White\",\r\n      \"Name\": \"White Diamond\"\r\n    },\r\n    {\r\n      \"Location\": \"Interior\",\r\n      \"Generic\": \"Grey\",\r\n      \"Name\": \"Grey\"\r\n    }\r\n  ],\r\n  \"OdometerReadings\": [\r\n    {\r\n      \"Type\": \"Engine\",\r\n      \"Value\": 88300.0,\r\n      \"UnitOfMeasure\": \"KM\",\r\n      \"Date\": \"2021-08-01\"\r\n    }\r\n  ],  \r\n  \"BuildDate\": {\r\n    \"Month\": 2014,\r\n    \"Year\": 0\r\n  },\r\n  \"ComplianceDate\": {\r\n        \"Year\": 2014,\r\n        \"Month\": 5\r\n    },\r\n  \"PriceList\": [\r\n    {\r\n      \"Currency\": \"AUD\",\r\n      \"Amount\": 44888.0,\r\n      \"Type\": \"DAP\"\r\n    },\r\n    {\r\n      \"Currency\": \"AUD\",\r\n      \"Amount\": 43600.0,\r\n      \"Type\": \"EGC\"\r\n    }\r\n  ],\r\n  \"Identification\": [\r\n    {\r\n        \"StockNumber\": \"YB644300\"\r\n    },\r\n    {\r\n        \"VIN\": \"JMFXTGK1WMZ001500\"\r\n    }\r\n  ]\r\n}"
				},
				"url": {
					"raw": "{{g-inventory-host}}{{vehicles}}/{{randomVehicleid}}",
					"host": [
						"{{g-inventory-host}}{{vehicles}}"
					],
					"path": [
						"{{randomVehicleid}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "UpdateInventory",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"pm.test(\"Status code is 202\", () => pm.response.to.have.status(202));"
						],
						"type": "text/javascript"
					}
				},
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "PATCH",
				"header": [
					{
						"key": "Content-Type",
						"type": "text",
						"value": "application/json"
					},
					{
						"key": "Authorization",
						"type": "text",
						"value": "Bearer {{auth}}"
					},
					{
						"key": "x-seller-identifier",
						"value": "{{sellerId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"PublishingDestinations\": [\r\n    {\r\n      \"Name\": \"OneAutoGate\"\r\n    }\r\n  ],\r\n  \"Media\": {\r\n    \"Photos\": [\r\n      {\r\n        \"Url\": \"https://images.pickles.com.au/image/upload/f_auto,q_auto,w_768/c_scale,g_south_east,l_pickles-logo-white_mipoap,o_60,w_0.5,fl_relative,x_0.02,y_0.02,fl_region_relative/v1627521253/1129298037.jpg\",\r\n        \"Order\": 0\r\n      },\r\n      {\r\n        \"Url\": \"https://images.pickles.com.au/image/upload/f_auto,q_auto,w_768/c_scale,g_south_east,l_pickles-logo-white_mipoap,o_60,w_0.5,fl_relative,x_0.02,y_0.02,fl_region_relative/v1627521253/1129298038.jpg\",\r\n        \"Order\": 1\r\n      }\r\n    ]\r\n  },\r\n  \"Specification\": {     \r\n    \"Make\": \"Mitsubishi\",\r\n    \"Model\": \"Eclipse Cross\",\r\n    \"SpecificationCode\": \"AUVMITS2020AEER\",\r\n    \"SpecificationSource\": \"Redbook\",\r\n    \"ReleaseDate\": {\r\n      \"Year\": 2020,\r\n      \"Month\": 10\r\n    }\r\n  },\r\n  \"Identifier\": \"{{randomVehicleid}}\",\r\n  \"Type\": \"CAR\",\r\n  \"ListingType\": \"Used\",\r\n  \"SaleStatus\": \"In Stock\",\r\n  \"Description\": \"This is a comment\",\r\n  \"Registration\": {\r\n    \"Number\": \"NWF303\",\r\n    \"OwnerCount\": 0\r\n  },\r\n  \"Colours\": [\r\n    {\r\n      \"Location\": \"Exterior\",\r\n      \"Generic\": \"White\",\r\n      \"Name\": \"White Diamond\"\r\n    },\r\n    {\r\n      \"Location\": \"Interior\",\r\n      \"Generic\": \"Grey\",\r\n      \"Name\": \"Grey\"\r\n    }\r\n  ],\r\n  \"OdometerReadings\": [\r\n    {\r\n      \"Type\": \"Engine\",\r\n      \"Value\": 88300.0,\r\n      \"UnitOfMeasure\": \"KM\",\r\n      \"Date\": \"2021-08-01\"\r\n    }\r\n  ],  \r\n  \"BuildDate\": {\r\n    \"Month\": 2014,\r\n    \"Year\": 0\r\n  },\r\n  \"ComplianceDate\": {\r\n        \"Year\": 2014,\r\n        \"Month\": 5\r\n    },\r\n  \"PriceList\": [\r\n    {\r\n      \"Currency\": \"AUD\",\r\n      \"Amount\": 44888.0,\r\n      \"Type\": \"DAP\"\r\n    },\r\n    {\r\n      \"Currency\": \"AUD\",\r\n      \"Amount\": 43600.0,\r\n      \"Type\": \"EGC\"\r\n    }\r\n  ],\r\n  \"Identification\": [\r\n    {\r\n        \"StockNumber\": \"YB644300\"\r\n    },\r\n    {\r\n        \"VIN\": \"JMFXTGK1WMZ001500\"\r\n    }\r\n  ]\r\n}"
				},
				"url": {
					"raw": "{{g-inventory-host}}{{vehicles}}/{{randomVehicleid}}",
					"host": [
						"{{g-inventory-host}}{{vehicles}}"
					],
					"path": [
						"{{randomVehicleid}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "DeleteInventory",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"pm.test(\"Status code is 202\", () => pm.response.to.have.status(202));"
						],
						"type": "text/javascript"
					}
				},
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "DELETE",
				"header": [
					{
						"key": "Content-Type",
						"type": "text",
						"value": "application/json"
					},
					{
						"key": "Authorization",
						"type": "text",
						"value": "Bearer {{auth}}"
					},
					{
						"key": "x-seller-identifier",
						"value": "{{sellerId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "{{g-inventory-host}}{{vehicles}}/{{randomVehicleid}}",
					"host": [
						"{{g-inventory-host}}{{vehicles}}"
					],
					"path": [
						"{{randomVehicleid}}"
					]
				}
			},
			"response": []
		}
	]
}