{
  "info": {
    "name": "Grading Policy APIs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "base_url", "value": "http://192.168.100.32:8000/api/v1" },
    { "key": "token", "value": "" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{token}}", "type": "string" }]
  },
  "item": [
    {
      "name": "Get All Grading Policies",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/grading-policies?paginate=false",
          "host": ["{{base_url}}"],
          "path": ["grading-policies"],
          "query": [
            { "key": "paginate", "value": "false" },
            { "key": "branch_id", "value": "1", "disabled": true },
            { "key": "is_active", "value": "1", "disabled": true },
            { "key": "search", "value": "", "disabled": true }
          ]
        }
      }
    },
    {
      "name": "Get Grading Policy By Branch",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/grading-policies/by-branch?branch_id=1",
          "host": ["{{base_url}}"],
          "path": ["grading-policies", "by-branch"],
          "query": [
            { "key": "branch_id", "value": "1" }
          ]
        }
      }
    },
    {
      "name": "Get Single Grading Policy",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/grading-policies/1",
          "host": ["{{base_url}}"],
          "path": ["grading-policies", "1"]
        }
      }
    },
    {
      "name": "Create Grading Policy Grade",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"branch_id\": 1,\n  \"marks_from\": 90,\n  \"marks_to\": 100,\n  \"grade\": \"A+\",\n  \"result\": \"Pass\",\n  \"remarks\": \"Exceptional\",\n  \"color\": \"green\",\n  \"level\": \"Level Excellent\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/grading-policies",
          "host": ["{{base_url}}"],
          "path": ["grading-policies"]
        }
      }
    },
    {
      "name": "Update Grading Policy Grade",
      "request": {
        "method": "PUT",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"marks_from\": 90,\n  \"marks_to\": 100,\n  \"grade\": \"A+\",\n  \"result\": \"Pass\",\n  \"remarks\": \"Exceptional\",\n  \"color\": \"green\",\n  \"level\": \"Level Excellent\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/grading-policies/1",
          "host": ["{{base_url}}"],
          "path": ["grading-policies", "1"]
        }
      }
    },
    {
      "name": "Delete Grading Policy Grade",
      "request": {
        "method": "DELETE",
        "url": {
          "raw": "{{base_url}}/grading-policies/1",
          "host": ["{{base_url}}"],
          "path": ["grading-policies", "1"]
        }
      }
    },
    {
      "name": "Bulk Save Grading Policy",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"branch_id\": 1,\n  \"grades\": [\n    { \"marks_from\": 0, \"marks_to\": 32, \"grade\": \"F\", \"result\": \"Fail\", \"remarks\": \"Unsatisfactory\", \"color\": \"red\", \"level\": \"Level Poor\" },\n    { \"marks_from\": 33, \"marks_to\": 39, \"grade\": \"E\", \"result\": \"Pass\", \"remarks\": \"Below Average\", \"color\": \"gray\", \"level\": \"Level Needs Improvement\" },\n    { \"marks_from\": 40, \"marks_to\": 49, \"grade\": \"D\", \"result\": \"Pass\", \"remarks\": \"Average\", \"color\": \"yellow\", \"level\": \"Level Average\" },\n    { \"marks_from\": 50, \"marks_to\": 59, \"grade\": \"D+\", \"result\": \"Pass\", \"remarks\": \"Above Average\", \"color\": \"orange\", \"level\": \"Level Above Average\" },\n    { \"marks_from\": 60, \"marks_to\": 69, \"grade\": \"C\", \"result\": \"Pass\", \"remarks\": \"Fairly Good\", \"color\": \"blue\", \"level\": \"Level Good\" },\n    { \"marks_from\": 70, \"marks_to\": 76, \"grade\": \"C+\", \"result\": \"Pass\", \"remarks\": \"Good\", \"color\": \"blue\", \"level\": \"Level Good\" },\n    { \"marks_from\": 77, \"marks_to\": 81, \"grade\": \"B\", \"result\": \"Pass\", \"remarks\": \"Very Good\", \"color\": \"blue\", \"level\": \"Level Good\" },\n    { \"marks_from\": 82, \"marks_to\": 86, \"grade\": \"B+\", \"result\": \"Pass\", \"remarks\": \"Excellent\", \"color\": \"green\", \"level\": \"Level Excellent\" },\n    { \"marks_from\": 87, \"marks_to\": 89, \"grade\": \"A\", \"result\": \"Pass\", \"remarks\": \"Outstanding\", \"color\": \"green\", \"level\": \"Level Excellent\" },\n    { \"marks_from\": 90, \"marks_to\": 100, \"grade\": \"A+\", \"result\": \"Pass\", \"remarks\": \"Exceptional\", \"color\": \"green\", \"level\": \"Level Excellent\" }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/grading-policies/bulk-save",
          "host": ["{{base_url}}"],
          "path": ["grading-policies", "bulk-save"]
        }
      }
    }
  ]
}
