Recurring Invoices
Recurring Invoices
Recurring invoice schedule management.
Automate invoice generation on a daily, weekly, monthly, or yearly schedule using an existing invoice as a template.
The Recurring Invoice object
Attributes
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}Create a recurring invoice
/recurring-invoicesCreate a new recurring invoice schedule.
Link an existing invoice as the template and configure the generation frequency.
The source invoice's data (items, customer, notes) is used when generating new invoices.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Possible values: "daily", "weekly", "monthly", "yearly"
Start date in YYYY-MM-DD format
curl -X POST "https://eu.spaceinvoices.com/recurring-invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"day_of_month": 1,
"start_date": "2025-02-01"
}'Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}List all recurring invoices
/recurring-invoicesRetrieve a paginated list of recurring invoice schedules with optional filtering and sorting.
Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, full-text search, and sorting.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.
Cursor to fetch the previous page of results. Use the value from pagination.prev_cursor in the previous response.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
JSON query object for filtering results. Supports MongoDB-style operators.
Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]
Allowed fields: id, name, status, frequency, document_id
Examples:
- {"total": {"gte": 1000}} - Invoices over 1000
- {"customer.name": {"contains": "Acme"}} - Customer name contains "Acme"
- {"date": {"between": ["2025-01-01", "2025-12-31"]}} - Date range
Full-text search query to filter results across multiple fields.
Searches are case-insensitive and match partial strings.
Searches across all text fields including names, descriptions, addresses, and metadata values.
When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.
curl "https://eu.spaceinvoices.com/recurring-invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"data": [
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}
],
"pagination": {
"total": 1,
"next_cursor": null,
"prev_cursor": null,
"has_more": false
}
}Get recurring invoice by ID
/recurring-invoices/{id}Retrieve a single recurring invoice schedule by its unique identifier.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl "https://eu.spaceinvoices.com/recurring-invoices/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}Update a recurring invoice
/recurring-invoices/{id}Update an existing recurring invoice schedule.
Only the provided fields will be updated.
Schedule changes automatically recalculate the next run date.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
Body parameters
curl -X PATCH "https://eu.spaceinvoices.com/recurring-invoices/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Monthly hosting for Acme Corp"
}'Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}Delete a recurring invoice
/recurring-invoices/{id}Soft delete a recurring invoice schedule. The schedule is moved to the trash and can be restored.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X DELETE "https://eu.spaceinvoices.com/recurring-invoices/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Permanently delete a recurring invoice
/recurring-invoices/{id}/permanentPermanently delete a soft-deleted recurring invoice schedule. Only schedules in the trash can be permanently deleted.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X DELETE "https://eu.spaceinvoices.com/recurring-invoices/{id}/permanent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Restore a deleted recurring invoice
/recurring-invoices/{id}/restoreRestore a soft-deleted recurring invoice schedule from the trash.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/recurring-invoices/{id}/restore" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}Pause a recurring invoice
/recurring-invoices/{id}/pausePause an active recurring invoice schedule. No invoices will be generated while paused. The next run date is cleared.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/recurring-invoices/{id}/pause" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}Resume a paused recurring invoice
/recurring-invoices/{id}/resumeResume a paused recurring invoice schedule. The next run date is recalculated from the current date.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/recurring-invoices/{id}/resume" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}Manually trigger invoice generation
/recurring-invoices/{id}/triggerManually trigger invoice generation for a recurring invoice schedule. Creates a new invoice immediately using the source document as template.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/recurring-invoices/{id}/trigger" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "rinv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"document_id": "inv_6595a27b5d35015c3ef0c3fd",
"name": "Monthly hosting for Acme",
"frequency": "monthly",
"interval": 1,
"day_of_week": null,
"day_of_month": 1,
"month_of_year": null,
"start_date": "2025-02-01",
"end_date": null,
"next_run_date": "2025-02-01",
"last_run_date": null,
"status": "active",
"auto_send": false,
"create_as_draft": false,
"send_to": null,
"payment_terms_days": null,
"notify_owner": true,
"invoices_generated": 0,
"last_generated_invoice_id": null,
"last_error": null,
"last_error_at": null,
"metadata": {},
"created_at": "2025-01-15T00:00:00.000Z",
"updated_at": "2025-01-15T00:00:00.000Z",
"deleted_at": null
}