{
	"info": {
		"_postman_id": "supply-order-comments-api",
		"name": "Supply Domain - Supply Order Comments API",
		"description": "API collection for Supply Order Comments Management - Add, view, and manage comments on supply orders",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Supply Order Comments",
			"item": [
				{
					"name": "Get Comments for Order",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{supply_order_id}}/comments?page=1&per_page=15",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"orders",
								"{{supply_order_id}}",
								"comments"
							],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Retrieve paginated comments for a specific supply order with user information"
					},
					"response": []
				},
				{
					"name": "Add Comment to Order",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"comment_text\": \"This order needs urgent attention due to supply chain delays\",\n  \"comment_type\": \"concern\",\n  \"attachment_path\": null,\n  \"is_internal\": false\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{supply_order_id}}/comments",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"orders",
								"{{supply_order_id}}",
								"comments"
							]
						},
						"description": "Add a new comment to a supply order. Comment types: general, concern, approval, rejection. is_internal hides from external users."
					},
					"response": []
				},
				{
					"name": "View Specific Comment",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{supply_order_id}}/comments/{{comment_id}}",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"orders",
								"{{supply_order_id}}",
								"comments",
								"{{comment_id}}"
							]
						},
						"description": "Retrieve details of a specific comment including user information"
					},
					"response": []
				},
				{
					"name": "Delete Comment",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{supply_order_id}}/comments/{{comment_id}}",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"orders",
								"{{supply_order_id}}",
								"comments",
								"{{comment_id}}"
							]
						},
						"description": "Delete (soft delete) a comment. Only the comment author or admin can delete. Use soft delete for audit trail."
					},
					"response": []
				},
				{
					"name": "Get Comments by Type",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{supply_order_id}}/comments/type/concern?page=1&per_page=15",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"orders",
								"{{supply_order_id}}",
								"comments",
								"type",
								"concern"
							],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Retrieve comments filtered by type. Valid types: general, concern, approval, rejection. Results are paginated."
					},
					"response": []
				},
				{
					"name": "Get Comment Count",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{supply_order_id}}/comments/count",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"orders",
								"{{supply_order_id}}",
								"comments",
								"count"
							]
						},
						"description": "Get total number of comments on a specific supply order"
					},
					"response": []
				}
			],
			"description": "Complete supply order comments management API endpoints"
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:8000/api/v1",
			"type": "string"
		},
		{
			"key": "access_token",
			"value": "your_access_token_here",
			"type": "string"
		},
		{
			"key": "supply_order_id",
			"value": "1",
			"type": "string"
		},
		{
			"key": "comment_id",
			"value": "1",
			"type": "string"
		}
	]
}
