{
	"info": {
		"_postman_id": "f5a2b3c4-d5e6-4f7g-8h9i-0j1k2l3m4n5o",
		"name": "ZATCA Settings API",
		"description": "Endpoints for managing ZATCA configuration and related company information.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Get ZATCA Settings",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					},
					{
						"key": "Authorization",
						"value": "Bearer {{token}}"
					}
				],
				"url": {
					"raw": "{{base_url}}/api/zatca/settings",
					"host": [
						"{{base_url}}"
					],
					"path": [
						"api",
						"zatca",
						"settings"
					]
				},
				"description": "Retrieve all ZATCA configuration and relevant company information fields."
			},
			"response": []
		},
		{
			"name": "Update ZATCA Settings",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					},
					{
						"key": "Authorization",
						"value": "Bearer {{token}}"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"enabled\": true,\n    \"phase\": \"2\",\n    \"environment\": \"sandbox\",\n    \"debug_mode\": false,\n    \"company_name\": \"My Company\",\n    \"vat_registration_number\": \"300000000000003\",\n    \"business_category\": \"Construction\",\n    \"building_number\": \"1234\",\n    \"street_name\": \"Main Street\",\n    \"district\": \"Al Olaya\",\n    \"city\": \"Riyadh\",\n    \"postal_code\": \"12211\",\n    \"country\": \"SA\",\n    \"auto_generate_invoices\": true,\n    \"auto_submit_invoices\": false,\n    \"qr_code_size\": 200,\n    \"qr_code_position\": \"after_order_details\",\n    \"sandbox_api_url\": \"https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal\",\n    \"simulation_api_url\": \"https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation\",\n    \"production_api_url\": \"https://gw-fatoora.zatca.gov.sa/e-invoicing/core\",\n    \"api_timeout\": 30,\n    \"api_retry_attempts\": 3,\n    \"simulation_otp\": \"123456\",\n    \"production_otp\": null,\n    \"simulation_accept_version\": \"V2\",\n    \"csr_common_name\": \"Common Name\",\n    \"csr_serial_number\": \"1-ABC|2-XYZ|3-123\",\n    \"csr_org_identifier\": \"300000000000003\",\n    \"csr_org_unit\": \"IT\",\n    \"csr_org_name\": \"My Org\",\n    \"csr_country\": \"SA\",\n    \"supported_invoice_types\": [\"standard\", \"simplified\"],\n    \"csr_location\": \"Riyadh\",\n    \"csr_business_category\": \"Construction\",\n    \"email_notifications\": true,\n    \"notification_email\": \"admin@example.com\",\n    \"sync_frequency\": \"hourly\"\n}"
				},
				"url": {
					"raw": "{{base_url}}/api/zatca/settings",
					"host": [
						"{{base_url}}"
					],
					"path": [
						"api",
						"zatca",
						"settings"
					]
				},
				"description": "Update ZATCA settings. Fields are automatically mapped to either 'zatca_settings' or 'additional_settings' in the database."
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "base_url",
			"value": "http://localhost:8000",
			"type": "string"
		},
		{
			"key": "token",
			"value": "YOUR_SANCTUM_TOKEN_HERE",
			"type": "string"
		}
	]
}
