Recurring Templates
Recurring templates automatically generate invoices or bills on a schedule. Set up a template once and DayZero creates the documents at the configured frequency.
Create a Recurring Template
bash
curl -X POST "https://api.ondayzero.com/api/v1/recurring" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"recurrence_type": "invoice",
"customer_id": "CUSTOMER_UUID",
"frequency": "monthly",
"start_date": "2026-05-01",
"line_items": [
{
"description": "Monthly retainer",
"quantity": 1,
"unit_price": 250000
}
]
}'
unit_priceis in cents.250000= $2,500.00 per month.
Template Types
| Type | Description |
|---|---|
invoice |
Generates invoices for a customer |
bill |
Generates bills from a vendor |
Frequencies
Templates support standard frequencies: weekly, biweekly, monthly, quarterly, annually.
List Templates
bash
curl "https://api.ondayzero.com/api/v1/recurring?recurrence_type=invoice&status=active" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Filter Parameters
| Parameter | Type | Description |
|---|---|---|
recurrence_type |
string | invoice or bill |
status |
string | active, paused, canceled, completed |
customer_id |
UUID | Filter invoice templates by customer |
vendor_id |
UUID | Filter bill templates by vendor |
Shortcut endpoints are also available:
GET /api/v1/recurring/invoices— only invoice templatesGET /api/v1/recurring/bills— only bill templates
Manage Template Lifecycle
Pause
bash
curl -X POST "https://api.ondayzero.com/api/v1/recurring/{template_id}/pause" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Resume
bash
curl -X POST "https://api.ondayzero.com/api/v1/recurring/{template_id}/resume" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Cancel
bash
curl -X POST "https://api.ondayzero.com/api/v1/recurring/{template_id}/cancel" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Skip Next Occurrence
bash
curl -X POST "https://api.ondayzero.com/api/v1/recurring/{template_id}/skip" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"View Generation History
See all documents generated from a template:
bash
curl "https://api.ondayzero.com/api/v1/recurring/{template_id}/history?limit=10" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Clone a Template
bash
curl -X POST "https://api.ondayzero.com/api/v1/recurring/{template_id}/clone" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"