{
  "info": {
    "name": "SmileSense API Collection",
    "description": "Official Postman collection for the SmileSense Integration API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.0.0"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{API_KEY}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://smilesense.gr/api/v1/integration",
      "type": "string"
    },
    {
      "key": "API_KEY",
      "value": "sk_live_your_api_key_here",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Submit Feedback",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"store_code\": \"IR-ATH-01\",\n  \"idempotency_key\": \"unique-request-{{$timestamp}}\",\n  \"events\": [\n    {\n      \"sentiment\": \"happy\",\n      \"timestamp\": \"{{$isoTimestamp}}\",\n      \"source\": \"api\"\n    }\n  ]\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/feedback",
          "host": ["{{baseUrl}}"],
          "path": ["feedback"]
        },
        "description": "Submit customer feedback events to SmileSense"
      },
      "response": [
        {
          "name": "Success Response",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"store_code\": \"IR-ATH-01\",\n  \"idempotency_key\": \"unique-request-123\",\n  \"events\": [\n    {\n      \"sentiment\": \"happy\",\n      \"timestamp\": \"2024-01-15T10:30:00Z\",\n      \"source\": \"api\"\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/feedback",
              "host": ["{{baseUrl}}"],
              "path": ["feedback"]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"status\": \"processed\",\n  \"data\": {\n    \"processed\": 1,\n    \"skipped\": 0\n  },\n  \"idempotency_key\": \"unique-request-123\"\n}"
        }
      ]
    },
    {
      "name": "Get Store Analytics",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/stores/123/summary?from=2024-01-01&to=2024-01-31",
          "host": ["{{baseUrl}}"],
          "path": ["stores", "123", "summary"],
          "query": [
            {
              "key": "from",
              "value": "2024-01-01",
              "description": "Start date (YYYY-MM-DD)"
            },
            {
              "key": "to",
              "value": "2024-01-31",
              "description": "End date (YYYY-MM-DD)"
            },
            {
              "key": "timezone",
              "value": "Europe/Athens",
              "description": "Timezone (optional)",
              "disabled": true
            }
          ]
        },
        "description": "Retrieve store analytics summary for a date range"
      },
      "response": [
        {
          "name": "Success Response",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/stores/123/summary?from=2024-01-01&to=2024-01-31",
              "host": ["{{baseUrl}}"],
              "path": ["stores", "123", "summary"],
              "query": [
                {
                  "key": "from",
                  "value": "2024-01-01"
                },
                {
                  "key": "to",
                  "value": "2024-01-31"
                }
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"data\": {\n    \"store\": {\n      \"id\": 123,\n      \"code\": \"IR-ATH-01\",\n      \"name\": \"Athens Store\",\n      \"timezone\": \"Europe/Athens\"\n    },\n    \"period\": {\n      \"from\": \"2024-01-01\",\n      \"to\": \"2024-01-31\",\n      \"timezone\": \"Europe/Athens\"\n    },\n    \"summary\": {\n      \"total_feedback\": 1250,\n      \"net_sentiment_score\": 56,\n      \"happiness_ratio\": 68,\n      \"dissatisfaction_index\": 22,\n      \"sentiment_breakdown\": {\n        \"happy\": 850,\n        \"ok\": 125,\n        \"not_happy\": 75,\n        \"sad\": 200\n      },\n      \"sentiment_percentages\": {\n        \"happy\": 68,\n        \"ok\": 10,\n        \"not_happy\": 6,\n        \"sad\": 16\n      }\n    },\n    \"daily_data\": []\n  }\n}"
        }
      ]
    }
  ]
}