{
  "info": {
    "name": "ResidentePro Marketplace API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "http://localhost:8090" },
    { "key": "token", "value": "{{jwt_token}}" }
  ],
  "item": [
    {
      "name": "Products",
      "item": [
        {
          "name": "List Products",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }],
            "url": "{{baseUrl}}/api/v1/products"
          }
        },
        {
          "name": "Create Product",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{token}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"seller_type\": \"RESIDENT\",\n  \"title\": \"Laptop Lenovo\",\n  \"price\": 3500,\n  \"currency\": \"PEN\",\n  \"description\": \"En buen estado\",\n  \"stock\": 1\n}"
            },
            "url": "{{baseUrl}}/api/v1/products"
          }
        },
        {
          "name": "Get Product",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }],
            "url": "{{baseUrl}}/api/v1/products/{{product_uuid}}"
          }
        },
        {
          "name": "Update Product",
          "request": {
            "method": "PUT",
            "header": [
              { "key": "Authorization", "value": "Bearer {{token}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Laptop Lenovo Actualizada\",\n  \"price\": 3200,\n  \"status\": \"PUBLISHED\",\n  \"stock\": 1\n}"
            },
            "url": "{{baseUrl}}/api/v1/products/{{product_uuid}}"
          }
        },
        {
          "name": "Delete Product",
          "request": {
            "method": "DELETE",
            "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }],
            "url": "{{baseUrl}}/api/v1/products/{{product_uuid}}"
          }
        }
      ]
    },
    {
      "name": "Marketplace Feed",
      "request": {
        "method": "GET",
        "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }],
        "url": "{{baseUrl}}/api/v1/marketplace/feed?sort=latest"
      }
    },
    {
      "name": "Presigned Upload URL",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer {{token}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"filename\": \"producto.jpg\",\n  \"content_type\": \"image/jpeg\"\n}"
        },
        "url": "{{baseUrl}}/api/v1/uploads/presigned-url"
      }
    }
  ]
}
