{
	"info": {
		"_postman_id": "notice-api-2026-03-12",
		"name": "SahajMobile Notice API",
		"description": "API endpoints for Shop Notice/Announcement feature.\n\nBase URL: Your server URL (e.g., http://localhost:8000)\n\nAll endpoints use POST method and require shop_id parameter.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"variable": [
		{
			"key": "base_url",
			"value": "http://localhost:8000",
			"type": "string"
		},
		{
			"key": "shop_id",
			"value": "2",
			"type": "string"
		}
	],
	"item": [
		{
			"name": "1. Get All Notices",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "shop_id",
							"value": "{{shop_id}}",
							"description": "Required: Shop ID",
							"type": "text"
						},
						{
							"key": "page",
							"value": "1",
							"description": "Optional: Page number (default: 1)",
							"type": "text"
						},
						{
							"key": "limit",
							"value": "20",
							"description": "Optional: Items per page (default: 20, max: 50)",
							"type": "text"
						},
						{
							"key": "unread_only",
							"value": "0",
							"description": "Optional: 1 = only unread notices, 0 = all",
							"type": "text"
						},
						{
							"key": "lang",
							"value": "all",
							"description": "Optional: en | bn | all (default: all)",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{base_url}}/api/get_notices",
					"host": ["{{base_url}}"],
					"path": ["api", "get_notices"]
				},
				"description": "Get all notices for a shop with pagination.\n\nResponse includes:\n- notices array\n- pagination info\n- unread_count"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "POST",
						"body": {
							"mode": "urlencoded",
							"urlencoded": [
								{"key": "shop_id", "value": "2"},
								{"key": "page", "value": "1"},
								{"key": "limit", "value": "20"}
							]
						},
						"url": {"raw": "{{base_url}}/api/get_notices"}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"body": "{\n  \"response\": \"success\",\n  \"status\": 1,\n  \"message\": \"Notices retrieved successfully\",\n  \"result\": {\n    \"notices\": [\n      {\n        \"id\": 1,\n        \"title\": \"Important Policy Update\",\n        \"title_bn\": \"গুরুত্বপূর্ণ নীতি আপডেট\",\n        \"content\": \"Please review the new EMI policy...\",\n        \"content_bn\": \"নতুন EMI নীতি পর্যালোচনা করুন...\",\n        \"priority\": \"high\",\n        \"priority_color\": \"#f0ad4e\",\n        \"type\": \"broadcast\",\n        \"is_read\": false,\n        \"read_at\": null,\n        \"created_at\": \"2026-03-12 10:30:00\",\n        \"created_at_formatted\": \"12 Mar 2026, 10:30 AM\"\n      }\n    ],\n    \"pagination\": {\n      \"current_page\": 1,\n      \"per_page\": 20,\n      \"total\": 5,\n      \"total_pages\": 1\n    },\n    \"unread_count\": 3\n  }\n}"
				}
			]
		},
		{
			"name": "2. Get Unread Count",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "shop_id",
							"value": "{{shop_id}}",
							"description": "Required: Shop ID",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{base_url}}/api/get_notices_unread_count",
					"host": ["{{base_url}}"],
					"path": ["api", "get_notices_unread_count"]
				},
				"description": "Get count of unread notices for badge display."
			},
			"response": [
				{
					"name": "Success Response",
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"body": "{\n  \"response\": \"success\",\n  \"status\": 1,\n  \"message\": \"Unread count retrieved\",\n  \"result\": {\n    \"unread_count\": 3\n  }\n}"
				}
			]
		},
		{
			"name": "3. Get Single Notice",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "shop_id",
							"value": "{{shop_id}}",
							"description": "Required: Shop ID",
							"type": "text"
						},
						{
							"key": "notice_id",
							"value": "1",
							"description": "Required: Notice ID",
							"type": "text"
						},
						{
							"key": "lang",
							"value": "all",
							"description": "Optional: en | bn | all",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{base_url}}/api/get_notice",
					"host": ["{{base_url}}"],
					"path": ["api", "get_notice"]
				},
				"description": "Get details of a single notice.\n\nNote: Only returns notices the shop has access to (broadcast or targeted to this shop)."
			},
			"response": [
				{
					"name": "Success Response",
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"body": "{\n  \"response\": \"success\",\n  \"status\": 1,\n  \"message\": \"Notice retrieved successfully\",\n  \"result\": {\n    \"id\": 1,\n    \"title\": \"Important Policy Update\",\n    \"title_bn\": \"গুরুত্বপূর্ণ নীতি আপডেট\",\n    \"content\": \"Please review the new EMI policy effective from next week.\",\n    \"content_bn\": \"পরের সপ্তাহ থেকে কার্যকর নতুন EMI নীতি পর্যালোচনা করুন।\",\n    \"priority\": \"high\",\n    \"priority_color\": \"#f0ad4e\",\n    \"type\": \"broadcast\",\n    \"is_read\": false,\n    \"read_at\": null,\n    \"created_at\": \"2026-03-12 10:30:00\",\n    \"created_at_formatted\": \"12 Mar 2026, 10:30 AM\"\n  }\n}"
				},
				{
					"name": "Not Found Response",
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"body": "{\n  \"response\": \"failure\",\n  \"status\": 0,\n  \"message\": \"Notice not found or not available for your shop\"\n}"
				}
			]
		},
		{
			"name": "4. Mark Notice as Read",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "shop_id",
							"value": "{{shop_id}}",
							"description": "Required: Shop ID",
							"type": "text"
						},
						{
							"key": "notice_id",
							"value": "1",
							"description": "Required: Notice ID",
							"type": "text"
						},
						{
							"key": "user_id",
							"value": "",
							"description": "Optional: User ID of shop manager",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{base_url}}/api/mark_notice_read",
					"host": ["{{base_url}}"],
					"path": ["api", "mark_notice_read"]
				},
				"description": "Mark a single notice as read.\n\nCall this when user opens/views a notice."
			},
			"response": [
				{
					"name": "Success Response",
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"body": "{\n  \"response\": \"success\",\n  \"status\": 1,\n  \"message\": \"Notice marked as read\"\n}"
				}
			]
		},
		{
			"name": "5. Mark All Notices as Read",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "shop_id",
							"value": "{{shop_id}}",
							"description": "Required: Shop ID",
							"type": "text"
						},
						{
							"key": "user_id",
							"value": "",
							"description": "Optional: User ID of shop manager",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{base_url}}/api/mark_all_notices_read",
					"host": ["{{base_url}}"],
					"path": ["api", "mark_all_notices_read"]
				},
				"description": "Mark all unread notices as read.\n\nUseful for a \"Mark all as read\" button."
			},
			"response": [
				{
					"name": "Success Response",
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"body": "{\n  \"response\": \"success\",\n  \"status\": 1,\n  \"message\": \"Marked 5 notices as read\"\n}"
				}
			]
		}
	]
}
