{
  "opencollection": "1.0.0",
  "info": {
    "name": "Embedded Consumer Wallets Balances Invoices API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Invoices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cadanapay.com/v1/invoices",
            "headers": [
              {
                "name": "X-MultiTenantKey",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "personId",
                "value": "",
                "type": "query",
                "description": "Only include invoices for this person (e.g. the contractor the invoice pays). Matches the `personId` field on the invoice."
              },
              {
                "name": "userId",
                "value": "",
                "type": "query",
                "description": "Only include invoices belonging to this user"
              },
              {
                "name": "source",
                "value": "",
                "type": "query",
                "description": "Filter by invoice origin, e.g. only contractor-submitted invoices (CONTRACTOR_SUBMITTED) or invoices auto-created from payroll (PAYROLL)"
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Filter by invoice status (case-insensitive), e.g. Pending, Processing, Paid, Partially Paid, Overdue, Cancelled"
              },
              {
                "name": "type",
                "value": "",
                "type": "query",
                "description": "Filter by invoice type"
              },
              {
                "name": "startDate",
                "value": "",
                "type": "query",
                "description": "Only include invoices with an invoice date on or after this date"
              },
              {
                "name": "endDate",
                "value": "",
                "type": "query",
                "description": "Only include invoices with an invoice date on or before this date"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of invoices to return per page (default 20)"
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Opaque pagination cursor from the previous page's `node.next`. Omit to start from the first page."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List invoices for your business. Optionally filter by person, user, source, status, type, or invoice date range. Filters can be combined; all are optional."
        },
        {
          "info": {
            "name": "Get Invoice",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cadanapay.com/v1/invoices/:invoiceId",
            "headers": [
              {
                "name": "X-MultiTenantKey",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "The unique identifier for the invoice"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get invoice details"
        },
        {
          "info": {
            "name": "Get Invoice URL",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cadanapay.com/v1/invoices/:invoiceId/url",
            "headers": [
              {
                "name": "X-MultiTenantKey",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "The unique identifier for the invoice"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get a short-lived URL for the invoice PDF"
        },
        {
          "info": {
            "name": "Review Invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cadanapay.com/v1/invoices/:invoiceId/review",
            "headers": [
              {
                "name": "X-MultiTenantKey",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "The unique identifier for the invoice"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Approve or reject a contractor self-submitted invoice. Only invoices with a `source` of `CONTRACTOR_SUBMITTED` in `pending` status can be reviewed; any other invoice returns 400."
        },
        {
          "info": {
            "name": "Cancel Invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cadanapay.com/v1/invoices/:invoiceId/cancel",
            "headers": [
              {
                "name": "X-MultiTenantKey",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "invoiceId",
                "value": "",
                "type": "path",
                "description": "The unique identifier for the invoice"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Cancel an invoice. The invoice is voided and can no longer be paid or reviewed."
        }
      ]
    }
  ],
  "bundled": true
}