{
  "info": {
    "_postman_id": "ring2all-bss-external-api",
    "name": "Ring2All BSS - 💳 External API",
    "description": "# Ring2All BSS — Unified External API Collection\n\nOfficial REST API collection for **Ring2All BSS** (Business Support System, Convergent Prepaid/Postpaid Billing, Real-Time OCS Rating Engine, Multi-Currency Wallets, DID Number Provisioning, and Customer Self-Care Portal).\n\n## 🏷️ Canonical Nomenclature\n- **Product**: Ring2All BSS\n- **Linux Package**: `softswitch-bss` (`softswitch-bss-api`, `softswitch-bss-web`, `softswitch-bss-client`)\n\n## 🔐 Authentication\nEvery administrative request requires an API Key issued via the BSS Portal:\n```http\nX-API-Key: {{bss_api_key}}\n```\n\nCustomer-scoped actions can also use JWT Bearer authentication retrieved via `/client/auth/login`:\n```http\nAuthorization: Bearer {{customer_jwt_token}}\n```",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{bss_api_key}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "bss_base_url",
      "value": "http://192.168.10.33/api"
    }
  ],
  "item": [
    {
      "name": "🔐 Authentication & API Keys",
      "description": "Administrative login, password setup, and secure API Key (b2a_...) generation with SHA-256 validation.",
      "item": [
        {
          "name": "Check Setup Status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/auth/status",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "auth",
                "status"
              ]
            },
            "description": "Returns whether initial administrator setup is required."
          }
        },
        {
          "name": "Administrator Login",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/auth/login",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "auth",
                "login"
              ]
            },
            "description": "Authenticate admin credentials and retrieve JWT token.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"usernameOrEmail\": \"admin\",\n  \"password\": \"password\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const token = res.token || res.data?.token || res.accessToken;",
                  "        if (token) {",
                  "            pm.environment.set(\"jwt_token\", token);",
                  "            console.log(\"Auto-captured BSS jwt_token\");",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Initial Admin Setup",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/auth/setup-admin",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "auth",
                "setup-admin"
              ]
            },
            "description": "Set initial root password for clean BSS installations.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"password\": \"SuperSecurePassword2026!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List API Keys",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/api-keys",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "api-keys"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": "Retrieve paginated list of api keys.\n\n**Query Options:** `page`, `limit`, `search`"
          }
        },
        {
          "name": "Get API Key by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/api-keys/{{api_key_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "api-keys",
                "{{api_key_id}}"
              ]
            },
            "description": "Retrieve details of a single api key by numeric ID."
          }
        },
        {
          "name": "Create API Key",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/api-keys",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "api-keys"
              ]
            },
            "description": "Create a new api key record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"ERP Billing M2M Connector\",\n  \"description\": \"Automated invoice generation from SAP\",\n  \"scopes\": [\n    \"read\",\n    \"write\",\n    \"admin\"\n  ],\n  \"rateLimitRpm\": 300,\n  \"allowedIps\": [\n    \"192.168.10.0/24\",\n    \"127.0.0.1\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id || res.data?.uuid || res.uuid;",
                  "        if (newId) {",
                  "            pm.environment.set(\"api_key_id\", newId);",
                  "            console.log(\"Auto-captured api_key_id: \" + newId);",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update API Key",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/api-keys/{{api_key_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "api-keys",
                "{{api_key_id}}"
              ]
            },
            "description": "Update an existing api key record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"ERP Billing M2M Connector - Production\",\n  \"rateLimitRpm\": 600\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete API Key",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/api-keys/{{api_key_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "api-keys",
                "{{api_key_id}}"
              ]
            },
            "description": "Permanently remove this api key."
          }
        }
      ]
    },
    {
      "name": "👥 Customers Management",
      "description": "Carrier client accounts, company entities, currency, timezone, and credit limit management.",
      "item": [
        {
          "name": "List Customers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": "Retrieve paginated list of customers.\n\n**Query Options:** `page`, `limit`, `search`"
          }
        },
        {
          "name": "Get Customer by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers/{{customer_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers",
                "{{customer_id}}"
              ]
            },
            "description": "Retrieve details of a single customer by numeric ID."
          }
        },
        {
          "name": "Create Customer",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers"
              ]
            },
            "description": "Create a new customer record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Acme Telecom LLC\",\n  \"company_name\": \"Acme Communications\",\n  \"email\": \"billing@acme.telecom\",\n  \"phone\": \"+13055559000\",\n  \"currency\": \"USD\",\n  \"credit_limit\": 5000,\n  \"billing_type\": \"PREPAID\",\n  \"country\": \"US\",\n  \"is_active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id || res.data?.uuid || res.uuid;",
                  "        if (newId) {",
                  "            pm.environment.set(\"customer_id\", newId);",
                  "            console.log(\"Auto-captured customer_id: \" + newId);",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update Customer",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers/{{customer_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers",
                "{{customer_id}}"
              ]
            },
            "description": "Update an existing customer record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"credit_limit\": 10000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete Customer",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers/{{customer_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers",
                "{{customer_id}}"
              ]
            },
            "description": "Permanently remove this customer."
          }
        },
        {
          "name": "Get Customer Balance & Financials",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers/{{customer_id}}/balance",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers",
                "{{customer_id}}",
                "balance"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Update Customer Credit Limit",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers/{{customer_id}}/credit-limit",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers",
                "{{customer_id}}",
                "credit-limit"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"credit_limit\": 7500,\n  \"alert_threshold\": 80\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List Customer Invoices",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/customers/{{customer_id}}/invoices",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "customers",
                "{{customer_id}}",
                "invoices"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "👤 Customer Self-Care Portal",
      "description": "Direct customer authentication, digital wallet top-up with Stripe, self-service payment methods, and invoice settlement.",
      "item": [
        {
          "name": "Customer Login",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/auth/login",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "auth",
                "login"
              ]
            },
            "description": "Authenticate customer credentials and retrieve customer JWT session.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"client@acme.telecom\",\n  \"password\": \"CustomerPassword123!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const token = res.data?.token || res.token;",
                  "        if (token) {",
                  "            pm.environment.set(\"customer_jwt_token\", token);",
                  "            console.log(\"Auto-captured customer_jwt_token\");",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Register New Customer Account",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/auth/register",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "auth",
                "register"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"New Client Enterprise\",\n  \"email\": \"billing@enterprise.com\",\n  \"password\": \"SecurePassword2026!\",\n  \"companyName\": \"Enterprise Telecom\",\n  \"currency\": \"USD\",\n  \"country\": \"US\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get Customer Profile & Wallet",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/auth/me",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "auth",
                "me"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Update Customer Profile",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/auth/profile",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "auth",
                "profile"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"+13055550199\",\n  \"billingAddress\": \"701 Brickell Ave, Miami, FL\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Customer Wallet Balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/wallet",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "wallet"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Customer Wallet Ledger Transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/wallet/transactions",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "wallet",
                "transactions"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create Wallet Top-up Intent (Stripe)",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/wallet/topup-intent",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "wallet",
                "topup-intent"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 50,\n  \"currency\": \"usd\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List Customer Invoices",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/invoices",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "invoices"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Pay Invoice Online (Stripe)",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/invoices/{{invoice_id}}/pay",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "invoices",
                "{{invoice_id}}",
                "pay"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Vaulted Payment Methods",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/payment-methods",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "payment-methods"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create Setup Intent for New Card",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/client/payment-methods/setup-intent",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "payment-methods",
                "setup-intent"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "💳 Prepaid Wallets & Payments",
      "description": "Prepaid account balance management, Stripe checkout intents, PayPal, and manual credits/debits.",
      "item": [
        {
          "name": "Get Client Wallet Details",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/wallet",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "wallet"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "List Wallet Transactions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/wallet/transactions",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "wallet",
                "transactions"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create Top-up Intent (Stripe PaymentIntent)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/wallet/topup-intent",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "wallet",
                "topup-intent"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 100,\n  \"currency\": \"USD\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Manual Balance Adjustment (Credit/Debit)",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/payments/manual-adjust",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "payments",
                "manual-adjust"
              ]
            },
            "description": "Admin M2M endpoint to deposit or adjust customer wallet balance.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{customer_id}}\",\n  \"amount\": 50,\n  \"transaction_type\": \"CREDIT\",\n  \"description\": \"Wire transfer payment #98234\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Process Refund",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/payments/refund",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "payments",
                "refund"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_id\": \"{{payment_id}}\",\n  \"amount\": 25,\n  \"reason\": \"Duplicate charge\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "📄 Invoices & Automated Billing",
      "description": "Automated billing cycles, recurring subscription invoicing, PDF generation, and payment settlement.",
      "item": [
        {
          "name": "List Invoices",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": "Retrieve paginated list of invoices.\n\n**Query Options:** `page`, `limit`, `search`"
          }
        },
        {
          "name": "Get Invoice by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices/{{invoice_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices",
                "{{invoice_id}}"
              ]
            },
            "description": "Retrieve details of a single invoice by numeric ID."
          }
        },
        {
          "name": "Create Invoice",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices"
              ]
            },
            "description": "Create a new invoice record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{customer_id}}\",\n  \"billing_period_start\": \"2026-09-01T00:00:00Z\",\n  \"billing_period_end\": \"2026-09-30T23:59:59Z\",\n  \"due_date\": \"2026-10-15T00:00:00Z\",\n  \"items\": [\n    {\n      \"description\": \"Cloud PBX Enterprise Bundle (50 seats)\",\n      \"quantity\": 1,\n      \"unit_price\": 249\n    },\n    {\n      \"description\": \"Outbound North America Termination (Minutes: 12,450)\",\n      \"quantity\": 12450,\n      \"unit_price\": 0.0089\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id || res.data?.uuid || res.uuid;",
                  "        if (newId) {",
                  "            pm.environment.set(\"invoice_id\", newId);",
                  "            console.log(\"Auto-captured invoice_id: \" + newId);",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update Invoice",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices/{{invoice_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices",
                "{{invoice_id}}"
              ]
            },
            "description": "Update an existing invoice record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"notes\": \"Updated invoice payment terms to Net-30\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete Invoice",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices/{{invoice_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices",
                "{{invoice_id}}"
              ]
            },
            "description": "Permanently remove this invoice."
          }
        },
        {
          "name": "Download Invoice PDF",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices/{{invoice_id}}/pdf",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices",
                "{{invoice_id}}",
                "pdf"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Mark Invoice as Paid",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices/{{invoice_id}}/mark-paid",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices",
                "{{invoice_id}}",
                "mark-paid"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_method\": \"BANK_TRANSFER\",\n  \"reference\": \"ACH-2026-09-991\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send Invoice Email to Customer",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/invoices/{{invoice_id}}/send-email",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "invoices",
                "{{invoice_id}}",
                "send-email"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "📦 Plans, Bundles & Catalog",
      "description": "Subscription plans, recurring monthly fees, bundled minutes/SMS, and overage billing rates.",
      "item": [
        {
          "name": "List Plans",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/plans",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "plans"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": "Retrieve paginated list of plans.\n\n**Query Options:** `page`, `limit`, `search`"
          }
        },
        {
          "name": "Get Plan by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/plans/{{plan_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "plans",
                "{{plan_id}}"
              ]
            },
            "description": "Retrieve details of a single plan by numeric ID."
          }
        },
        {
          "name": "Create Plan",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/plans",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "plans"
              ]
            },
            "description": "Create a new plan record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Unlimited USA & Canada Trunk Plan\",\n  \"code\": \"PLAN-US-UNL\",\n  \"monthly_fee\": 99,\n  \"currency\": \"USD\",\n  \"included_minutes\": 5000,\n  \"included_sms\": 1000,\n  \"included_dids\": 5,\n  \"overage_rate_per_minute\": 0.012,\n  \"is_active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id || res.data?.uuid || res.uuid;",
                  "        if (newId) {",
                  "            pm.environment.set(\"plan_id\", newId);",
                  "            console.log(\"Auto-captured plan_id: \" + newId);",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update Plan",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/plans/{{plan_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "plans",
                "{{plan_id}}"
              ]
            },
            "description": "Update an existing plan record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"monthly_fee\": 89\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete Plan",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/plans/{{plan_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "plans",
                "{{plan_id}}"
              ]
            },
            "description": "Permanently remove this plan."
          }
        },
        {
          "name": "Public Client Catalog",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/catalog",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "catalog"
              ]
            },
            "description": "Public list of active plans visible to customers."
          }
        },
        {
          "name": "Subscribe Customer to Plan",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/subscriptions",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "subscriptions"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plan_id\": \"{{plan_id}}\",\n  \"auto_renew\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Cancel Plan Subscription",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/subscriptions/{{subscription_id}}/cancel",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "subscriptions",
                "{{subscription_id}}",
                "cancel"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Migrated to Dedicated SIP Trunking\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "📈 Tariffs & Destination Rates",
      "description": "Class 4/5 rate cards, LCR tariffs, prefix rating tables, and margin simulation.",
      "item": [
        {
          "name": "List Rate Cards",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": "Retrieve paginated list of rate cards.\n\n**Query Options:** `page`, `limit`, `search`"
          }
        },
        {
          "name": "Get Rate Card by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}"
              ]
            },
            "description": "Retrieve details of a single rate card by numeric ID."
          }
        },
        {
          "name": "Create Rate Card",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates"
              ]
            },
            "description": "Create a new rate card record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Standard Outbound Rate Deck\",\n  \"currency\": \"USD\",\n  \"type\": \"sales\",\n  \"grace_period_seconds\": 6,\n  \"is_default\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id || res.data?.uuid || res.uuid;",
                  "        if (newId) {",
                  "            pm.environment.set(\"rate_card_id\", newId);",
                  "            console.log(\"Auto-captured rate_card_id: \" + newId);",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update Rate Card",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}"
              ]
            },
            "description": "Update an existing rate card record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Standard Outbound Rate Deck - Tier 1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete Rate Card",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}"
              ]
            },
            "description": "Permanently remove this rate card."
          }
        },
        {
          "name": "List Destination Rates in Card",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}/rates",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}",
                "rates"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Add Destination Rate to Card",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}/rates",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}",
                "rates"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"prefix\": \"1305\",\n  \"destinationName\": \"United States - Miami\",\n  \"ratePerMinute\": 0.0075,\n  \"connectionFee\": 0,\n  \"initIncrement\": 6,\n  \"subIncrement\": 6\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id;",
                  "        if (newId) pm.environment.set(\"rate_id\", newId);",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update Destination Rate",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}/rates/{{rate_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}",
                "rates",
                "{{rate_id}}"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ratePerMinute\": 0.0072\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete Destination Rate",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/{{rate_card_id}}/rates/{{rate_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "{{rate_card_id}}",
                "rates",
                "{{rate_id}}"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Simulate Call Rating",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/simulate",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "simulate"
              ]
            },
            "description": "Simulate the cost of a call before or during routing.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"destinationNumber\": \"13055551234\",\n  \"durationSeconds\": 120,\n  \"serviceType\": \"voice\",\n  \"rateCardId\": \"{{rate_card_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "LCR Price Matrix",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/lcr/matrix",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "lcr",
                "matrix"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "LCR Analytics Summary",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/rates/lcr/summary",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "rates",
                "lcr",
                "summary"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "🔢 DID Phone Numbers & Inventory",
      "description": "Direct Inward Dialing number provisioning, provider ordering, SMS capabilities, and SIP routing destinations.",
      "item": [
        {
          "name": "List Available DIDs for Purchase",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/telephony/dids/available",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "telephony",
                "dids",
                "available"
              ],
              "query": [
                {
                  "key": "country",
                  "value": "US"
                },
                {
                  "key": "area_code",
                  "value": "305"
                },
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Purchase DID Number",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/telephony/dids/purchase",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "telephony",
                "dids",
                "purchase"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone_number\": \"+13055558888\",\n  \"monthly_cost\": 1.5,\n  \"setup_fee\": 0.5\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List Customer Active DIDs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/telephony/dids",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "telephony",
                "dids"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Route DID to PBX Domain / SIP URI",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "X-Customer-ID",
                "value": "{{customer_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{bss_base_url}}/client/telephony/dids/{{did_id}}/route",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "client",
                "telephony",
                "dids",
                "{{did_id}}",
                "route"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"routing_type\": \"SIP_URI\",\n  \"destination\": \"sip:1001@pbx.ring2all.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List DID Wholesale Carriers/Providers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/did-providers",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "did-providers"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create DID Wholesale Carrier",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/did-providers",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "did-providers"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Telnyx Wholesale\",\n  \"api_key\": \"KEY...\",\n  \"provider_type\": \"telnyx\",\n  \"is_active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "⚙️ OCS Rating Engine & Balance Control",
      "description": "Realtime Online Charging System (OCS), pre-call authorization credit checks, mid-call balance polling, and teardown.",
      "item": [
        {
          "name": "Pre-Call Credit Authorization",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ocs/authorize-call",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ocs",
                "authorize-call"
              ]
            },
            "description": "Called by SBC/Kamailio before initiating call to verify balance and return max call duration.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"caller_number\": \"13055551000\",\n  \"destination_number\": \"13055559999\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"carrier_node\": \"sbc-node-01\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Report Final CDR & Settle Balance",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ocs/report-cdr",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ocs",
                "report-cdr"
              ]
            },
            "description": "Deducts funds from prepaid balance immediately upon call hangup.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call-9872134-xyz\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"caller_number\": \"13055551000\",\n  \"destination_number\": \"13055559999\",\n  \"duration_seconds\": 142,\n  \"call_start\": \"2026-09-11T10:00:00Z\",\n  \"call_end\": \"2026-09-11T10:02:22Z\",\n  \"hangup_cause\": \"NORMAL_CLEARING\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Active Live Monitored Calls",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ocs/live-calls",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ocs",
                "live-calls"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Force Disconnect Overdrawn Call",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ocs/kill-call",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ocs",
                "kill-call"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call-9872134-xyz\",\n  \"reason\": \"INSUFFICIENT_FUNDS\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "📊 CDRs, MDRs & Realtime Reports",
      "description": "Rated CDR export, SMS MDR records, financial KPI aggregations, and billing analytics.",
      "item": [
        {
          "name": "List Rated Call Detail Records (CDRs)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/cdrs",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "cdrs"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "50"
                },
                {
                  "key": "customer_id",
                  "value": "{{customer_id}}"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Get CDR Summary & Financial KPIs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/cdrs/summary",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "cdrs",
                "summary"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "last_30_days"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "List Message Detail Records (MDRs/SMS)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/mdrs",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "mdrs"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Dashboard Revenue KPIs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/dashboard/kpis",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "dashboard",
                "kpis"
              ]
            },
            "description": "Realtime total MRR, collected balance, and active accounts."
          }
        }
      ]
    },
    {
      "name": "🌐 Telecom Nodes Interconnect",
      "description": "Registration of SBC gateways and PBX switches authorized to query the OCS rating engine.",
      "item": [
        {
          "name": "List Telecom Nodes",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/telecom-nodes",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "telecom-nodes"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": "Retrieve paginated list of telecom nodes.\n\n**Query Options:** `page`, `limit`, `search`"
          }
        },
        {
          "name": "Get Telecom Node by ID",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/telecom-nodes/{{telecom_node_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "telecom-nodes",
                "{{telecom_node_id}}"
              ]
            },
            "description": "Retrieve details of a single telecom node by numeric ID."
          }
        },
        {
          "name": "Create Telecom Node",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/telecom-nodes",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "telecom-nodes"
              ]
            },
            "description": "Create a new telecom node record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Miami Core SBC-01\",\n  \"ip_address\": \"192.168.10.32\",\n  \"node_type\": \"SBC\",\n  \"shared_secret\": \"sec_tok_99182\",\n  \"is_active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 200 || pm.response.code === 201) {",
                  "    try {",
                  "        const res = pm.response.json();",
                  "        const newId = res.data?.id || res.id || res.data?.uuid || res.uuid;",
                  "        if (newId) {",
                  "            pm.environment.set(\"telecom_node_id\", newId);",
                  "            console.log(\"Auto-captured telecom_node_id: \" + newId);",
                  "        }",
                  "    } catch(e) {}",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ]
        },
        {
          "name": "Update Telecom Node",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/telecom-nodes/{{telecom_node_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "telecom-nodes",
                "{{telecom_node_id}}"
              ]
            },
            "description": "Update an existing telecom node record.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Miami Core SBC-01 (Primary)\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete Telecom Node",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/telecom-nodes/{{telecom_node_id}}",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "telecom-nodes",
                "{{telecom_node_id}}"
              ]
            },
            "description": "Permanently remove this telecom node."
          }
        },
        {
          "name": "Node Heartbeat Ping",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/telecom-nodes/{{node_id}}/heartbeat",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "telecom-nodes",
                "{{node_id}}",
                "heartbeat"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"active_calls\": 42,\n  \"cpu_percent\": 18.5\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "🛡️ Fraud Prevention & Credit Limits",
      "description": "High-risk destination blacklists, daily spend ceiling alerts, and velocity attack mitigation.",
      "item": [
        {
          "name": "List Fraud Rules",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/fraud/rules",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "fraud",
                "rules"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create Spend Ceiling Rule",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/fraud/rules",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "fraud",
                "rules"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Max Daily Outbound Spend\",\n  \"threshold_amount\": 500,\n  \"action\": \"BLOCK_CALLS\",\n  \"time_window_hours\": 24\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Active Fraud Alerts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/fraud/alerts",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "fraud",
                "alerts"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Dismiss Alert",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/fraud/alerts/{{alert_id}}/dismiss",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "fraud",
                "alerts",
                "{{alert_id}}",
                "dismiss"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "🔌 Accounting & Webhook Endpoints",
      "description": "Automated HMAC-SHA256 event dispatch to external CRMs, ERPs, and billing ledgers.",
      "item": [
        {
          "name": "List Webhook Endpoints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/accounting/webhooks",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "accounting",
                "webhooks"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Register Webhook Endpoint",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/accounting/webhooks",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "accounting",
                "webhooks"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://erp.example.com/webhooks/ring2all\",\n  \"events\": [\n    \"invoice.created\",\n    \"payment.received\",\n    \"wallet.low_balance\",\n    \"customer.created\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Trigger Test Webhook Event",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/accounting/webhooks/{{webhook_id}}/test",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "accounting",
                "webhooks",
                "{{webhook_id}}",
                "test"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "List Webhook Delivery Logs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/accounting/webhook-logs",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "accounting",
                "webhook-logs"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "🤖 AI Assistant & Providers",
      "description": "BSS Copilot query interface, LLM provider registration, and intelligent financial insights.",
      "item": [
        {
          "name": "Query BSS AI Assistant",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ai-chat/query",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ai-chat",
                "query"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"query\": \"Show me total revenue and top 5 customers for this month.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List BSS AI Providers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ai-providers",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ai-providers"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Register AI Provider",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{bss_base_url}}/ai-providers",
              "host": [
                "{{bss_base_url}}"
              ],
              "path": [
                "ai-providers"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"OpenAI Enterprise\",\n  \"provider_type\": \"openai\",\n  \"api_key\": \"sk-...\",\n  \"is_active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}