{
	"info": {
		"_postman_id": "c3c49d74-3017-4105-92a6-adbe789a07af",
		"name": "Integration Api Docs",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "25019780",
		"_collection_link": "https://egaranti-dev.postman.co/workspace/Team-BE~b8a925c6-e6c7-4ced-83f5-38cb643eb0ce/collection/25019780-c3c49d74-3017-4105-92a6-adbe789a07af?action=share&source=collection_link&creator=25019780"
	},
	"item": [
		{
			"name": "Authorization",
			"item": [
				{
					"name": "Creating Token",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = JSON.parse(responseBody);",
									"pm.environment.set(\"token\", jsonData.jwtToken.split(\" \")[1]);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"apiKey\": \"{{api-key}}\",\n    \"secretKey\": \"{{secret-key}}\"\n}"
						},
						"url": {
							"raw": "{{test-url}}/auth",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"auth"
							]
						}
					},
					"response": [
						{
							"name": "Token oluşturma",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"name": "Content-Type",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"apiKey\": \"{{api-key}}\",\n    \"secretKey\": \"{{secret-key}}\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "http://localhost:9700/auth",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "9700",
									"path": [
										"auth"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"header": [
								{
									"key": "Date",
									"value": "Sat, 25 Nov 2023 11:39:50 GMT"
								},
								{
									"key": "Vary",
									"value": "Origin"
								},
								{
									"key": "Vary",
									"value": "Access-Control-Request-Method"
								},
								{
									"key": "Vary",
									"value": "Access-Control-Request-Headers"
								},
								{
									"key": "Content-Type",
									"value": "application/json"
								},
								{
									"key": "Transfer-Encoding",
									"value": "chunked"
								}
							],
							"cookie": [],
							"body": "{\n    \"jwtToken\": \"Bearer eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_6tWyk0tSs5IzCvxTFGyMjLVUUqtKFCyMjQ3MLA0NDG0NNBRykwsgQkYGVsa1AIAjJTumzMAAAA.iDr_aw9zEhqP7rfww6916DbYCW4Zd_BeQfLVvc4T5N1XBcuMbuQXEohe-8iyB2M5KaKQqhq6yTOXhBIF2Xki4A\",\n    \"expiredAt\": \"2023-11-25 15:09\"\n}"
						}
					]
				}
			]
		},
		{
			"name": "Categories",
			"item": [
				{
					"name": "Main Category",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{test-url}}/main-categories",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"main-categories"
							]
						}
					},
					"response": []
				},
				{
					"name": "Category",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{test-url}}/categories?mainCategoryId=100",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"categories"
							],
							"query": [
								{
									"key": "mainCategoryId",
									"value": "100"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Sub Category",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{test-url}}/sub-categories?categoryId=100",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"sub-categories"
							],
							"query": [
								{
									"key": "categoryId",
									"value": "100"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Brand",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{test-url}}/sub-category-brands?subCategoryId=100",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"sub-category-brands"
							],
							"query": [
								{
									"key": "subCategoryId",
									"value": "100"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Products",
			"item": [
				{
					"name": "Create Product",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"subCategoryBrandId\": \"<integer>\",\n    \"name\": \"<string>\",\n    \"warrantyYear\": \"<integer>\",\n    \"model\": \"<string>\",\n    \"description\": \"<string>\",\n    \"setupRequired\": \"<boolean>\",\n    \"productCode\": \"<string>\"\n}"
						},
						"url": {
							"raw": "{{test-url}}/merchant-products",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"merchant-products"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Products",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"url": {
							"raw": "{{test-url}}/merchant-products?page=1&size=10&mainCategoryId=100&categoryId=100&subCategoryId=100&subCategoryBrandId=100&name=watch",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"merchant-products"
							],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "size",
									"value": "10"
								},
								{
									"key": "mainCategoryId",
									"value": "100"
								},
								{
									"key": "categoryId",
									"value": "100"
								},
								{
									"key": "subCategoryId",
									"value": "100"
								},
								{
									"key": "subCategoryBrandId",
									"value": "100"
								},
								{
									"key": "name",
									"value": "watch"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Product",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"<string>\",\n    \"warrantyYear\": \"<integer>\",\n    \"model\": \"<string>\",\n    \"description\": \"<string>\"\n}"
						},
						"url": {
							"raw": "{{test-url}}/merchant-products/:merchantProductId",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"merchant-products",
								":merchantProductId"
							],
							"variable": [
								{
									"key": "merchantProductId",
									"value": "111"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get ID By Product Code",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"url": {
							"raw": "{{test-url}}/merchant-products/product-code/:productCode",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"merchant-products",
								"product-code",
								":productCode"
							],
							"variable": [
								{
									"key": "productCode",
									"value": "product-code-1-2-3"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Product By ID",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"url": {
							"raw": "{{test-url}}/merchant-products/:merchantProductId",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"merchant-products",
								":merchantProductId"
							],
							"variable": [
								{
									"key": "merchantProductId",
									"value": "111"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Warranties",
			"item": [
				{
					"name": "Send Warranty with Invoice",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "<jwtToken>"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"externalOrderId\": \"<string>\",\n    \"customer\": {\n        \"firstName\": \"<string>\",\n        \"lastName\": \"<string>\",\n        \"email\": \"<string>\",\n        \"phone\": \"<string>\",\n        \"countryCode\": \"<enum>\"\n    },\n    \"products\": [\n        {\n            \"name\": \"<string>\",\n            \"brand\": \"<string>\",\n            \"productCode\": \"<string>\",\n            \"serialNumber\": \"<string>\",\n            \"externalLineId\": \"<string>\",\n            \"purchaseDate\": \"<string>\",\n            \"warrantyExpireDate\": \"<string>\"\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{test-url}}/individual-customers/warranty/invoice/with-product-code",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customers",
								"warranty",
								"invoice",
								"with-product-code"
							]
						}
					},
					"response": []
				},
				{
					"name": "Send Warranty with Product Code",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"productCode\": \"<integer>\",\n    \"firstName\": \"<string>\",\n    \"lastName\": \"<string>\",\n    \"email\": \"<string>\",\n    \"phone\": \"<string>\",\n    \"countryCode\": \"<enum>\",\n    \"externalOrderId\": \"<string>\",\n    \"purchaseDate\": \"<string>\",\n    \"warrantyExpireDate\": \"<string>\"\n}"
						},
						"url": {
							"raw": "{{test-url}}/individual-customers/warranty/with-product-code",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customers",
								"warranty",
								"with-product-code"
							]
						}
					},
					"response": []
				},
				{
					"name": "Bulk Warranty Send",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"warranties\": [\n        {\n            \"merchantProductId\": \"<integer>\",\n            \"firstName\": \"<string>\",\n            \"lastName\": \"<string>\",\n            \"email\": \"<string>\",\n            \"phone\": \"<string>\",\n            \"countryCode\": \"<enum>\",\n            \"externalOrderId\": \"<string>\",\n            \"purchaseDate\": \"<string>\",\n            \"warrantyExpireDate\": \"<string>\"\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{test-url}}/individual-customers/warranty/bulk",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customers",
								"warranty",
								"bulk"
							]
						}
					},
					"response": []
				},
				{
					"name": "Send Warranty",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"merchantProductId\": \"<integer>\",\n    \"firstName\": \"<string>\",\n    \"lastName\": \"<string>\",\n    \"email\": \"<string>\",\n    \"phone\": \"<string>\",\n    \"countryCode\": \"<enum>\",\n    \"externalOrderId\": \"<string>\",\n    \"purchaseDate\": \"<string>\",\n    \"warrantyExpireDate\": \"<string>\"\n}"
						},
						"url": {
							"raw": "{{test-url}}/individual-customers/warranty",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customers",
								"warranty"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Warranties",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"url": {
							"raw": "{{test-url}}/individual-customers/warranty?page=1&size=10&firstName=TEST&lastName=EGARANTI&email=info@egaranti.com&phone=05554443322",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customers",
								"warranty"
							],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "size",
									"value": "10"
								},
								{
									"key": "firstName",
									"value": "TEST"
								},
								{
									"key": "lastName",
									"value": "EGARANTI"
								},
								{
									"key": "email",
									"value": "info@egaranti.com"
								},
								{
									"key": "phone",
									"value": "05554443322"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Warranty By ID",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"url": {
							"raw": "{{test-url}}/individual-customer-products/:individualCustomerProductId",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customer-products",
								":individualCustomerProductId"
							],
							"variable": [
								{
									"key": "individualCustomerProductId",
									"value": "95"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete Warranty",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "<jwtToken>"
							}
						],
						"url": {
							"raw": "{{test-url}}/individual-customer-products/:individualCustomerProductId",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customer-products",
								":individualCustomerProductId"
							],
							"variable": [
								{
									"key": "individualCustomerProductId",
									"value": "111"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Warranty ID by External Order ID",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"url": {
							"raw": "{{test-url}}/individual-customer-products/:externalOrderId",
							"host": [
								"{{test-url}}"
							],
							"path": [
								"individual-customer-products",
								":externalOrderId"
							],
							"variable": [
								{
									"key": "externalOrderId",
									"value": "111"
								}
							]
						}
					},
					"response": []
				}
			]
		}
	]
}