{
  "info": {
    "_postman_id": "dc1f76f1-acde-41d6-b72e-94301b3a8100",
    "name": "DecisioQ API 7.6.3",
    "description": "Server-side authentication, validation, execution, discovery, and usage requests. Never export populated secrets.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Authentication",
      "item": [
        {
          "name": "Issue DecisioQ JWT",
          "event": [{
            "listen": "test",
            "script": {
              "exec": [
                "pm.test('Token issued', () => pm.response.to.have.status(200));",
                "const body = pm.response.json();",
                "pm.expect(body.jwtToken).to.be.a('string').and.not.empty;",
                "pm.environment.set('jwtToken', body.jwtToken);"
              ],
              "type": "text/javascript"
            }
          }],
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"clientId\": \"{{clientId}}\",\n  \"clientSecret\": \"{{clientSecret}}\",\n  \"audience\": \"{{audience}}\"\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": "{{identityBaseUrl}}/connect/token"
          }
        }
      ]
    },
    {
      "name": "Decision API",
      "item": [
        {
          "name": "Validate Business Data",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{jwtToken}}", "type": "text" },
              { "key": "Content-Type", "value": "application/json" },
              { "key": "X-Correlation-Id", "value": "{{correlationId}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"industry\": \"Automotive\",\n  \"decisionId\": \"{{decisionId}}\",\n  \"businessData\": {},\n  \"requestContext\": {\n    \"correlationId\": \"{{correlationId}}\",\n    \"locale\": \"en-CA\",\n    \"measurementSystem\": \"metric\",\n    \"currency\": \"CAD\",\n    \"timeZone\": \"America/Toronto\"\n  }\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": "{{ddeBaseUrl}}/api/v1/validate"
          }
        },
        {
          "name": "Execute Prepared Decision",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{jwtToken}}", "type": "text" },
              { "key": "Content-Type", "value": "application/json" },
              { "key": "X-Correlation-Id", "value": "{{correlationId}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"decisionId\": \"{{decisionId}}\",\n  \"profileId\": \"balanced\",\n  \"requestContext\": { \"correlationId\": \"{{correlationId}}\" },\n  \"options\": [\n    { \"optionId\": \"A\", \"name\": \"Option A\", \"values\": { \"REPLACE_CRITERION_ID\": 80 } },\n    { \"optionId\": \"B\", \"name\": \"Option B\", \"values\": { \"REPLACE_CRITERION_ID\": 65 } }\n  ],\n  \"runSensitivity\": false,\n  \"algorithm\": \"TOPSIS\",\n  \"weightStrategy\": \"Manual\",\n  \"constraintOverrides\": []\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": "{{ddeBaseUrl}}/api/v1/decide"
          }
        },
        {
          "name": "Usage Summary",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{jwtToken}}", "type": "text" }],
            "url": "{{ddeBaseUrl}}/api/v1/usage/summary"
          }
        },
        {
          "name": "List Industry Profiles",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{jwtToken}}", "type": "text" }],
            "url": "{{ddeBaseUrl}}/api/v1/industry-profiles"
          }
        },
        {
          "name": "List Mapping Profiles",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{jwtToken}}", "type": "text" }],
            "url": "{{ddeBaseUrl}}/api/v1/mapping-profiles"
          }
        }
      ]
    }
  ]
}
