{
  "info": {
    "_postman_id": "2f2557d2-1376-4e50-a78f-ec6f0640d4c8",
    "name": "Sepolo Public API",
    "description": "Developer starter collection for every exposed Sepolo Public API v1 endpoint. Import the collection, set api_key, then start with GET /api/v1/me.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "X-Sepolo-Api-Key", "type": "string" },
      { "key": "value", "value": "{{api_key}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "pm.test('Request completed', function () {",
          "  pm.expect(pm.response.code).to.be.oneOf([200, 201, 204, 400, 401, 403, 404]);",
          "});"
        ]
      }
    }
  ],
  "variable": [
    { "key": "base_url", "value": "https://api.sepolo.app", "type": "string" },
    { "key": "api_key", "value": "sep_live_your_api_key", "type": "string" },
    { "key": "assetId", "value": "00000000-0000-0000-0000-000000000000", "type": "string" },
    { "key": "deviceId", "value": "SEP-DEVICE-001", "type": "string" },
    { "key": "serviceReportId", "value": "00000000-0000-0000-0000-000000000000", "type": "string" },
    { "key": "fromUtc", "value": "2026-05-01T00:00:00Z", "type": "string" },
    { "key": "toUtc", "value": "2026-05-31T23:59:59Z", "type": "string" },
    { "key": "cursor", "value": "", "type": "string" }
  ],
  "item": [
    {
      "name": "Getting started",
      "item": [
        {
          "name": "GET /api/v1/me",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/me",
            "description": "Returns integration identity, organization, scopes, API version, rate-limit metadata and allowed groups/customers."
          }
        }
      ]
    },
    {
      "name": "Assets",
      "item": [
        {
          "name": "GET /api/v1/assets",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/assets?updatedSince={{fromUtc}}&groupId=&customerId=&status=active&pageSize=100&cursor={{cursor}}",
            "description": "Lists organization assets. Supports updatedSince, groupId, customerId, status, pageSize and cursor."
          }
        },
        {
          "name": "GET /api/v1/assets/{assetId}",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/assets/{{assetId}}",
            "description": "Returns one asset by id."
          }
        },
        {
          "name": "GET /api/v1/assets/{assetId}/children",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/assets/{{assetId}}/children?pageSize=100&cursor={{cursor}}",
            "description": "Returns child assets for a parent asset."
          }
        }
      ]
    },
    {
      "name": "Devices and telemetry",
      "item": [
        {
          "name": "GET /api/v1/devices",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/devices?updatedSince={{fromUtc}}&groupId=&status=&pageSize=100&cursor={{cursor}}",
            "description": "Lists organization devices. Supports updatedSince, groupId, status, pageSize and cursor."
          }
        },
        {
          "name": "GET /api/v1/devices/{deviceId}",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/devices/{{deviceId}}",
            "description": "Returns one device by id."
          }
        },
        {
          "name": "GET /api/v1/devices/{deviceId}/telemetry",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/devices/{{deviceId}}/telemetry?from={{fromUtc}}&to={{toUtc}}&metrics=temperature,humidity,battery,current&pageSize=500&cursor={{cursor}}",
            "description": "Returns telemetry for a device. from/to are required and the maximum window is 31 days."
          }
        },
        {
          "name": "GET /api/v1/devices/{deviceId}/movements",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/devices/{{deviceId}}/movements?from={{fromUtc}}&to={{toUtc}}&minDurationSeconds=0&pageSize=500&cursor={{cursor}}",
            "description": "Returns movement windows for a device. from/to are required."
          }
        }
      ]
    },
    {
      "name": "Service",
      "item": [
        {
          "name": "GET /api/v1/incidents",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/incidents?fromUtc={{fromUtc}}&toUtc={{toUtc}}&deviceId=&state=&pageSize=100&cursor={{cursor}}",
            "description": "Lists organization incidents."
          }
        },
        {
          "name": "GET /api/v1/service-reports",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/service-reports?fromUtc={{fromUtc}}&toUtc={{toUtc}}&assetId=&deviceId=&state=&pageSize=100&cursor={{cursor}}",
            "description": "Lists service reports."
          }
        },
        {
          "name": "GET /api/v1/service-reports/{serviceReportId}",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/service-reports/{{serviceReportId}}",
            "description": "Returns one service report."
          }
        },
        {
          "name": "POST /api/v1/service-reports",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": "{{base_url}}/api/v1/service-reports",
            "description": "Creates a service report. Requires the service_reports.write scope.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"assetId\": \"{{assetId}}\",\n  \"serviceVisitId\": null,\n  \"reasonForService\": \"Partner-created service report\",\n  \"type\": \"00000000-0000-0000-0000-000000000000\",\n  \"state\": 1,\n  \"dateOfArrival\": \"{{fromUtc}}\",\n  \"dateStartOfInspection\": \"{{fromUtc}}\",\n  \"dateEndOfInspection\": \"{{toUtc}}\",\n  \"actualStartOfInspection\": null,\n  \"actualEndOfInspection\": null,\n  \"workShopLocation\": \"External integration\",\n  \"externalSystem\": \"Partner\",\n  \"externalCustomerId\": \"C-1000\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "GET /api/v1/service-visits",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/service-visits?fromUtc={{fromUtc}}&toUtc={{toUtc}}",
            "description": "Lists service visits for a date window."
          }
        },
        {
          "name": "GET /api/v1/appointments",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/appointments?fromUtc={{fromUtc}}&toUtc={{toUtc}}&userId=",
            "description": "Lists appointments for a date window."
          }
        }
      ]
    },
    {
      "name": "Customers, vendors and inventory",
      "item": [
        {
          "name": "GET /api/v1/customers",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/customers?externalSystem=&pageSize=100&cursor={{cursor}}",
            "description": "Lists customer directory records."
          }
        },
        {
          "name": "GET /api/v1/vendors",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/vendors",
            "description": "Lists vendors."
          }
        },
        {
          "name": "GET /api/v1/inventory/parts",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/inventory/parts?vendorId=&status=active&pageSize=100&cursor={{cursor}}",
            "description": "Lists inventory parts."
          }
        }
      ]
    },
    {
      "name": "Reporting",
      "item": [
        {
          "name": "GET /api/v1/reporting/assets-summary",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/reporting/assets-summary",
            "description": "Returns summarized asset counts and cost totals."
          }
        },
        {
          "name": "GET /api/v1/reporting/service-performance",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/reporting/service-performance?fromUtc={{fromUtc}}&toUtc={{toUtc}}",
            "description": "Returns service visit performance for a date window."
          }
        },
        {
          "name": "GET /api/v1/reporting/telemetry-daily",
          "request": {
            "method": "GET",
            "header": [{ "key": "Accept", "value": "application/json" }],
            "url": "{{base_url}}/api/v1/reporting/telemetry-daily?fromUtc={{fromUtc}}&toUtc={{toUtc}}&deviceId=",
            "description": "Returns daily telemetry aggregates."
          }
        }
      ]
    }
  ]
}
