{
  "info": {
    "_postman_id": "9bc0001b-452c-4e30-870f-39b4f302f3bb",
    "name": "Descripio Reviews API",
    "description": "Collection aligned to implemented Next.js routes under /api/v1. Auth uses Authorization: Bearer <API_KEY>.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    { "key": "baseUrl", "value": "https://app.descripio.com", "type": "string" },
    { "key": "apiKey", "value": "", "type": "string" },
    { "key": "jobId", "value": "", "type": "string" },
    { "key": "asin", "value": "B08N5WRWNW", "type": "string" },
    { "key": "marketplace", "value": "amazon.de", "type": "string" }
  ],
  "item": [
    {
      "name": "POST /api/v1/reviews/refresh",
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Status is 202', function () { pm.response.to.have.status(202); });",
              "const body = pm.response.json();",
              "if (body.jobId) { pm.collectionVariables.set('jobId', String(body.jobId)); }"
            ]
          }
        }
      ],
      "request": {
        "method": "POST",
        "header": [
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"asin\": \"{{asin}}\",\n  \"marketplace\": \"{{marketplace}}\"\n}",
          "options": { "raw": { "language": "json" } }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/reviews/refresh",
          "host": ["{{baseUrl}}"],
          "path": ["api", "v1", "reviews", "refresh"]
        }
      },
      "response": []
    },
    {
      "name": "GET /api/v1/jobs/{jobId}",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/api/v1/jobs/{{jobId}}",
          "host": ["{{baseUrl}}"],
          "path": ["api", "v1", "jobs", "{{jobId}}"]
        }
      },
      "response": []
    },
    {
      "name": "GET /api/v1/reviews",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/api/v1/reviews?asin={{asin}}",
          "host": ["{{baseUrl}}"],
          "path": ["api", "v1", "reviews"],
          "query": [
            { "key": "asin", "value": "{{asin}}" }
          ]
        }
      },
      "response": []
    }
  ]
}
