{
	"info": {
		"_postman_id": "a7db0fb0-f97c-4b21-8f98-dc48724fda92",
		"name": "Supply Domain - Agents API",
		"description": "Complete API collection for Supply Domain Agents Management with full request/response examples",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "50681087"
	},
	"item": [
		{
			"name": "Agents",
			"item": [
				{
					"name": "List All Agents",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/agents?per_page=15&page=1&search=AGT-001",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents"
							],
							"query": [
								{
									"key": "per_page",
									"value": "15"
								},
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "search",
									"value": "AGT-001"
								}
							]
						},
						"description": "Get list of all active agents with pagination"
					},
					"response": [
						{
							"name": "List All Agents - Success",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/agents",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [
								{
									"key": "Content-Type",
									"value": "application/json"
								}
							],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agents retrieved successfully\",\n  \"data\": {\n    \"data\": [\n      {\n        \"id\": 1,\n        \"user_id\": 1,\n        \"employee_code\": \"AGT-001\",\n        \"department\": \"Sales\",\n        \"commission_rate\": \"5.00\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"updated_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"deleted_at\": null\n      },\n      {\n        \"id\": 2,\n        \"user_id\": 2,\n        \"employee_code\": \"AGT-002\",\n        \"department\": \"supply\",\n        \"commission_rate\": \"3.50\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"updated_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"deleted_at\": null\n      },\n      {\n        \"id\": 3,\n        \"user_id\": 3,\n        \"employee_code\": \"AGT-003\",\n        \"department\": \"Logistics\",\n        \"commission_rate\": \"2.75\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"updated_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"deleted_at\": null\n      }\n    ],\n    \"links\": {\n      \"first\": \"http://localhost:8000/supply/agents?page=1\",\n      \"last\": \"http://localhost:8000/supply/agents?page=1\",\n      \"prev\": null,\n      \"next\": null\n    },\n    \"meta\": {\n      \"current_page\": 1,\n      \"from\": 1,\n      \"last_page\": 1,\n      \"path\": \"http://localhost:8000/supply/agents\",\n      \"per_page\": 15,\n      \"to\": 3,\n      \"total\": 3\n    }\n  },\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Get Agent by ID",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/agents/1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents",
								"1"
							]
						},
						"description": "Get a specific agent by ID"
					},
					"response": [
						{
							"name": "Get Agent - Success",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/agents/1",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents",
										"1"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agent retrieved successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"employee_code\": \"AGT-001\",\n    \"department\": \"Sales\",\n    \"commission_rate\": \"5.00\",\n    \"is_active\": true,\n    \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n    \"updated_at\": \"2025-12-21T10:30:00.000000Z\",\n    \"deleted_at\": null\n  },\n  \"status_code\": 200\n}\n"
						},
						{
							"name": "Get Agent - Not Found",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/agents/999",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents",
										"999"
									]
								}
							},
							"status": "Not Found",
							"code": 404,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": false,\n  \"message\": \"No query results found for model [App\\\\Domains\\\\Supply\\\\Agents\\\\Models\\\\Agent]\",\n  \"status_code\": 404\n}\n"
						}
					]
				},
				{
					"name": "Create Agent",
					"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  \"user_id\": 1,\n  \"employee_code\": \"AGT-006wdqw\",\n  \"department\": \"Sales\",\n  \"commission_rate\": 4.25,\n  \"is_active\": true\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/agents",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents"
							]
						},
						"description": "Create a new agent"
					},
					"response": [
						{
							"name": "Create Agent - Success",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"user_id\": 6,\n  \"employee_code\": \"AGT-006\",\n  \"department\": \"Sales\",\n  \"commission_rate\": 4.25,\n  \"is_active\": true\n}"
								},
								"url": {
									"raw": "http://localhost:8000/supply/agents",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents"
									]
								}
							},
							"status": "Created",
							"code": 201,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agent created successfully\",\n  \"data\": {\n    \"id\": 6,\n    \"user_id\": 6,\n    \"employee_code\": \"AGT-006\",\n    \"department\": \"Sales\",\n    \"commission_rate\": \"4.25\",\n    \"is_active\": true,\n    \"created_at\": \"2025-12-21T12:45:30.000000Z\",\n    \"updated_at\": \"2025-12-21T12:45:30.000000Z\",\n    \"deleted_at\": null\n  },\n  \"status_code\": 201\n}\n"
						},
						{
							"name": "Create Agent - Validation Error",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"user_id\": 6,\n  \"employee_code\": \"AGT-001\",\n  \"department\": \"Sales\"\n}"
								},
								"url": {
									"raw": "http://localhost:8000/supply/agents",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents"
									]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": false,\n  \"message\": \"Validation failed\",\n  \"data\": {\n    \"errors\": {\n      \"employee_code\": [\n        \"The employee code has already been taken.\"\n      ]\n    }\n  },\n  \"status_code\": 422\n}\n"
						}
					]
				},
				{
					"name": "Update Agent",
					"request": {
						"method": "PUT",
						"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  \"user_id\": 1,\n  \"employee_code\": \"AGT-00632\",\n  \"department\": \"Sales\",\n  \"commission_rate\": 4.25,\n  \"is_active\": true\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/agents/1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents",
								"1"
							]
						},
						"description": "Update an existing agent"
					},
					"response": [
						{
							"name": "Update Agent - Success",
							"originalRequest": {
								"method": "PATCH",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"commission_rate\": 5.50,\n  \"department\": \"Senior Sales\"\n}"
								},
								"url": {
									"raw": "http://localhost:8000/supply/agents/1",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents",
										"1"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agent updated successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"employee_code\": \"AGT-001\",\n    \"department\": \"Senior Sales\",\n    \"commission_rate\": \"5.50\",\n    \"is_active\": true,\n    \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n    \"updated_at\": \"2025-12-21T12:50:15.000000Z\",\n    \"deleted_at\": null\n  },\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Delete Agent",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/agents/1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents",
								"1"
							]
						},
						"description": "Delete an agent (soft delete)"
					},
					"response": [
						{
							"name": "Delete Agent - Success",
							"originalRequest": {
								"method": "DELETE",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/agents/1",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents",
										"1"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agent deleted successfully\",\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Restore Agent",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/agents/1/restore",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents",
								"1",
								"restore"
							]
						},
						"description": "Restore a soft-deleted agent"
					},
					"response": [
						{
							"name": "Restore Agent - Success",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/agents/1/restore",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents",
										"1",
										"restore"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agent restored successfully\",\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Get Active Agents",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/agents/filter/active",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"agents",
								"filter",
								"active"
							]
						},
						"description": "Get list of only active agents"
					},
					"response": [
						{
							"name": "Get Active Agents - Success",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/agents/filter/active",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"agents",
										"filter",
										"active"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Agents retrieved successfully\",\n  \"data\": {\n    \"data\": [\n      {\n        \"id\": 1,\n        \"user_id\": 1,\n        \"employee_code\": \"AGT-001\",\n        \"department\": \"Sales\",\n        \"commission_rate\": \"5.00\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"updated_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"deleted_at\": null\n      },\n      {\n        \"id\": 2,\n        \"user_id\": 2,\n        \"employee_code\": \"AGT-002\",\n        \"department\": \"supply\",\n        \"commission_rate\": \"3.50\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"updated_at\": \"2025-12-21T10:30:00.000000Z\",\n        \"deleted_at\": null\n      }\n    ],\n    \"links\": {\n      \"first\": \"http://localhost:8000/supply/agents/filter/active?page=1\",\n      \"last\": \"http://localhost:8000/supply/agents/filter/active?page=1\",\n      \"prev\": null,\n      \"next\": null\n    },\n    \"meta\": {\n      \"current_page\": 1,\n      \"from\": 1,\n      \"last_page\": 1,\n      \"path\": \"http://localhost:8000/supply/agents/filter/active\",\n      \"per_page\": 15,\n      \"to\": 2,\n      \"total\": 2\n    }\n  },\n  \"status_code\": 200\n}\n"
						}
					]
				}
			]
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:8000",
			"type": "string"
		},
		{
			"key": "access_token",
			"value": "your_bearer_token_here",
			"type": "string"
		}
	]
}