Invoice Number Gen
Generate sequential invoice numbers following the location's numbering format to ensure unique, properly formatted invoice identifiers.
Invoice Number Gen provides sequential, properly formatted invoice numbers that follow the location’s numbering scheme. Every automated billing workflow should use this endpoint to generate numbers before creating invoices.
What This MCP Tool Does
This tool generates the next invoice number in sequence for a sub-account. It ensures uniqueness and follows whatever numbering format the location has configured (prefix, padding, sequential counter). Simple but essential for maintaining clean billing records.
Endpoint Reference
Generate an invoice number:
GET /invoices/generate-invoice-number
Returns the next available invoice number in the location’s sequence.
Authentication
Requires a Private Integration Token (PIT) with the invoices scope enabled.
Key Parameters
No input parameters required. The endpoint reads the location’s numbering configuration and returns the next number in sequence.
Response includes:
- The generated invoice number string, formatted according to location settings
Important Notes
Always generate the number immediately before creating the invoice. If you generate a number but do not use it, the sequence still advances. Unused numbers create gaps in your numbering, which is an accounting concern for some businesses.
For high-volume automated billing (multiple invoices created in rapid succession), generate numbers synchronously to prevent race conditions where two invoices receive the same number.
This endpoint is specific to invoices. Estimates have their own number generator at Estimate Number Gen.
Common Questions
Can I customize the invoice number format? Number format is configured at the location level in the GHL UI. The API generates numbers following whatever format is set. Common formats include simple sequential (001, 002) or prefixed (INV-001, INV-002).
What happens if I skip a number? The sequence advances regardless of usage. Skipped numbers are not recoverable. This is standard accounting behavior — gaps in numbering are accepted practice.
Can I manually assign an invoice number instead of generating one? Check the Invoice CRUD endpoint for manual number assignment. Using the generator ensures uniqueness; manual assignment does not.
Related MCP Tools
- Invoice CRUD — Use the generated number when creating invoices
- Estimate Number Gen — Separate number sequence for estimates
- Location CRUD — Number format configured at the location level