{
  "info": {
    "_postman_id": "2cdf3677-6266-4e96-8517-e57daeb313c7",
    "name": "Kalakhab - Admin Comments",
    "description": "Admin endpoints for listing and moderating product and article comments.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "http://127.0.0.1:8000/api/v1"
    },
    {
      "key": "token",
      "value": ""
    },
    {
      "key": "product_id",
      "value": "7"
    },
    {
      "key": "article_id",
      "value": "1"
    },
    {
      "key": "comment_id",
      "value": "1"
    }
  ],
  "item": [
    {
      "name": "List Comments",
      "item": [
        {
          "name": "List Product Comments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/products/{{product_id}}/comments?status=pending&per_page=15",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "products",
                "{{product_id}}",
                "comments"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "pending",
                  "description": "Allowed: pending, approved, rejected"
                },
                {
                  "key": "per_page",
                  "value": "15"
                }
              ]
            }
          }
        },
        {
          "name": "List Article Comments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/articles/{{article_id}}/comments?status=pending&per_page=15",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "articles",
                "{{article_id}}",
                "comments"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "pending",
                  "description": "Allowed: pending, approved, rejected"
                },
                {
                  "key": "per_page",
                  "value": "15"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Moderation",
      "item": [
        {
          "name": "Approve Comment",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"approved\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/admin/comments/{{comment_id}}/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "comments",
                "{{comment_id}}",
                "status"
              ]
            }
          }
        },
        {
          "name": "Reject Comment",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"rejected\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/admin/comments/{{comment_id}}/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "comments",
                "{{comment_id}}",
                "status"
              ]
            }
          }
        }
      ]
    }
  ]
}
