{
  "info": {
    "_postman_id": "166a095e-8057-4f26-9f74-fiducahub-nrs-einvoice",
    "name": "FiducaHub NRS E-Invoice Integration",
    "description": "Third-party integration collection for the FiducaHub NRS e-invoicing API. The sequence mirrors NRSAPI_test/integration.js: platform auth, taxpayer verification, entity lookup, reference data, IRN validation, invoice validation/signing, QR/download/update/confirm/search, transmit, and lookup. Use with docs/postman/FiducaHub_NRS_Sandbox.postman_environment.json.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{access_token}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const stamp = Date.now();",
          "pm.environment.set('correlation_id', `fh-${stamp}-${Math.random().toString(16).slice(2, 10)}`);",
          "pm.environment.set('idempotency_key', `${pm.info.requestName.replace(/[^A-Za-z0-9]/g, '-').toLowerCase()}-${stamp}`);"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseURL",
      "value": "https://eivc-k6z6d.ondigitalocean.app"
    },
    {
      "key": "access_token",
      "value": ""
    },
    {
      "key": "business_id",
      "value": ""
    },
    {
      "key": "irn",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "00 Authentication",
      "item": [
        {
          "name": "Get FiducaHub Token",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Token request completed', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
                  "const json = pm.response.json();",
                  "const token = json.access_token || json.token || json.data?.access_token || json.data?.token;",
                  "if (token) pm.environment.set('access_token', token);",
                  "pm.test('access_token captured', function () { pm.expect(pm.environment.get('access_token')).to.not.be.empty; });"
                ]
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"grant_type\": \"client_credentials\",\n  \"client_id\": \"{{client_id}}\",\n  \"client_secret\": \"{{client_secret}}\"\n}"
            },
            "url": "{{baseURL}}/oauth/token",
            "description": "Obtains the FiducaHub Bearer token used for all protected /api/v1/* calls."
          },
          "response": [
            {
              "name": "200 — Token issued",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"access_token\": \"eyJhbGciOiJIUzI1NiIs...\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600,\n  \"refresh_token\": \"dGhpcyBpcyBhIHJlZnJlc2g...\"\n}"
            }
          ]
        },
        {
          "name": "Verify Taxpayer With NRS",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Taxpayer verification responded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 401, 403, 422]); });",
                  "let json = {}; try { json = pm.response.json(); } catch (e) {}",
                  "const token = json.data?.token || json.data?.access_token || json.token || json.access_token;",
                  "if (token) pm.environment.set('nrs_taxpayer_token', token);"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{taxpayer_email}}\",\n  \"password\": \"{{taxpayer_password}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/utilities/authenticate",
            "description": "Verifies taxpayer credentials upstream. Do not use the returned NRS token as FiducaHub API auth."
          },
          "response": [
            {
              "name": "200 — NRS auth successful",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"status\": 200,\n  \"data\": {\n    \"token\": \"nrs_bearer_token_example\",\n    \"user\": {\n      \"id\": \"USR-001\",\n      \"email\": \"taxpayer@example.ng\",\n      \"name\": \"John Doe\",\n      \"role\": \"taxpayer\"\n    }\n  }\n}"
            },
            {
              "name": "422 — NRS rejected",
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"error\": {\n    \"code\": \"NRS_REJECTED\",\n    \"message\": \"NRS rejected the request: Invalid credentials\",\n    \"timestamp\": \"2026-05-12T00:00:00.000Z\"\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "01 Entity And Reference Data",
      "item": [
        {
          "name": "Search Entities",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": {
              "raw": "{{baseURL}}/api/v1/entity?tin={{test_tin}}",
              "host": [
                "{{baseURL}}"
              ],
              "path": [
                "api",
                "v1",
                "entity"
              ],
              "query": [
                {
                  "key": "tin",
                  "value": "{{test_tin}}"
                }
              ]
            },
            "description": "Search entities by TIN or name. Returns paginated results with business_id for invoice operations."
          },
          "response": [
            {
              "name": "200 — Entity search results",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": {\n    \"items\": [\n      {\n        \"id\": \"8cb820e0-09dc-4ee7-91b9-3b81cd43343e\",\n        \"reference\": \"ENT-0001\",\n        \"is_active\": true,\n        \"businesses\": [\n          {\n            \"id\": \"085fc900-3ef2-4709-90a6-4e1814a8b742\",\n            \"name\": \"Sandbox Trading Ltd\",\n            \"tin\": \"1234567890-0001\",\n            \"irn_template\": \"INV{SEQ}-{SID}-{DATE}\",\n            \"is_active\": true\n          }\n        ]\n      }\n    ],\n    \"page\": { \"page\": 1, \"size\": 10, \"hasNextPage\": false, \"totalCount\": 1 }\n  }\n}"
            }
          ]
        },
        {
          "name": "Get Entity",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Entity lookup responded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 404, 422]); });",
                  "let json = {}; try { json = pm.response.json(); } catch (e) {}",
                  "const root = json.data || json;",
                  "const entity = root.businesses?.[0] || root.Businesses?.[0] || root;",
                  "const businessId = entity.id || entity.ID || entity.business_id || pm.environment.get('test_business_id');",
                  "const tin = entity.tin || entity.Tin || entity.tax_identification_number || pm.environment.get('test_tin');",
                  "const template = entity.irn_template || entity.IrnTemplate || '';",
                  "if (businessId) { pm.environment.set('business_id', businessId); pm.environment.set('test_business_id', businessId); }",
                  "if (tin) { pm.environment.set('test_tin', tin); }",
                  "if (template) pm.environment.set('irn_template', template);"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/entity/{{test_entity_id}}",
            "description": "Resolves business_id, TIN, and optional IRN template for downstream invoice operations."
          },
          "response": [
            {
              "name": "200 — Entity details",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": {\n    \"id\": \"8cb820e0-09dc-4ee7-91b9-3b81cd43343e\",\n    \"reference\": \"ENT-0001\",\n    \"is_active\": true,\n    \"businesses\": [\n      {\n        \"id\": \"085fc900-3ef2-4709-90a6-4e1814a8b742\",\n        \"name\": \"Sandbox Trading Ltd\",\n        \"tin\": \"1234567890-0001\",\n        \"irn_template\": \"INV{SEQ}-{SID}-{DATE}\",\n        \"is_active\": true\n      }\n    ]\n  }\n}"
            }
          ]
        },
        {
          "name": "Get Countries",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/countries"
          },
          "response": [
            {
              "name": "200 — Countries list",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"name\": \"Nigeria\", \"alpha_2\": \"NG\", \"alpha_3\": \"NGA\", \"country_code\": \"566\" }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Currencies",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/currencies"
          },
          "response": [
            {
              "name": "200 — Currencies list",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"code\": \"NGN\", \"name\": \"Nigerian Naira\", \"symbol\": \"₦\" }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Tax Categories",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/tax-categories"
          },
          "response": [
            {
              "name": "200 — Tax categories",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"id\": \"STANDARD_VAT\", \"name\": \"Standard VAT\", \"percent\": 7.5 }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Payment Means",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/payment-means"
          },
          "response": [
            {
              "name": "200 — Payment means",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"code\": \"10\", \"value\": \"Cash\" },\n    { \"code\": \"30\", \"value\": \"Credit Transfer\" }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Invoice Types",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/invoice-types"
          },
          "response": [
            {
              "name": "200 — Invoice types",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"code\": \"380\", \"value\": \"Commercial Invoice\" },\n    { \"code\": \"381\", \"value\": \"Credit Note\" },\n    { \"code\": \"388\", \"value\": \"Tax Invoice\" }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Service Codes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/services-codes"
          },
          "response": [
            {
              "name": "200 — Service codes",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"code\": \"6201\", \"value\": \"Computer programming activities\" }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get VAT Exemptions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/vat-exemptions"
          },
          "response": [
            {
              "name": "200 — VAT exemptions",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"code\": \"VATEX-NG-001\", \"value\": \"Medical and pharmaceutical products\" }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get HS Codes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/resources/hs-codes"
          },
          "response": [
            {
              "name": "200 — HS codes",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": [\n    { \"hscode\": \"0601.10\", \"description\": \"Plants, live; bulbs, tubers, tuberous roots, corms, crowns and rhizomes, dormant\" },\n    { \"hscode\": \"0601.20\", \"description\": \"Plants, live; bulbs, tubers, tuberous roots, corms, crowns and rhizomes, in growth or in flower; chicory plants and roots other than roots of heading 1212\" }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "02 Taxpayer And Consent",
      "item": [
        {
          "name": "Register Taxpayer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tin\": \"{{test_tin}}\",\n  \"business_name\": \"Sandbox Trading Ltd\",\n  \"email\": \"supplier@example.ng\",\n  \"telephone\": \"+2348025409900\",\n  \"business_description\": \"General trading and services\",\n  \"street_name\": \"12 Marina Road\",\n  \"city_name\": \"Lagos\",\n  \"postal_zone\": \"100001\",\n  \"country\": \"NG\",\n  \"nrs_entity_id\": \"{{business_id}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/taxpayers",
            "description": "Register a taxpayer for NRS submission consent."
          },
          "response": [
            {
              "name": "201 — Taxpayer registered",
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"message\": \"Taxpayer registered\",\n  \"data\": {\n    \"id\": \"c534191e-2f05-4827-ae90-995a8400498c\",\n    \"tenant_id\": \"b784713b-a66d-4532-bc6a-33448b14c5d8\",\n    \"tin\": \"1234567890-0001\",\n    \"business_name\": \"Sandbox Trading Ltd\",\n    \"email\": \"supplier@example.ng\",\n    \"status\": \"active\"\n  }\n}"
            }
          ]
        },
        {
          "name": "List Taxpayers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/taxpayers?limit=10"
          },
          "response": [
            {
              "name": "200 — Taxpayer list",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": [\n    {\n      \"id\": \"c534191e-2f05-4827-ae90-995a8400498c\",\n      \"tin\": \"1234567890-0001\",\n      \"business_name\": \"Sandbox Trading Ltd\",\n      \"status\": \"active\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Taxpayer",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/taxpayers/{{taxpayer_id}}"
          },
          "response": [
            {
              "name": "200 — Taxpayer details",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": {\n    \"id\": \"c534191e-2f05-4827-ae90-995a8400498c\",\n    \"tin\": \"1234567890-0001\",\n    \"business_name\": \"Sandbox Trading Ltd\",\n    \"status\": \"active\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Update Taxpayer",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"telephone\": \"+2348025409911\",\n  \"status\": \"active\"\n}"
            },
            "url": "{{baseURL}}/api/v1/taxpayers/{{taxpayer_id}}"
          },
          "response": [
            {
              "name": "200 — Taxpayer updated",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"message\": \"Taxpayer updated\",\n  \"data\": {\n    \"id\": \"c534191e-2f05-4827-ae90-995a8400498c\",\n    \"tin\": \"1234567890-0001\",\n    \"status\": \"active\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Grant NRS Consent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"consent_type\": \"NRS_SUBMISSION\",\n  \"granted_by\": \"integrator@example.ng\"\n}"
            },
            "url": "{{baseURL}}/api/v1/taxpayers/{{taxpayer_id}}/consent",
            "description": "Grant NRS submission consent for invoice operations."
          },
          "response": [
            {
              "name": "201 — Consent granted",
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"message\": \"Consent granted\",\n  \"data\": {\n    \"id\": \"fd21fbb6-f91f-48ab-8edd-9eab0af51779\",\n    \"consent_type\": \"NRS_SUBMISSION\",\n    \"status\": \"active\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Get Consent Status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/taxpayers/{{taxpayer_id}}/consent"
          },
          "response": [
            {
              "name": "200 — Consent status",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": {\n    \"has_active_consent\": true,\n    \"consent_type\": \"NRS_SUBMISSION\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Revoke Consent",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/taxpayers/{{taxpayer_id}}/consent/{{consent_id}}"
          },
          "response": [
            {
              "name": "200 — Consent revoked",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"message\": \"Consent revoked\"\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "03 Crypto Keys",
      "item": [
        {
          "name": "Generate Crypto Key Pair",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"key_name\": \"sandbox-key-001\",\n  \"business_id\": \"{{business_id}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/crypto-keys",
            "description": "Generate an RSA key pair for QR code generation."
          },
          "response": [
            {
              "name": "201 — Key pair generated",
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"id\": \"bbdaff8a-564a-4de2-bf48-154ea3fadc57\",\n  \"key_name\": \"sandbox-key-001\",\n  \"business_id\": \"085fc900-3ef2-4709-90a6-4e1814a8b742\",\n  \"public_key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A...\\n-----END PUBLIC KEY-----\",\n  \"status\": \"active\"\n}"
            }
          ]
        },
        {
          "name": "List Crypto Keys",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/crypto-keys"
          },
          "response": [
            {
              "name": "200 — Keys list",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": [\n    {\n      \"id\": \"bbdaff8a-564a-4de2-bf48-154ea3fadc57\",\n      \"key_name\": \"sandbox-key-001\",\n      \"status\": \"active\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Upload Certificate",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"certificate\": \"-----BEGIN CERTIFICATE-----\\nMIIDxTCCAq2gAwIBAgIJAJC1HiIAZAiU...\\n-----END CERTIFICATE-----\"\n}"
            },
            "url": "{{baseURL}}/api/v1/crypto-keys/{{crypto_key_id}}/certificate",
            "description": "Upload the certificate associated with a crypto key. Accepts either PEM format (-----BEGIN CERTIFICATE-----) or a raw base64-encoded certificate string. Required before calling POST /utilities/irn/sign or generating regulatory QR codes."
          },
          "response": [
            {
              "name": "200 — Certificate uploaded",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"message\": \"Certificate uploaded successfully\"\n}"
            },
            {
              "name": "400 — Invalid certificate format",
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"certificate must be a valid PEM string (-----BEGIN CERTIFICATE-----) or a base64-encoded string\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Delete Crypto Key",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/crypto-keys/{{crypto_key_id}}"
          },
          "response": [
            {
              "name": "204 — Key deleted",
              "status": "No Content",
              "code": 204,
              "_postman_previewlanguage": "text",
              "body": ""
            }
          ]
        }
      ]
    },
    {
      "name": "04 IRN",
      "item": [
        {
          "name": "Generate IRN",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('IRN generation responded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 400]); });",
                  "let json = {}; try { json = pm.response.json(); } catch (e) {}",
                  "const irn = json.irn || json.data?.irn;",
                  "if (irn) pm.environment.set('irn', irn);"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice_number\": \"{{invoice_number}}\",\n  \"service_id\": \"{{service_id}}\",\n  \"date_stamp\": \"{{date_stamp}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/utilities/irn/generate"
          },
          "response": [
            {
              "name": "200 — IRN generated",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"status\": 200,\n  \"irn\": \"INV0001-09DC3EF2-20260512\"\n}"
            }
          ]
        },
        {
          "name": "Sign IRN (Server-Managed Keys)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"irn\": \"{{irn}}\",\n  \"business_id\": \"{{business_id}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/utilities/irn/sign",
            "description": "Encrypt IRN for QR code using server-managed crypto keys (FIRS v1.1 compliant). The public key and certificate are resolved from the registered crypto key for the given business_id. No private key needs to be sent — keys are managed server-side."
          },
          "response": [
            {
              "name": "200 — IRN signed",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"status\": 200,\n  \"irn\": \"INV0253836-09DC3EF2-20260511\",\n  \"timestamped_irn\": \"INV0253836-09DC3EF2-20260511.1731618237\",\n  \"encrypted_irn\": \"base64-encoded-encrypted-payload...\",\n  \"signed_jwt\": \"eyJhbGciOiJSUzI1NiJ9...\"\n}"
            },
            {
              "name": "400 — Missing IRN",
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"error\": {\n    \"code\": \"INVALID_INPUT\",\n    \"message\": \"irn is required\"\n  }\n}"
            },
            {
              "name": "400 — No crypto key registered",
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"error\": {\n    \"code\": \"NO_KEY\",\n    \"message\": \"No active crypto key found — register a key before signing\"\n  }\n}"
            },
            {
              "name": "400 — Missing key material",
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"error\": {\n    \"code\": \"MISSING_KEY_MATERIAL\",\n    \"message\": \"Public key and certificate are required — upload certificate on the crypto key or set NRS_CRYPTO_CERT / NRS_CRYPTO_PUBLIC_KEYS\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Validate IRN",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotency_key}}"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"business_id\": \"{{business_id}}\",\n  \"irn\": \"{{irn}}\",\n  \"invoice_reference\": \"{{invoice_number}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/invoice/irn/validate"
          },
          "response": [
            {
              "name": "200 — IRN valid",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": {\n    \"ok\": true\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "05 Invoice Lifecycle",
      "item": [
        {
          "name": "Validate Invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotency_key}}"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"business_id\": \"{{business_id}}\",\n  \"irn\": \"{{irn}}\",\n  \"issue_date\": \"{{issue_date}}\",\n  \"due_date\": \"{{issue_date}}\",\n  \"issue_time\": \"12:00:00\",\n  \"invoice_type_code\": \"388\",\n  \"payment_status\": \"PENDING\",\n  \"tax_point_date\": \"{{issue_date}}\",\n  \"document_currency_code\": \"NGN\",\n  \"tax_currency_code\": \"NGN\",\n  \"accounting_supplier_party\": {\n    \"party_name\": \"Sandbox Trading Ltd\",\n    \"tin\": \"{{test_tin}}\",\n    \"email\": \"supplier@example.ng\",\n    \"telephone\": \"+2348000000000\",\n    \"business_description\": \"General trading and services\",\n    \"postal_address\": {\n      \"street_name\": \"1 Integration Street\",\n      \"city_name\": \"Lagos\",\n      \"postal_zone\": \"100001\",\n      \"country\": \"NG\",\n      \"state\": \"NG-LA\",\n      \"lga\": \"Lagos Island\"\n    }\n  },\n  \"accounting_customer_party\": {\n    \"party_name\": \"Sandbox Customer Ltd\",\n    \"tin\": \"{{customer_tin}}\",\n    \"email\": \"customer@example.ng\",\n    \"telephone\": \"+2348000000001\",\n    \"postal_address\": {\n      \"street_name\": \"2 Customer Road\",\n      \"city_name\": \"Abuja\",\n      \"postal_zone\": \"900001\",\n      \"country\": \"NG\",\n      \"state\": \"NG-FC\",\n      \"lga\": \"Municipal Area Council\"\n    }\n  },\n  \"actual_delivery_date\": \"{{issue_date}}\",\n  \"payment_means\": [\n    { \"payment_means_code\": \"10\", \"payment_due_date\": \"{{issue_date}}\" }\n  ],\n  \"legal_monetary_total\": {\n    \"line_extension_amount\": 1000,\n    \"tax_exclusive_amount\": 1000,\n    \"tax_inclusive_amount\": 1075,\n    \"payable_amount\": 1075\n  },\n  \"tax_total\": [\n    {\n      \"tax_amount\": 75,\n      \"tax_subtotal\": [\n        {\n          \"taxable_amount\": 1000,\n          \"tax_amount\": 75,\n          \"tax_category\": { \"id\": \"STANDARD_VAT\", \"percent\": 7.5 }\n        }\n      ]\n    }\n  ],\n  \"invoice_line\": [\n    {\n      \"hsn_code\": \"0601.10\",\n      \"product_category\": \"Plants, live\",\n      \"invoiced_quantity\": 1,\n      \"line_extension_amount\": 1000,\n      \"item\": { \"name\": \"Plants, live\", \"description\": \"Plants, live; bulbs, tubers, tuberous roots, corms, crowns and rhizomes, dormant\", \"sellers_item_identification\": \"SKU-001-plants-live\" },\n      \"price\": { \"price_amount\": 1000, \"base_quantity\": 1, \"price_unit\": \"NGN per 1\" }\n    }\n  ]\n}"
            },
            "url": "{{baseURL}}/api/v1/invoice/validate"
          },
          "response": [
            {
              "name": "200 — Invoice valid",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": {\n    \"ok\": true\n  }\n}"
            }
          ]
        },
        {
          "name": "Sign Invoice",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Sign responded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201, 400, 403, 422]); });",
                  "let json = {}; try { json = pm.response.json(); } catch (e) {}",
                  "const irn = json.irn || json.Irn || json.raw?.Irn || json.raw?.irn || pm.environment.get('irn');",
                  "const ack = json.ack_no || json.AckNo || json.raw?.AckNo || json.raw?.ack_no;",
                  "const signed = json.signed_invoice || json.SignedInvoice || json.raw?.SignedInvoice || json.raw?.signed_invoice;",
                  "if (irn) pm.environment.set('irn', irn);",
                  "if (ack) pm.environment.set('ack_no', ack);",
                  "if (signed) pm.environment.set('signed_invoice', signed);"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotency_key}}"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"business_id\": \"{{business_id}}\",\n  \"irn\": \"{{irn}}\",\n  \"issue_date\": \"{{issue_date}}\",\n  \"due_date\": \"{{issue_date}}\",\n  \"issue_time\": \"12:00:00\",\n  \"invoice_type_code\": \"388\",\n  \"payment_status\": \"PENDING\",\n  \"tax_point_date\": \"{{issue_date}}\",\n  \"document_currency_code\": \"NGN\",\n  \"tax_currency_code\": \"NGN\",\n  \"accounting_supplier_party\": {\n    \"party_name\": \"Sandbox Trading Ltd\",\n    \"tin\": \"{{test_tin}}\",\n    \"email\": \"supplier@example.ng\",\n    \"telephone\": \"+2348000000000\",\n    \"business_description\": \"General trading and services\",\n    \"postal_address\": {\n      \"street_name\": \"1 Integration Street\",\n      \"city_name\": \"Lagos\",\n      \"postal_zone\": \"100001\",\n      \"country\": \"NG\",\n      \"state\": \"NG-LA\",\n      \"lga\": \"Lagos Island\"\n    }\n  },\n  \"accounting_customer_party\": {\n    \"party_name\": \"Sandbox Customer Ltd\",\n    \"tin\": \"{{customer_tin}}\",\n    \"email\": \"customer@example.ng\",\n    \"telephone\": \"+2348000000001\",\n    \"postal_address\": {\n      \"street_name\": \"2 Customer Road\",\n      \"city_name\": \"Abuja\",\n      \"postal_zone\": \"900001\",\n      \"country\": \"NG\",\n      \"state\": \"NG-FC\",\n      \"lga\": \"Municipal Area Council\"\n    }\n  },\n  \"actual_delivery_date\": \"{{issue_date}}\",\n  \"payment_means\": [\n    { \"payment_means_code\": \"10\", \"payment_due_date\": \"{{issue_date}}\" }\n  ],\n  \"legal_monetary_total\": {\n    \"line_extension_amount\": 1000,\n    \"tax_exclusive_amount\": 1000,\n    \"tax_inclusive_amount\": 1075,\n    \"payable_amount\": 1075\n  },\n  \"tax_total\": [\n    {\n      \"tax_amount\": 75,\n      \"tax_subtotal\": [\n        {\n          \"taxable_amount\": 1000,\n          \"tax_amount\": 75,\n          \"tax_category\": { \"id\": \"STANDARD_VAT\", \"percent\": 7.5 }\n        }\n      ]\n    }\n  ],\n  \"invoice_line\": [\n    {\n      \"hsn_code\": \"0601.10\",\n      \"product_category\": \"Plants, live\",\n      \"invoiced_quantity\": 1,\n      \"line_extension_amount\": 1000,\n      \"item\": { \"name\": \"Plants, live\", \"description\": \"Plants, live; bulbs, tubers, tuberous roots, corms, crowns and rhizomes, dormant\", \"sellers_item_identification\": \"SKU-001-plants-live\" },\n      \"price\": { \"price_amount\": 1000, \"base_quantity\": 1, \"price_unit\": \"NGN per 1\" }\n    }\n  ]\n}"
            },
            "url": "{{baseURL}}/api/v1/invoice/sign"
          },
          "response": [
            {
              "name": "201 — Invoice signed",
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"success\": true,\n  \"irn\": \"INV0001-09DC3EF2-20260512\",\n  \"raw\": {\n    \"code\": 201,\n    \"data\": { \"ok\": true }\n  }\n}"
            }
          ]
        },
        {
          "name": "Generate Regulatory QR",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/qrcode/{{irn}}",
            "description": "Returns FiducaHub regulatory QR. This is distinct from upstream qr_code returned by Sign Invoice."
          },
          "response": [
            {
              "name": "200 — QR generated",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"qr_code\": \"data:image/png;base64,...\",\n  \"irn\": \"INV0001-09DC3EF2-20260512\"\n}"
            }
          ]
        },
        {
          "name": "Public QR Verification",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": "{{baseURL}}/api/v1/public/verify/{{irn}}",
            "description": "Public endpoint (no auth required) to verify an invoice QR code."
          },
          "response": [
            {
              "name": "200 — Verification result",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"valid\": true,\n  \"irn\": \"INV0001-09DC3EF2-20260512\"\n}"
            }
          ]
        },
        {
          "name": "Download Invoice PDF",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/pdf"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/download/{{irn}}"
          },
          "response": [
            {
              "name": "200 — PDF binary",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "text",
              "body": "[binary PDF content]"
            }
          ]
        },
        {
          "name": "Update Invoice",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotency_key}}"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_status\": \"PAID\",\n  \"payment_date\": \"{{issue_date}}\",\n  \"payment_reference\": \"PAY-{{invoice_number}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/invoice/update/{{irn}}"
          },
          "response": [
            {
              "name": "200 — Invoice updated",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": { \"ok\": true }\n}"
            }
          ]
        },
        {
          "name": "Confirm Invoice",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/confirm/{{irn}}"
          },
          "response": [
            {
              "name": "200 — Invoice confirmed",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": { \"ok\": true }\n}"
            }
          ]
        },
        {
          "name": "Search Invoice By Business",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/{{business_id}}?page=1&size=20&sort_by=created_at&sort_direction_desc=true&irn={{irn}}"
          },
          "response": [
            {
              "name": "200 — Invoice search results",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": {\n    \"items\": [],\n    \"page\": { \"page\": 1, \"size\": 20, \"totalCount\": 0 }\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "06 Transmission",
      "item": [
        {
          "name": "Transmit Invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{idempotency_key}}"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/transmit/{{irn}}",
            "description": "Submit the signed invoice to NRS. Only run after Sign Invoice succeeds."
          },
          "response": [
            {
              "name": "200 — Transmitted",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": { \"ok\": true }\n}"
            }
          ]
        },
        {
          "name": "Lookup Transmission By IRN",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/invoice/transmit/lookup/{{irn}}"
          },
          "response": [
            {
              "name": "200 — Transmission lookup",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"code\": 200,\n  \"data\": { \"ok\": true }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "07 Decrypt",
      "item": [
        {
          "name": "Generate Decrypt Sample",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payload\": {\n    \"irn\": \"{{irn}}\",\n    \"business_id\": \"{{business_id}}\",\n    \"invoice_number\": \"{{invoice_number}}\"\n  }\n}"
            },
            "url": "{{baseURL}}/api/v1/invoice/decrypt/sample",
            "description": "Generate a test AES-256-CBC encrypted envelope for decrypt testing (sandbox only)."
          },
          "response": [
            {
              "name": "200 — Decrypt sample generated",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"decrypt_request_examples\": {\n    \"object\": {\n      \"iv\": \"base64-iv...\",\n      \"value\": \"base64-ciphertext...\",\n      \"mac\": \"hex-mac...\",\n      \"encryption_key\": \"base64-key...\"\n    }\n  }\n}"
            }
          ]
        },
        {
          "name": "Decrypt Invoice Payload",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"iv\": \"{{decrypt_iv}}\",\n  \"value\": \"{{decrypt_value}}\",\n  \"mac\": \"{{decrypt_mac}}\",\n  \"encryption_key\": \"{{decrypt_key}}\"\n}"
            },
            "url": "{{baseURL}}/api/v1/invoice/decrypt",
            "description": "Decrypt a FIRS-style AES-256-CBC encrypted invoice payload."
          },
          "response": [
            {
              "name": "200 — Decrypted successfully",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"success\": true,\n  \"decrypted_payload\": {\n    \"irn\": \"INV0001-09DC3EF2-20260512\",\n    \"business_id\": \"085fc900-3ef2-4709-90a6-4e1814a8b742\",\n    \"invoice_number\": \"INV0001\"\n  }\n}"
            },
            {
              "name": "400 — Invalid payload",
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Decryption failed — invalid iv/value/mac\"\n  },\n  \"success\": false,\n  \"decrypted_payload\": null\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "08 Status And Audit",
      "item": [
        {
          "name": "Get NRS Connector Status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/nrs/status",
            "description": "Check NRS connector health and circuit breaker status."
          },
          "response": [
            {
              "name": "200 — NRS status",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"status\": \"connected\",\n  \"mode\": \"sandbox\",\n  \"circuit_breaker\": \"closed\"\n}"
            }
          ]
        },
        {
          "name": "Query Audit Events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/audit?limit=10"
          },
          "response": [
            {
              "name": "200 — Audit events",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": [\n    {\n      \"id\": \"evt-001\",\n      \"action\": \"invoice.signed\",\n      \"resource_type\": \"invoice\",\n      \"created_at\": \"2026-05-12T00:00:00.000Z\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Taxpayer Audit Trail",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/audit/taxpayer/{{taxpayer_id}}"
          },
          "response": [
            {
              "name": "200 — Taxpayer audit trail",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": [\n    {\n      \"action\": \"taxpayer.registered\",\n      \"created_at\": \"2026-05-12T00:00:00.000Z\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Usage Statistics",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Correlation-Id",
                "value": "{{correlation_id}}"
              }
            ],
            "url": "{{baseURL}}/api/v1/usage"
          },
          "response": [
            {
              "name": "200 — Usage stats",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "body": "{\n  \"data\": {\n    \"invoices_signed\": 42,\n    \"invoices_transmitted\": 38,\n    \"api_calls_today\": 150\n  }\n}"
            }
          ]
        }
      ]
    }
  ]
}
