{
  "info": {
    "name": "Rights Catalog API",
    "_postman_id": "d1b0e2c3-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "description": "Postman collection for testing Rights Catalog Django API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Register User",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"username\": \"testuser\",\n    \"email\": \"test@example.com\",\n    \"password\": \"TestPassword123\"\n}"
        },
        "url": {
          "raw": "http://localhost:8000/api/auth/register/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api", "auth", "register"]
        }
      },
      "response": []
    },
    {
      "name": "Login (JWT)",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"username\": \"testuser\",\n    \"password\": \"TestPassword123\"\n}"
        },
        "url": {
          "raw": "http://localhost:8000/api/auth/token/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","auth","token"]
        }
      },
      "response": []
    },
    {
      "name": "Refresh JWT Token",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"refresh\": \"<REFRESH_TOKEN>\"\n}"
        },
        "url": {
          "raw": "http://localhost:8000/api/auth/token/refresh/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","auth","token","refresh"]
        }
      },
      "response": []
    },
    {
      "name": "List Books",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "http://localhost:8000/api/books/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","books"]
        }
      },
      "response": []
    },
    {
      "name": "Search Books",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "http://localhost:8000/api/books/?search=Example&category=Fiction&rights=TRANSLATION",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","books"],
          "query": [
            { "key": "search", "value": "Example" },
            { "key": "category", "value": "Fiction" },
            { "key": "rights", "value": "TRANSLATION" }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Book Details",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "http://localhost:8000/api/books/1/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","books","1"]
        }
      },
      "response": []
    },
    {
      "name": "Add Book Right to Cart",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" },
          { "key": "Authorization", "value": "Bearer <ACCESS_TOKEN>" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"book_right_id\": 1,\n    \"quantity\": 1\n}"
        },
        "url": {
          "raw": "http://localhost:8000/api/cart/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","cart"]
        }
      },
      "response": []
    },
    {
      "name": "View Cart",
      "request": {
        "method": "GET",
        "header": [
          { "key": "Authorization", "value": "Bearer <ACCESS_TOKEN>" }
        ],
        "url": {
          "raw": "http://localhost:8000/api/cart/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","cart"]
        }
      },
      "response": []
    },
    {
      "name": "Checkout Cart",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer <ACCESS_TOKEN>" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{}"
        },
        "url": {
          "raw": "http://localhost:8000/api/cart/checkout/",
          "protocol": "http",
          "host": ["localhost"],
          "port": "8000",
          "path": ["api","cart","checkout"]
        }
      },
      "response": []
    }
  ]
}
