Skip to content

Recurring Invoices

The Recurring Invoice object

object

Attributes

idstring
Other attributes
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "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

POST/recurring-invoices

Create 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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

document_idstringrequired
namestringrequired
frequencystringrequired

Possible values: "daily", "weekly", "monthly", "yearly"

start_datestringrequired

Start date in YYYY-MM-DD format

Other parameters
intervalintegeroptional
day_of_weekintegeroptional
day_of_monthintegeroptional
month_of_yearintegeroptional
end_datestringoptional
auto_sendbooleanoptional
create_as_draftbooleanoptional
send_tostringoptional
payment_terms_daysintegeroptional
notify_ownerbooleanoptional
metadataobjectoptional
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"
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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

GET/recurring-invoices

Retrieve 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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Cursor to fetch the previous page of results. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

order_byoptional
querystring<json>optional

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

searchstringoptional

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.

deletedbooleanoptional

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

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "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

GET/recurring-invoices/{id}

Retrieve a single recurring invoice schedule by its unique identifier.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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

PATCH/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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

namestringoptional
frequencystringoptional
intervalintegeroptional
day_of_weekintegeroptional
day_of_monthintegeroptional
month_of_yearintegeroptional
start_datestringoptional
end_datestringoptional
auto_sendbooleanoptional
create_as_draftbooleanoptional
send_tostringoptional
payment_terms_daysintegeroptional
notify_ownerbooleanoptional
metadataobjectoptional
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"
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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

DELETE/recurring-invoices/{id}

Soft delete a recurring invoice schedule. The schedule is moved to the trash and can be restored.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

DELETE/recurring-invoices/{id}/permanent

Permanently delete a soft-deleted recurring invoice schedule. Only schedules in the trash can be permanently deleted.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

POST/recurring-invoices/{id}/restore

Restore a soft-deleted recurring invoice schedule from the trash.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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

POST/recurring-invoices/{id}/pause

Pause an active recurring invoice schedule. No invoices will be generated while paused. The next run date is cleared.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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

POST/recurring-invoices/{id}/resume

Resume a paused recurring invoice schedule. The next run date is recalculated from the current date.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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

POST/recurring-invoices/{id}/trigger

Manually trigger invoice generation for a recurring invoice schedule. Creates a new invoice immediately using the source document as template.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

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

idstring
Other parameters
entity_idstring
document_idstring
namestring
frequencystring
intervalinteger
day_of_weekinteger
day_of_monthinteger
month_of_yearinteger
start_datestring
end_datestring
next_run_datestring
last_run_datestring
statusstring
auto_sendboolean
create_as_draftboolean
send_tostring
payment_terms_daysinteger
notify_ownerboolean
invoices_generatedinteger
last_generated_invoice_idstring
last_errorstring
last_error_atstring<date-time>
metadata
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "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
}