{
  "info": {
    "_postman_id": "c62a8cb9-9130-4e58-94ff-bf249d3e8e19",
    "name": "Invoice Generator Developer API",
    "description": "Postman Collection for Invoice Generator Developer API, covering Invoices, Clients, Services, Expenses, and Webhook dispatch configurations.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Invoices",
      "item": [
        {
          "name": "List Invoices",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoices"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create Invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice_number\": \"INV-2026-004\",\n  \"type\": \"invoice\",\n  \"client_name\": \"Acme Corp\",\n  \"client_email\": \"billing@acme.com\",\n  \"date\": \"2026-06-11\",\n  \"due_date\": \"2026-06-25\",\n  \"payment_terms\": \"14 Days\",\n  \"currency_id\": 1,\n  \"taxRate\": 5,\n  \"discountRate\": 0,\n  \"items\": [\n    {\n      \"description\": \"Developer consulting (hours)\",\n      \"quantity\": 12,\n      \"rate\": 150\n    }\n  ],\n  \"notes\": \"Thank you for your business!\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoices"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Invoice Details",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoices/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoices",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "YOUR_INVOICE_ID_HERE"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Invoice",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoices/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoices",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "YOUR_INVOICE_ID_HERE"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Clients",
      "item": [
        {
          "name": "List Clients",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/clients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "clients"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create Client",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"company_name\": \"Nova Solutions\",\n  \"currency\": \"USD\",\n  \"address\": \"456 Skyline Drive\",\n  \"phone\": \"+1-555-888-999\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/clients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "clients"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Client",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/clients/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "clients",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "YOUR_CLIENT_ID_HERE"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Services",
      "item": [
        {
          "name": "List Services",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/services",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "services"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create Service",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Cloud Deployment Setup\",\n  \"description\": \"One-time environment spin up, Kubernetes clusters, and IAM setup\",\n  \"rate\": 1800\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/services",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "services"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Service",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/services/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "services",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "YOUR_SERVICE_ID_HERE"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Expenses",
      "item": [
        {
          "name": "List Expenses",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/expenses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "expenses"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create Expense",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 120.50,\n  \"currency_id\": 1,\n  \"category\": \"Software SaaS\",\n  \"vendor\": \"Vercel Hosting\",\n  \"notes\": \"Hosting costs for billing portal project\",\n  \"date\": \"2026-06-05\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/expenses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "expenses"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete Expense",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/expenses/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "expenses",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "YOUR_EXPENSE_ID_HERE"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List Webhooks",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{jwtToken}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/developer/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "developer",
                "webhooks"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create Webhook Subscription",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{jwtToken}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://api.yourdomain.com/webhooks\",\n  \"events\": [\n    \"invoice.created\",\n    \"invoice.paid\"\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/developer/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "developer",
                "webhooks"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Test Webhook Delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{jwtToken}}",
                "type": "text"
              },
              {
                "key": "X-Workspace-Id",
                "value": "{{workspaceId}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/developer/webhooks/:id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "developer",
                "webhooks",
                ":id",
                "test"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "YOUR_WEBHOOK_SUB_ID_HERE"
                }
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:3001",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "ak_YOUR_API_KEY_HERE",
      "type": "string"
    },
    {
      "key": "workspaceId",
      "value": "1",
      "type": "string"
    },
    {
      "key": "jwtToken",
      "value": "YOUR_JWT_BEARER_TOKEN_HERE",
      "type": "string"
    }
  ]
}
