{
    "info": {
        "_postman_id": "lb-app-platform-recently-developed",
        "name": "LB App Platform - Recently Developed APIs",
        "description": "Postman collection for recently developed API endpoints including:\n- Availability Report Drafts (LSR)\n- TM Order Drafts\n- Service Requests (with notifications)\n- Visits & Check-in/Check-out (with geofence notifications)\n- Workflow Executions (with completion notifications)\n- Outlet Status Updates",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "base_url",
            "value": "http://localhost:8000/api/v1",
            "type": "string"
        },
        {
            "key": "token",
            "value": "your-auth-token-here",
            "type": "string"
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{token}}",
                "type": "string"
            }
        ]
    },
    "item": [
        {
            "name": "1. Service Requests",
            "description": "Service Request APIs with notification triggers for: assigned, status change, comment, SLA warning.",
            "item": [
                {
                    "name": "Get SR Categories",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/service-requests/categories",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "service-requests",
                                "categories"
                            ]
                        },
                        "description": "Fetch all available service request categories."
                    }
                },
                {
                    "name": "List Service Requests",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/service-requests?filter=my_requests&status=open&priority=high&overdue_only=false&per_page=25",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "service-requests"
                            ],
                            "query": [
                                {
                                    "key": "filter",
                                    "value": "my_requests",
                                    "description": "Options: my_requests, assigned_to_me"
                                },
                                {
                                    "key": "status",
                                    "value": "open",
                                    "description": "Options: open, assigned, in_progress, resolved, closed",
                                    "disabled": true
                                },
                                {
                                    "key": "priority",
                                    "value": "high",
                                    "description": "Options: low, medium, high, critical",
                                    "disabled": true
                                },
                                {
                                    "key": "overdue_only",
                                    "value": "false",
                                    "description": "Filter only overdue SRs",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "25",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "List service requests with optional filters."
                    }
                },
                {
                    "name": "Create Service Request",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Broken cooler at outlet\",\n    \"description\": \"The display cooler at Grand Horizon Hotel is not working properly. Temperature is not maintained.\",\n    \"category_id\": 1,\n    \"outlet_id\": 24,\n    \"priority\": \"high\",\n    \"sla_due_date\": \"2026-02-26T18:00:00+05:30\",\n    \"assigned_to\": 5\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/service-requests",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "service-requests"
                            ]
                        },
                        "description": "Create a new service request.\n\n📢 **Notification Trigger:** If `assigned_to` is provided, the assignee receives a push notification."
                    }
                },
                {
                    "name": "Get Service Request Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/service-requests/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "service-requests",
                                "1"
                            ]
                        },
                        "description": "Get detailed information about a specific service request including activity log."
                    }
                },
                {
                    "name": "Update SR Status",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": \"in_progress\",\n    \"comment\": \"Starting work on this issue. Will visit the outlet today.\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/service-requests/1/update-status",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "service-requests",
                                "1",
                                "update-status"
                            ]
                        },
                        "description": "Update the status of a service request.\n\n📢 **Notification Triggers:**\n- **Status Change:** Creator, assignee, TM/SM notified\n- **Comment Added:** If comment is provided, creator & assignee notified\n\nValid statuses: `open`, `assigned`, `in_progress`, `resolved`, `closed`, `escalated`"
                    }
                }
            ]
        },
        {
            "name": "2. Visits & Check-in/Check-out",
            "description": "Outlet visit APIs with geofence violation and visit outcome notifications.",
            "item": [
                {
                    "name": "Check-in to Outlet",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"latitude\": 6.9271,\n    \"longitude\": 79.8612,\n    \"purpose\": \"Routine availability check\",\n    \"visit_outcome\": \"completed\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/outlets/24/check-in",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "outlets",
                                "24",
                                "check-in"
                            ]
                        },
                        "description": "Check-in to an outlet. Geofence radius is 200m.\n\n📢 **Notification Trigger:** If check-in is outside geofence range, the assigned TM receives a geofence violation alert.\n\n**Note:** If `within_geofence` is `false` in the response, `remote_checkin_reason` is required."
                    }
                },
                {
                    "name": "Check-in (Remote - Outside Geofence)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"latitude\": 7.2906,\n    \"longitude\": 80.6337,\n    \"purpose\": \"Emergency visit\",\n    \"remote_checkin_reason\": \"GPS signal was weak at the location, checking in from nearby\",\n    \"visit_outcome\": \"completed\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/outlets/24/check-in",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "outlets",
                                "24",
                                "check-in"
                            ]
                        },
                        "description": "Check-in from outside the geofence. Requires `remote_checkin_reason`.\n\n📢 **Notification Trigger:** TM receives a ⚠️ Geofence Alert notification."
                    }
                },
                {
                    "name": "Get Visit Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/visits/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "visits",
                                "1"
                            ]
                        },
                        "description": "Get details of a specific visit including workflows executed."
                    }
                },
                {
                    "name": "Check-out from Outlet",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"visit_outcome\": \"completed\",\n    \"outcome_reason\": \"All tasks completed successfully\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/visits/1/check-out",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "visits",
                                "1",
                                "check-out"
                            ]
                        },
                        "description": "Check-out from an outlet visit.\n\n📢 **Notification Trigger:** If `visit_outcome` is `no_action` or `partial`, TM and SM receive an alert.\n\nValid outcomes: `completed`, `partial`, `no_action`"
                    }
                },
                {
                    "name": "Check-out (Critical Outcome)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"visit_outcome\": \"no_action\",\n    \"outcome_reason\": \"Outlet was closed during visit hours\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/visits/1/check-out",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "visits",
                                "1",
                                "check-out"
                            ]
                        },
                        "description": "Check-out with a critical outcome.\n\n📢 **Notification Trigger:** TM and SM receive Visit Outcome Alert: No Action."
                    }
                },
                {
                    "name": "Visit History",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/visits/history?outlet_id=24&date_from=2026-02-20&date_to=2026-02-24&per_page=25",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "visits",
                                "history"
                            ],
                            "query": [
                                {
                                    "key": "outlet_id",
                                    "value": "24",
                                    "disabled": true
                                },
                                {
                                    "key": "date_from",
                                    "value": "2026-02-20",
                                    "disabled": true
                                },
                                {
                                    "key": "date_to",
                                    "value": "2026-02-24",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "25",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Get visit history for the authenticated user."
                    }
                }
            ]
        },
        {
            "name": "3. Workflow Executions",
            "description": "Workflow execution APIs with completion notification.",
            "item": [
                {
                    "name": "Get Workflows for Outlet",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/outlets/24/main-workflows",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "outlets",
                                "24",
                                "main-workflows"
                            ]
                        },
                        "description": "Get all main workflow groups for a specific outlet."
                    }
                },
                {
                    "name": "Get Workflow Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/workflows/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "workflows",
                                "1"
                            ]
                        },
                        "description": "Get full workflow details including steps, options, and conditions."
                    }
                },
                {
                    "name": "Start Workflow Execution",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"visit_id\": 1,\n    \"outlet_id\": 24,\n    \"resume_step_index\": 0\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/workflows/1/start",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "workflows",
                                "1",
                                "start"
                            ]
                        },
                        "description": "Start a new workflow execution for a visit."
                    }
                },
                {
                    "name": "Check Resume Execution",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/workflows/1/execution/resume?outlet_id=24&visit_id=1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "workflows",
                                "1",
                                "execution",
                                "resume"
                            ],
                            "query": [
                                {
                                    "key": "outlet_id",
                                    "value": "24"
                                },
                                {
                                    "key": "visit_id",
                                    "value": "1"
                                }
                            ]
                        },
                        "description": "Check if a workflow execution can be resumed."
                    }
                },
                {
                    "name": "Get Execution Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/executions/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "executions",
                                "1"
                            ]
                        },
                        "description": "Get details of a workflow execution including responses."
                    }
                },
                {
                    "name": "Submit Step Response",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"step_id\": 1,\n    \"response_value\": \"yes\",\n    \"response_text\": \"Equipment is functioning properly\",\n    \"remarks\": \"Checked all connections\",\n    \"is_skipped\": false,\n    \"photo_urls\": []\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/executions/1/step-response",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "executions",
                                "1",
                                "step-response"
                            ]
                        },
                        "description": "Submit a response for a specific workflow step."
                    }
                },
                {
                    "name": "Save Execution Progress",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"current_step_index\": 2,\n    \"responses\": [\n        {\n            \"step_id\": 1,\n            \"response_value\": \"yes\",\n            \"response_text\": \"OK\",\n            \"remarks\": null,\n            \"is_skipped\": false,\n            \"photo_urls\": []\n        }\n    ]\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/executions/1/progress",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "executions",
                                "1",
                                "progress"
                            ]
                        },
                        "description": "Save partial progress for a workflow execution."
                    }
                },
                {
                    "name": "Get Next Step",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/executions/1/next-step",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "executions",
                                "1",
                                "next-step"
                            ]
                        },
                        "description": "Get the next step to complete in a workflow execution."
                    }
                },
                {
                    "name": "Complete Workflow",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/executions/1/complete",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "executions",
                                "1",
                                "complete"
                            ]
                        },
                        "description": "Mark a workflow execution as completed.\n\n📢 **Notification Trigger:** TM of the outlet is notified about workflow completion."
                    }
                }
            ]
        },
        {
            "name": "4. LSR - Availability Reports",
            "description": "LSR availability report submission and draft management.",
            "item": [
                {
                    "name": "Submit Availability Report",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outlet_id\": 24,\n    \"latitude\": 6.9271,\n    \"longitude\": 79.8612,\n    \"geo_tag_accuracy\": 10.5,\n    \"items\": [\n        {\n            \"posm_product_id\": 1,\n            \"quantity\": 15\n        },\n        {\n            \"posm_product_id\": 2,\n            \"quantity\": 8\n        }\n    ],\n    \"notes\": \"Good stock levels overall\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports"
                            ]
                        },
                        "description": "Submit a final availability report.\n\n📢 **Side Effects:**\n- Outlet status updated to `visited_today`\n- `last_visit_date` updated to now\n- Geo-tag mismatch notification sent to SM if outside 50m"
                    }
                },
                {
                    "name": "List Draft Reports",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports/drafts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports",
                                "drafts"
                            ]
                        },
                        "description": "List all saved availability report drafts for the authenticated LSR."
                    }
                },
                {
                    "name": "Save New Draft",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outlet_id\": 24,\n    \"visit_date\": \"2026-02-24\",\n    \"items\": [\n        {\n            \"posm_product_id\": 1,\n            \"quantity\": 10,\n            \"availability_status\": \"available\"\n        }\n    ],\n    \"general_notes\": \"Partially completed - will finish later\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports/drafts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports",
                                "drafts"
                            ]
                        },
                        "description": "Save a new availability report draft."
                    }
                },
                {
                    "name": "Get Draft Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports/drafts/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports",
                                "drafts",
                                "1"
                            ]
                        },
                        "description": "Get details of a specific draft report."
                    }
                },
                {
                    "name": "Update Existing Draft",
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outlet_id\": 24,\n    \"visit_date\": \"2026-02-24\",\n    \"items\": [\n        {\n            \"posm_product_id\": 1,\n            \"quantity\": 15,\n            \"availability_status\": \"available\"\n        },\n        {\n            \"posm_product_id\": 2,\n            \"quantity\": 8,\n            \"availability_status\": \"low_stock\"\n        }\n    ],\n    \"general_notes\": \"Updated with more items\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports/drafts/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports",
                                "drafts",
                                "1"
                            ]
                        },
                        "description": "Update an existing draft with new data."
                    }
                },
                {
                    "name": "Submit Draft as Report",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports/drafts/1/submit",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports",
                                "drafts",
                                "1",
                                "submit"
                            ]
                        },
                        "description": "Convert a draft into a final submitted report.\n\n📢 **Side Effects:**\n- Draft is deleted\n- Outlet status updated to `visited_today`\n- `last_visit_date` updated"
                    }
                },
                {
                    "name": "Delete Draft",
                    "request": {
                        "method": "DELETE",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/availability-reports/drafts/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "availability-reports",
                                "drafts",
                                "1"
                            ]
                        },
                        "description": "Delete a saved draft."
                    }
                }
            ]
        },
        {
            "name": "5. LSR - Outlets & Orders",
            "description": "LSR outlet and order management endpoints.",
            "item": [
                {
                    "name": "Get Assigned Outlets",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/outlets?search=&filter[status]=pending&latitude=6.9271&longitude=79.8612&limit=20",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "outlets"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "filter[status]",
                                    "value": "pending",
                                    "description": "Options: pending, visited_today, overdue",
                                    "disabled": true
                                },
                                {
                                    "key": "latitude",
                                    "value": "6.9271",
                                    "description": "For distance calculation",
                                    "disabled": true
                                },
                                {
                                    "key": "longitude",
                                    "value": "79.8612",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "20",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Get outlets assigned to the authenticated LSR.\n\nStatus values in response:\n- `pending` (orange) - Not visited yet\n- `visited_today` (green) - Visited today\n- `overdue` (red) - Past scheduled visit date"
                    }
                },
                {
                    "name": "Get Outlet Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/outlets/24?latitude=6.9271&longitude=79.8612",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "outlets",
                                "24"
                            ],
                            "query": [
                                {
                                    "key": "latitude",
                                    "value": "6.9271",
                                    "disabled": true
                                },
                                {
                                    "key": "longitude",
                                    "value": "79.8612",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Get detailed information about a specific outlet including norms."
                    }
                },
                {
                    "name": "Outlet Visit History",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/outlets/24/visit-history?limit=20&offset=0",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "outlets",
                                "24",
                                "visit-history"
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "20",
                                    "disabled": true
                                },
                                {
                                    "key": "offset",
                                    "value": "0",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Get visit history for a specific outlet."
                    }
                },
                {
                    "name": "List LSR Orders",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/orders",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "orders"
                            ]
                        },
                        "description": "List orders assigned to the authenticated LSR."
                    }
                },
                {
                    "name": "Get Order Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/orders/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "orders",
                                "1"
                            ]
                        },
                        "description": "Get detailed information about a specific order."
                    }
                },
                {
                    "name": "Collect Order",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/orders/1/collect",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "orders",
                                "1",
                                "collect"
                            ]
                        },
                        "description": "Mark an order as collected from distribution point."
                    }
                },
                {
                    "name": "Deliver Order",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/orders/1/deliver",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "orders",
                                "1",
                                "deliver"
                            ]
                        },
                        "description": "Mark an order as delivered to outlet."
                    }
                }
            ]
        },
        {
            "name": "6. TM - Orders & Drafts",
            "description": "Territory Manager order creation and draft management.",
            "item": [
                {
                    "name": "Create TM Order",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outlet_id\": 24,\n    \"distribution_point_id\": 5,\n    \"collected_by\": 45,\n    \"delivered_by\": 46,\n    \"items\": [\n        {\n            \"product_id\": 10,\n            \"quantity\": 50\n        },\n        {\n            \"product_id\": 11,\n            \"quantity\": 30\n        }\n    ],\n    \"notes\": \"Priority delivery for event\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders"
                            ]
                        },
                        "description": "Create a new order as Territory Manager."
                    }
                },
                {
                    "name": "List TM Orders",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders"
                            ]
                        },
                        "description": "List all orders created by the authenticated TM."
                    }
                },
                {
                    "name": "Get DP Stock",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/distribution-points/5/stock",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "distribution-points",
                                "5",
                                "stock"
                            ]
                        },
                        "description": "Get available stock at a distribution point."
                    }
                },
                {
                    "name": "List Order Drafts",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders/drafts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders",
                                "drafts"
                            ]
                        },
                        "description": "List all saved order drafts for the authenticated TM."
                    }
                },
                {
                    "name": "Save New Order Draft",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outlet_id\": 24,\n    \"distribution_point_id\": 5,\n    \"collected_by\": 45,\n    \"delivered_by\": 46,\n    \"items\": [\n        {\n            \"product_id\": 10,\n            \"quantity\": 50\n        }\n    ],\n    \"notes\": \"Draft - need to confirm quantities\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders/drafts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders",
                                "drafts"
                            ]
                        },
                        "description": "Save a new order draft."
                    }
                },
                {
                    "name": "Get Order Draft Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders/drafts/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders",
                                "drafts",
                                "1"
                            ]
                        },
                        "description": "Get details of a specific order draft."
                    }
                },
                {
                    "name": "Update Order Draft",
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outlet_id\": 24,\n    \"distribution_point_id\": 5,\n    \"collected_by\": 45,\n    \"delivered_by\": 46,\n    \"items\": [\n        {\n            \"product_id\": 10,\n            \"quantity\": 60\n        },\n        {\n            \"product_id\": 11,\n            \"quantity\": 25\n        }\n    ],\n    \"notes\": \"Updated quantities after confirmation\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders/drafts/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders",
                                "drafts",
                                "1"
                            ]
                        },
                        "description": "Update an existing order draft."
                    }
                },
                {
                    "name": "Submit Order Draft",
                    "request": {
                        "method": "POST",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders/drafts/1/submit",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders",
                                "drafts",
                                "1",
                                "submit"
                            ]
                        },
                        "description": "Convert a draft into a final order.\n\n📢 **Side Effects:**\n- Draft is deleted\n- New order created with status `pending`\n- Stock deducted from distribution point"
                    }
                },
                {
                    "name": "Delete Order Draft",
                    "request": {
                        "method": "DELETE",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/orders/drafts/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "orders",
                                "drafts",
                                "1"
                            ]
                        },
                        "description": "Delete a saved order draft."
                    }
                }
            ]
        },
        {
            "name": "7. TM - Availability Reports",
            "description": "Territory Manager endpoints for viewing availability reports.",
            "item": [
                {
                    "name": "List Availability Reports",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/availability-reports",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "availability-reports"
                            ]
                        },
                        "description": "List availability reports visible to the TM."
                    }
                },
                {
                    "name": "Get Availability Report Details",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/tm/availability-reports/1",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "tm",
                                "availability-reports",
                                "1"
                            ]
                        },
                        "description": "Get detailed information about a specific availability report."
                    }
                }
            ]
        },
        {
            "name": "8. Dashboards & Summaries",
            "description": "Dashboard and daily summary endpoints for LSRs, TMs, and SMs.",
            "item": [
                {
                    "name": "LSR Dashboard",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/dashboard",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "dashboard"
                            ]
                        },
                        "description": "Get the LSR dashboard data including stats, alerts, and recent activity."
                    }
                },
                {
                    "name": "Daily Summary (LSR)",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/lsr/daily-summary",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "lsr",
                                "daily-summary"
                            ]
                        },
                        "description": "Get end-of-day performance summary including visits, reports, and orders."
                    }
                },
                {
                    "name": "SM Executive Dashboard",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/mobile/sm/executive-dashboard",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "mobile",
                                "sm",
                                "executive-dashboard"
                            ]
                        },
                        "description": "Get SM Executive Dashboard metrics including KPI stats, visit compliance, and the Orders Trend Chart data."
                    }
                }
            ]
        },
        {
            "name": "9. Scheduled Commands (Manual Test)",
            "description": "These are artisan commands that run on schedule. Test them manually via terminal:\n\n```bash\n# Check SLA warnings (runs every 30 min)\nphp artisan service-requests:check-sla\n\n# Reset outlet statuses (runs daily at 00:01)\nphp artisan outlets:update-statuses\n```",
            "item": [
                {
                    "name": "📝 Manual Commands Info",
                    "request": {
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "{{base_url}}/../artisan-commands-info",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "..",
                                "artisan-commands-info"
                            ]
                        },
                        "description": "⚠️ This is NOT an API endpoint. These are scheduled artisan commands:\n\n**1. SLA Check (every 30 minutes)**\n```\nphp artisan service-requests:check-sla\n```\n- Sends warning notifications for SRs within 4 hours of SLA deadline\n- Sends breach notifications for SRs past SLA deadline\n- Notifies: assignee, creator, TM, SM\n\n**2. Outlet Status Reset (daily at 00:01)**\n```\nphp artisan outlets:update-statuses\n```\n- Resets `visited_today` → `pending` for yesterday's visits\n- Marks `pending` → `overdue` if past scheduled date\n\n**Run manually to test:**\n```bash\nphp artisan service-requests:check-sla\nphp artisan outlets:update-statuses\n```"
                    }
                }
            ]
        }
    ]
}