Skip to content
Hoursmith Docs
APIReferenceRecurring invoices

Generate next invoice now

Generate next invoice now. Generate the next slot as a DRAFT invoice (never emailed) and advance the schedule. expectedScheduledDate must equal the next slot or the call is a 409 with nothing generated. Variable (time/expense) invoices only after their service period ends (409). Scope: write. Manager, Admin or Owner token (Members get 403). Requires the Studio plan or higher (`recurringBilling`, 402 otherwise). While recurring invoices are temporarily unavailable, every recurring endpoint returns a definitive 409 `conflict`.

POST
/recurring-invoices/{id}/generate-next

Authorization

BearerAuth
AuthorizationBearer <token>

Personal Access Token. Mint at Settings → API. Token shape: hsk_<env>_<prefix12>_<secret32>.

In: header

Path Parameters

id*string

Recurring invoice series id.

Header Parameters

Idempotency-Key*string

Caller-generated UUID/ULID; replay returns the cached response within 24h.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/recurring-invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/generate-next" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expectedScheduledDate": "2019-08-24"  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "occurrenceId": "740a3903-0839-47b4-bce7-bee5e46cbf4a",    "scheduledDate": "2019-08-24",    "status": "MATERIALIZED",    "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",    "invoice": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "number": "string",      "status": "string",      "total": "string",      "currency": "string"    },    "series": {      "status": "ACTIVE",      "nextScheduledDate": "2019-08-24",      "revision": 0,      "generatedInvoiceCount": 0    }  },  "warnings": [    "string"  ]}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
Was this page helpful?