{
  "opencollection": "1.0.0",
  "info": {
    "name": "API Key accounts invoices API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "invoices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.coperniq.io/v1/invoices",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "Number of items per page (max 100)"
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page number (1-based)"
              },
              {
                "name": "order_by",
                "value": "",
                "type": "query",
                "description": "Sort order for results"
              },
              {
                "name": "updated_after",
                "value": "",
                "type": "query",
                "description": "Filter items updated after this timestamp (ISO 8601)"
              },
              {
                "name": "updated_before",
                "value": "",
                "type": "query",
                "description": "Filter items updated before this timestamp (ISO 8601)"
              }
            ]
          },
          "docs": "Retrieve a paginated list of invoices.\n\nSupports:\n- Pagination (`page_size`, `page`)\n- Date filtering (`updated_after`, `updated_before`)\n- Sorting (`order_by`)\n"
        },
        {
          "info": {
            "name": "Create Invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.coperniq.io/v1/invoices",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new invoice.\n\nRequired fields:\n- `recordId`: Project or account ID (the record must exist first)\n- `calculationMethod`: Must be \"LINE_ITEMS\" or \"PERCENTAGE\"\n\nConditionally required:\n- `lineItems`: Required when `calculationMethod` is \"LINE_ITEMS\" (at least one item)\n- `percentage`: Required when `calculationMethod` is \"PERCENTAGE\"\n\nOptional fields:\n- `issueDate`: ISO 8601 datetime string\n- `dueDate`: ISO 8601 datetime string\n- `status`: Initial invoice status (defaults to DRAFT)\n- `desc"
        },
        {
          "info": {
            "name": "Get Invoice",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.coperniq.io/v1/invoices/:invoiceId",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "Invoice identifier"
              }
            ]
          },
          "docs": "Retrieve a specific invoice by ID"
        },
        {
          "info": {
            "name": "Update Invoice",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.coperniq.io/v1/invoices/:invoiceId",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "Invoice identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an existing invoice. Supports partial updates.\n\nUpdatable fields:\n- `calculationMethod`: Must be \"LINE_ITEMS\" or \"PERCENTAGE\"\n- `lineItems`: Array of line items if calculationMethod is \"LINE_ITEMS\"\n- `percentage`: Percentage if calculationMethod is \"PERCENTAGE\"\n- `dueDate`: ISO 8601 datetime string\n- `description`: Invoice description\n"
        },
        {
          "info": {
            "name": "Delete Invoice",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.coperniq.io/v1/invoices/:invoiceId",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "Invoice identifier"
              }
            ]
          },
          "docs": "Delete a specific invoice by ID"
        },
        {
          "info": {
            "name": "Get Project Invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.coperniq.io/v1/projects/:projectId/invoices",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project identifier"
              },
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "Number of items per page (max 100)"
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page number (1-based)"
              },
              {
                "name": "order_by",
                "value": "",
                "type": "query",
                "description": "Sort order for results"
              },
              {
                "name": "updated_after",
                "value": "",
                "type": "query",
                "description": "Filter items updated after this timestamp (ISO 8601)"
              },
              {
                "name": "updated_before",
                "value": "",
                "type": "query",
                "description": "Filter items updated before this timestamp (ISO 8601)"
              }
            ]
          },
          "docs": "Retrieve invoices for a specific project.\n\nSupports:\n- Pagination (`page_size`, `page`)\n- Date filtering (`updated_after`, `updated_before`)\n- Sorting (`order_by`)\n"
        },
        {
          "info": {
            "name": "Get Account Invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.coperniq.io/v1/accounts/:accountId/invoices",
            "headers": [
              {
                "name": "x-api-key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "Account identifier"
              },
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "Number of items per page (max 100)"
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page number (1-based)"
              },
              {
                "name": "order_by",
                "value": "",
                "type": "query",
                "description": "Sort order for results"
              },
              {
                "name": "updated_after",
                "value": "",
                "type": "query",
                "description": "Filter items updated after this timestamp (ISO 8601)"
              },
              {
                "name": "updated_before",
                "value": "",
                "type": "query",
                "description": "Filter items updated before this timestamp (ISO 8601)"
              }
            ]
          },
          "docs": "Retrieve invoices for a specific account.\n\nSupports:\n- Pagination (`page_size`, `page`)\n- Date filtering (`updated_after`, `updated_before`)\n- Sorting (`order_by`)\n\n**Note:** The `/clients` path is an alias for `/accounts` and will continue to work until users are individually notified and migrated.\n"
        }
      ]
    }
  ],
  "bundled": true
}