{
	"info": {
		"_postman_id": "38007f49-3bde-42a5-8c7c-88423aaebb12",
		"name": "Supply Domain - Suppliers API",
		"description": "Complete API collection for Supply Domain Suppliers Management with full request/response examples",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "50681087"
	},
	"item": [
		{
			"name": "Suppliers",
			"item": [
				{
					"name": "List All Suppliers",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/suppliers?per_page=15&page=1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"suppliers"
							],
							"query": [
								{
									"key": "per_page",
									"value": "15"
								},
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "search",
									"value": "Global",
									"disabled": true
								}
							]
						},
						"description": "Get list of all active suppliers with pagination"
					},
					"response": [
						{
							"name": "List All Suppliers - 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/suppliers",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [
								{
									"key": "Content-Type",
									"value": "application/json"
								}
							],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Suppliers retrieved successfully\",\n  \"data\": {\n    \"data\": [\n      {\n        \"id\": 1,\n        \"name\": \"Global Trading Ltd\",\n        \"email\": \"contact@globaltrading.com\",\n        \"phone\": \"+966501234567\",\n        \"contact_person\": \"Ahmed Al-Rashid\",\n        \"address\": \"123 Business Street, Riyadh\",\n        \"city\": \"Riyadh\",\n        \"country\": \"Saudi Arabia\",\n        \"bank_account\": \"1234567890\",\n        \"tax_number\": \"3100123456789\",\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        \"name\": \"Middle East Suppliers Co\",\n        \"email\": \"info@mesuppliers.com\",\n        \"phone\": \"+966502345678\",\n        \"contact_person\": \"Fatima Al-Dosari\",\n        \"address\": \"456 Commerce Avenue, Jeddah\",\n        \"city\": \"Jeddah\",\n        \"country\": \"Saudi Arabia\",\n        \"bank_account\": \"0987654321\",\n        \"tax_number\": \"3100234567890\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T11:15:00.000000Z\",\n        \"updated_at\": \"2025-12-21T11:15:00.000000Z\",\n        \"deleted_at\": null\n      },\n      {\n        \"id\": 3,\n        \"name\": \"Prime Distribution Network\",\n        \"email\": \"sales@primedistribution.com\",\n        \"phone\": \"+966503456789\",\n        \"contact_person\": \"Mohammed Al-Otaibi\",\n        \"address\": \"789 Industrial Zone, Dammam\",\n        \"city\": \"Dammam\",\n        \"country\": \"Saudi Arabia\",\n        \"bank_account\": \"1122334455\",\n        \"tax_number\": \"3100345678901\",\n        \"is_active\": true,\n        \"created_at\": \"2025-12-21T09:45:00.000000Z\",\n        \"updated_at\": \"2025-12-21T09:45:00.000000Z\",\n        \"deleted_at\": null\n      }\n    ],\n    \"links\": {\n      \"first\": \"http://localhost:8000/supply/suppliers?page=1\",\n      \"last\": \"http://localhost:8000/supply/suppliers?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/suppliers\",\n      \"per_page\": 15,\n      \"to\": 3,\n      \"total\": 3\n    }\n  },\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Get Supplier 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/suppliers/1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"suppliers",
								"1"
							]
						},
						"description": "Get a specific supplier by ID"
					},
					"response": [
						{
							"name": "Get Supplier - Success",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/suppliers/1",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers",
										"1"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Supplier retrieved successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"name\": \"Global Trading Ltd\",\n    \"email\": \"contact@globaltrading.com\",\n    \"phone\": \"+966501234567\",\n    \"contact_person\": \"Ahmed Al-Rashid\",\n    \"address\": \"123 Business Street, Riyadh\",\n    \"city\": \"Riyadh\",\n    \"country\": \"Saudi Arabia\",\n    \"bank_account\": \"1234567890\",\n    \"tax_number\": \"3100123456789\",\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 Supplier - Not Found",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/suppliers/999",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers",
										"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\\\\SubDomains\\\\Suppliers\\\\Models\\\\Supplier]\",\n  \"status_code\": 404\n}\n"
						}
					]
				},
				{
					"name": "Create Supplier",
					"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  \"supplier_code\": \"SUP-00122\",\n  \"name\": \"Global Trading Ltd\",\n  \"email\": \"contact@globaltrading.com\",\n  \"phone\": \"+966501234567\",\n  \"tax_id\": \"3100123456789\",\n  \"payment_terms\": \"30 days\",\n  \"rating\": 4.50,\n  \"is_active\": true\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/suppliers",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"suppliers"
							]
						},
						"description": "Create a new supplier"
					},
					"response": [
						{
							"name": "Create Supplier - 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  \"name\": \"Premium Import Export\",\n  \"email\": \"sales@premiumimport.com\",\n  \"phone\": \"+966504567890\",\n  \"contact_person\": \"Sara Al-Qahtani\",\n  \"address\": \"321 Market District, Riyadh\",\n  \"city\": \"Riyadh\",\n  \"country\": \"Saudi Arabia\",\n  \"bank_account\": \"5566778899\",\n  \"tax_number\": \"3100456789012\",\n  \"is_active\": true\n}"
								},
								"url": {
									"raw": "http://localhost:8000/supply/suppliers",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers"
									]
								}
							},
							"status": "Created",
							"code": 201,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Supplier created successfully\",\n  \"data\": {\n    \"id\": 4,\n    \"name\": \"Premium Import Export\",\n    \"email\": \"sales@premiumimport.com\",\n    \"phone\": \"+966504567890\",\n    \"contact_person\": \"Sara Al-Qahtani\",\n    \"address\": \"321 Market District, Riyadh\",\n    \"city\": \"Riyadh\",\n    \"country\": \"Saudi Arabia\",\n    \"bank_account\": \"5566778899\",\n    \"tax_number\": \"3100456789012\",\n    \"is_active\": true,\n    \"created_at\": \"2025-12-21T14:20:30.000000Z\",\n    \"updated_at\": \"2025-12-21T14:20:30.000000Z\",\n    \"deleted_at\": null\n  },\n  \"status_code\": 201\n}\n"
						},
						{
							"name": "Create Supplier - 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  \"name\": \"Global Trading Ltd\",\n  \"email\": \"invalid-email\",\n  \"phone\": \"+966504567890\"\n}"
								},
								"url": {
									"raw": "http://localhost:8000/supply/suppliers",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers"
									]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": false,\n  \"message\": \"Validation failed\",\n  \"data\": {\n    \"errors\": {\n      \"name\": [\n        \"The name has already been taken.\"\n      ],\n      \"email\": [\n        \"The email field must be a valid email.\"\n      ],\n      \"tax_number\": [\n        \"The tax number field is required.\"\n      ]\n    }\n  },\n  \"status_code\": 422\n}\n"
						}
					]
				},
				{
					"name": "Update Supplier",
					"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  \"supplier_code\": \"SUP-0012222\",\n  \"name\": \"Global Trading Ltd\",\n  \"email\": \"contact@globaltrading.com\",\n  \"phone\": \"+966501234567\",\n  \"tax_id\": \"3100123456789\",\n  \"payment_terms\": \"30 days\",\n  \"rating\": 4.50,\n  \"is_active\": true\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/suppliers/1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"suppliers",
								"1"
							]
						},
						"description": "Update an existing supplier"
					},
					"response": [
						{
							"name": "Update Supplier - Success",
							"originalRequest": {
								"method": "PUT",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"phone\": \"+966505678901\",\n  \"contact_person\": \"Dr. Ahmed Al-Rashid\",\n  \"address\": \"125 Business Street, Riyadh\",\n  \"is_active\": true\n}"
								},
								"url": {
									"raw": "http://localhost:8000/supply/suppliers/1",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers",
										"1"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Supplier updated successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"name\": \"Global Trading Ltd\",\n    \"email\": \"contact@globaltrading.com\",\n    \"phone\": \"+966505678901\",\n    \"contact_person\": \"Dr. Ahmed Al-Rashid\",\n    \"address\": \"125 Business Street, Riyadh\",\n    \"city\": \"Riyadh\",\n    \"country\": \"Saudi Arabia\",\n    \"bank_account\": \"1234567890\",\n    \"tax_number\": \"3100123456789\",\n    \"is_active\": true,\n    \"created_at\": \"2025-12-21T10:30:00.000000Z\",\n    \"updated_at\": \"2025-12-21T15:30:45.000000Z\",\n    \"deleted_at\": null\n  },\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Delete Supplier",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/suppliers/1",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"suppliers",
								"1"
							]
						},
						"description": "Delete a supplier (soft delete)"
					},
					"response": [
						{
							"name": "Delete Supplier - Success",
							"originalRequest": {
								"method": "DELETE",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/suppliers/1",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers",
										"1"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Supplier deleted successfully\",\n  \"status_code\": 200\n}\n"
						}
					]
				},
				{
					"name": "Restore Supplier",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{access_token}}",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/supply/suppliers/5/restore",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [
								"supply",
								"suppliers",
								"5",
								"restore"
							]
						},
						"description": "Restore a soft-deleted supplier"
					},
					"response": [
						{
							"name": "Restore Supplier - Success",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer token",
										"type": "text"
									}
								],
								"url": {
									"raw": "http://localhost:8000/supply/suppliers/1/restore",
									"protocol": "http",
									"host": [
										"localhost"
									],
									"port": "8000",
									"path": [
										"supply",
										"suppliers",
										"1",
										"restore"
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "Text",
							"header": [],
							"cookie": [],
							"body": "{\n  \"success\": true,\n  \"message\": \"Supplier restored successfully\",\n  \"status_code\": 200\n}\n"
						}
					]
				}
			]
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:8000/api/v1",
			"type": "string"
		},
		{
			"key": "access_token",
			"value": "your_bearer_token_here",
			"type": "string"
		}
	]
}