Skip to content
API reference/Client billing

Get a client invoice

Try it

One invoice: lines, total, dates, whether it is on card autopay, and the client's card payment link while it waits for payment.

GET/api/v1/invoices/{invoice_id}

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the invoices:read scope — read client invoices, monthly invoice settings and card autopay.

invoices:readRead onlyMCP tool: get_invoice

Parameters

Named placeholders go in the path; the rest in the query string.

invoice_idstringPath · required
The invoice's id.1 to 100 characters

Response

200 with JSON on success (schema on the right). Errors use the standard envelope.

curl
curl -X GET 'https://websites.workflowcorp.com/api/v1/invoices/INVOICE_ID' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"
Example arguments
{
  "invoice_id": "INVOICE_ID"
}
Response schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "number": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "label": {
      "type": "string",
      "description": "\"INV-1001\"."
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "sent",
        "paid",
        "void"
      ]
    },
    "client_id": {
      "type": "string"
    },
    "client_name": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "site_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "period": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "YYYY-MM the invoice is for, if any."
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "unit_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "description",
          "quantity",
          "unit_cents",
          "total_cents"
        ],
        "additionalProperties": false
      }
    },
    "total_cents": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "currency": {
      "type": "string"
    },
    "issued_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "due_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "paid_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "monthly": {
      "type": "boolean",
      "description": "Made by the monthly run (one per site per month)."
    },
    "on_autopay": {
      "type": "boolean",
      "description": "Charged to the client's card on file — it marks itself paid; mark_invoice_paid is refused."
    },
    "paid_by_card": {
      "type": "boolean"
    },
    "pay_link": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The client's card payment page, while it waits for payment and cards are on."
    },
    "emailed_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "is_sample": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "number",
    "label",
    "status",
    "client_id",
    "client_name",
    "site_id",
    "site_name",
    "period",
    "lines",
    "total_cents",
    "currency",
    "issued_at",
    "due_at",
    "paid_at",
    "note",
    "monthly",
    "on_autopay",
    "paid_by_card",
    "pay_link",
    "emailed_at",
    "is_sample",
    "created_at",
    "updated_at"
  ],
  "additionalProperties": false
}