API reference
Recurring invoices
Invoice templates FIZ issues on its own, at the frequency you set. Each document a schedule issues carries its id. 5 operations.
List recurring invoices
GET /invoices/scheduled
Returns the account's recurring-invoice templates, in any schedule status (see schedule.status). For the documents a schedule has already issued use GET /invoices?scheduleTemplateId={id}.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
offset | query | number | Number of records to skip (offset) |
limit | query | number | Maximum number of records to return |
sort | query | string | Sort field and order (e.g. createdAt:desc) |
customerId | query | string | Filter by one customer's schedules |
curl 'https://api.fiz.co/invoices/scheduled' \
--header "x-api-key: $FIZ_API_KEY"import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.recurringInvoices.list();from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.recurring_invoices.list()<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->recurringInvoices->list();Response 200
List of recurring invoices returned successfully
| Field | Type | Description |
|---|---|---|
[]. | string | Schedule ID. Also the scheduleTemplateId of the documents issued from it. |
[]. | string · can be null | Internal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series. |
[]. | string · can be null | Document type to issue |
[]. | string | Template status — always SCHEDULED; the schedule status is in schedule.status |
[]. | string · can be null | Notes copied to each document |
[]. | string · can be null | CAE code |
[]. | object · can be null | Series the documents are issued in |
[]. | string · can be null | Series identifier |
[]. | string · can be null | Series name |
[]. | object · can be null | Customer |
[]. | string · can be null | Customer identifier |
[]. | object · can be null | Customer data |
[]. | string · can be null | Tax number (NIF) |
[]. | string · can be null | Customer name |
[]. | string · can be null | Customer email |
[]. | string · can be null | Customer country |
[]. | string · can be null | Customer phone |
[]. | object · can be null | Totals of each document to issue |
[]. | number · can be null | Amount without tax |
[]. | number · can be null | Amount with tax |
[]. | number · can be null | Amount without tax and discount |
[]. | number · can be null | Tax amount |
[]. | string · can be null | Global discount type One of: AMOUNT, PERCENT |
[]. | number · can be null | Global discount percentage |
[]. | number · can be null | Global discount amount |
[]. | number · can be null | Total |
[]. | number · can be null | Total payable |
[]. | number · can be null | Withholding tax amount |
[]. | number · can be null | Total of credit notes |
[]. | object[] · can be null | Items |
[]. | string | Identifier of the item on the invoice |
[]. | string · can be null | Item reference |
[]. | object · can be null | Item metadata |
[]. | number · can be null | Item quantity |
[]. | number · can be null | Amount without tax |
[]. | number · can be null | Amount with tax |
[]. | number · can be null | Tax amount |
[]. | number · can be null | Discount amount applied to the item |
[]. | number · can be null | Unit amount without tax |
[]. | number · can be null | Unit amount with tax |
[]. | number · can be null | Withholding tax amount |
[]. | boolean · can be null | Withholding tax enabled |
[]. | object · can be null | Item data |
[]. | string · can be null | Item name |
[]. | string · can be null | Item description |
[]. | string | Item type |
[]. | number · can be null | Unit price |
[]. | number · can be null | Tax rate |
[]. | string · can be null | VAT rate |
[]. | string · can be null | VAT territory |
[]. | string · can be null | VAT exemption reason |
[]. | boolean · can be null | Automatic VAT enabled |
[]. | string · can be null | Only on the lines of partial credit/debit notes: what the line changes on the corrected invoice line — the quantity (QUANTITY) or the unit price (PRICE). Absent on other lines and on older notes. One of: QUANTITY, PRICE |
[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line before this note. |
[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line after this note. |
[]. | object · can be null | Schedule |
[]. | string · can be null | Schedule status. SCHEDULED issues on the next occurrence; PAUSED is on hold; COMPLETED reached endDate; FAILED stopped on an error (see failReason) and resumes with status=SCHEDULED. One of: COMPLETED, FAILED, PAUSED, SCHEDULED, STOPPED |
[]. | string | Frequency. CUSTOM only appears on schedules created in the web app; the API does not accept it on create. One of: ANNUALLY, CUSTOM, DAILY, MONTHLY, QUARTERLY, WEEKLY |
[]. | number · can be null | Interval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update. |
[]. | string · can be null | Internal schedule name |
[]. | number[] · can be null | Weekdays (0 = Monday … 6 = Sunday) |
[]. | number[] · can be null | Days of the month (1–31) |
[]. | string | Issuing time (HH:mm, account's timezone) |
[]. | string | Start of the frequency |
[]. | string (date-time) · can be null | End of the frequency |
[]. | number · can be null | Due term in days |
[]. | boolean · can be null | Automatic email sending |
[]. | object · can be null | Recipients of the automatic sending |
[]. | boolean · can be null | |
[]. | string · can be null | |
[]. | boolean · can be null | |
[]. | string (date-time) · can be null | Next planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped. |
[]. | string · can be null | Reason for the last failure, when status=FAILED |
[]. | string · can be null | Creation date |
[]. | string · can be null | Last change date |
Errors
400Invalid parameters401Unauthorized - API key missing or invalid
Create recurring invoice
POST /invoices/scheduled
Creates an invoice template (type INVOICE) that is issued automatically — and reported to the AT — on every occurrence of the given frequency. The issued documents appear in GET /invoices with scheduleTemplateId equal to the id returned here. Requires a plan with recurring invoices.
Request body
The document to repeat and its schedule
| Field | Type | Description |
|---|---|---|
cae required | string | CAE code (Portuguese classification of economic activities) |
customerId required | string | Customer identifier |
seriesId | string | Series identifier (optional). Use the "id" returned by GET /series. If omitted, the account's default series is used. |
notes | string | Invoice notes (optional) |
items required | object[] | List of invoice items |
items[]. required | string | Item identifier |
items[]. required | number | Item quantity |
items[]. | number | Unit price before VAT for this line (optional). Overrides the item's price on this document only: the catalogue item keeps its price. Send unitPrice OR unitPriceWithVat, not both. |
items[]. | number | Unit price including VAT for this line (optional), instead of unitPrice. Converted to the price before VAT at the item's VAT rate, without rounding, so the VAT-inclusive total matches to the cent. Like unitPrice, it applies to this document only. Cannot be combined with an amount discount (discountType=AMOUNT), which is before VAT: use a percentage discount. |
items[]. | string | Discount type for this line (optional). Overrides the discount set on the catalogue item. Applied before the invoice's global discount. One of: AMOUNT, PERCENT |
items[]. | number | Discount percentage for this line (e.g. 10 for 10%). Requires discountType=PERCENT. |
items[]. | number | Absolute per-unit discount amount for this line, before VAT. Requires discountType=AMOUNT. |
items[]. | boolean | Apply withholding tax on this line (optional). If omitted, the line follows the item (withholdingTaxAvailable). With true, withholding applies to this document only, at withholdingTaxPercent or, without it, the item's percentage; the type is IRS for a sole trader and IRC for a company. With false, the line has no withholding. The catalogue item is not changed. |
items[]. | number | Withholding tax percentage for this line (optional, e.g. 25). Turns withholding on for the line; cannot be sent with withholdingTaxEnabled=false. Applies to this document only. |
summary | object | Invoice summary with global discount (optional) |
summary. | string | Global discount type One of: AMOUNT, PERCENT |
summary. | number | Global discount percentage (e.g. 10 for 10%) |
summary. | number | Absolute global discount amount |
schedule required | object | Frequency and issuing options |
schedule. required | string | Frequency. WEEKLY uses byDay; MONTHLY, QUARTERLY and ANNUALLY use byMonthDay. If omitted, the weekday / day of month of startDate applies. One of: DAILY, WEEKLY, MONTHLY, QUARTERLY, ANNUALLY |
schedule. required | string | First day the frequency is computed from (ISO 8601). The first document is issued on the first occurrence of the frequency from this date. |
schedule. | string | Last day a document may be issued on (ISO 8601). If omitted, issuing repeats until paused or deleted. |
schedule. | string | Issuing time as HH:mm, in the account's timezone. If omitted, 12:00 is used. |
schedule. | number[] | Weekdays to issue on (0 = Monday … 6 = Sunday). Only with frequency=WEEKLY. |
schedule. | number[] | Days of the month to issue on (1–31). Only with frequency=MONTHLY, QUARTERLY or ANNUALLY. A day the month lacks (31 in April) skips that month — use 28 or less to issue every month. |
schedule. | number | Due term in days, counted from each document's issue date. 0 (or omitted) = due on the same day. |
schedule. | boolean | Email each issued document automatically, as set in autoSendEmails |
schedule. | object | Recipients of the automatic sending (only with autoSend=true) |
schedule. | boolean | Email the issued document to the customer |
schedule. | string | Alternative customer email for the sending. If omitted, the email on the customer's record is used. |
schedule. | boolean | Send a copy of the issued document to the account's email |
schedule. | string | Internal schedule name (optional) |
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)curl --request POST 'https://api.fiz.co/invoices/scheduled' \
--header "x-api-key: $FIZ_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?set the operation key first, in the step above}" \
--data '{
"cae": "1234",
"customerId": "6863b1513117c5892ff55296",
"items": [
{
"id": "68483e978073231c3947077c",
"quantity": 1,
"discountType": "PERCENT",
"discountPercent": 10
}
],
"schedule": {
"frequency": "MONTHLY",
"byMonthDay": [
1
],
"startDate": "2026-10-01T00:00:00.000Z",
"timeOfDay": "09:00",
"dueDateInDaysRange": 30,
"autoSend": true,
"autoSendEmails": {
"sendToCustomer": true
}
}
}'# Once per fiscal operation, before the call. Store it with the document:
# a retry after a lost response reuses it and gets the recorded result, or a 409
# without Retry-After when the outcome is unknown: then check the document first.
export IDEMPOTENCY_KEY=$(uuidgen)import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const idempotencyKey = process.env.IDEMPOTENCY_KEY; // from the step above, the same on every retry
if (!idempotencyKey) throw new Error('Set IDEMPOTENCY_KEY first, in the step above');
const result = await fiz.recurringInvoices.create({
cae: '1234',
customerId: '6863b1513117c5892ff55296',
items: [
{
id: '68483e978073231c3947077c',
quantity: 1,
discountType: 'PERCENT',
discountPercent: 10,
},
],
schedule: {
frequency: 'MONTHLY',
byMonthDay: [
1,
],
startDate: '2026-10-01T00:00:00.000Z',
timeOfDay: '09:00',
dueDateInDaysRange: 30,
autoSend: true,
autoSendEmails: {
sendToCustomer: true,
},
},
}, { idempotencyKey });# Once per fiscal operation, before the call. Store it with the document:
# a retry after a lost response reuses it and gets the recorded result, or a 409
# without Retry-After when the outcome is unknown: then check the document first.
export IDEMPOTENCY_KEY=$(uuidgen)import os
from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
idempotency_key = os.environ["IDEMPOTENCY_KEY"] # from the step above, the same on every retry
result = fiz.recurring_invoices.create({
"cae": "1234",
"customerId": "6863b1513117c5892ff55296",
"items": [
{
"id": "68483e978073231c3947077c",
"quantity": 1,
"discountType": "PERCENT",
"discountPercent": 10,
},
],
"schedule": {
"frequency": "MONTHLY",
"byMonthDay": [
1,
],
"startDate": "2026-10-01T00:00:00.000Z",
"timeOfDay": "09:00",
"dueDateInDaysRange": 30,
"autoSend": True,
"autoSendEmails": {
"sendToCustomer": True,
},
},
}, idempotency_key=idempotency_key)# Once per fiscal operation, before the call. Store it with the document:
# a retry after a lost response reuses it and gets the recorded result, or a 409
# without Retry-After when the outcome is unknown: then check the document first.
export IDEMPOTENCY_KEY=$(uuidgen)<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
// from the step above, the same on every retry
$idempotencyKey = getenv('IDEMPOTENCY_KEY') ?: throw new RuntimeException('Set IDEMPOTENCY_KEY first, in the step above');
$result = $fiz->recurringInvoices->create([
'cae' => '1234',
'customerId' => '6863b1513117c5892ff55296',
'items' => [
[
'id' => '68483e978073231c3947077c',
'quantity' => 1,
'discountType' => 'PERCENT',
'discountPercent' => 10,
],
],
'schedule' => [
'frequency' => 'MONTHLY',
'byMonthDay' => [
1,
],
'startDate' => '2026-10-01T00:00:00.000Z',
'timeOfDay' => '09:00',
'dueDateInDaysRange' => 30,
'autoSend' => true,
'autoSendEmails' => [
'sendToCustomer' => true,
],
],
], ['idempotencyKey' => $idempotencyKey]);Response 201
Recurring invoice created successfully
| Field | Type | Description |
|---|---|---|
id | string | Schedule ID. Also the scheduleTemplateId of the documents issued from it. |
number | string · can be null | Internal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series. |
documentType | string · can be null | Document type to issue |
status | string | Template status — always SCHEDULED; the schedule status is in schedule.status |
notes | string · can be null | Notes copied to each document |
cae | string · can be null | CAE code |
series | object · can be null | Series the documents are issued in |
series. | string · can be null | Series identifier |
series. | string · can be null | Series name |
customer | object · can be null | Customer |
customer. | string · can be null | Customer identifier |
customer. | object · can be null | Customer data |
customer. | string · can be null | Tax number (NIF) |
customer. | string · can be null | Customer name |
customer. | string · can be null | Customer email |
customer. | string · can be null | Customer country |
customer. | string · can be null | Customer phone |
summary | object · can be null | Totals of each document to issue |
summary. | number · can be null | Amount without tax |
summary. | number · can be null | Amount with tax |
summary. | number · can be null | Amount without tax and discount |
summary. | number · can be null | Tax amount |
summary. | string · can be null | Global discount type One of: AMOUNT, PERCENT |
summary. | number · can be null | Global discount percentage |
summary. | number · can be null | Global discount amount |
summary. | number · can be null | Total |
summary. | number · can be null | Total payable |
summary. | number · can be null | Withholding tax amount |
summary. | number · can be null | Total of credit notes |
items | object[] · can be null | Items |
items[]. | string | Identifier of the item on the invoice |
items[]. | string · can be null | Item reference |
items[]. | object · can be null | Item metadata |
items[]. | number · can be null | Item quantity |
items[]. | number · can be null | Amount without tax |
items[]. | number · can be null | Amount with tax |
items[]. | number · can be null | Tax amount |
items[]. | number · can be null | Discount amount applied to the item |
items[]. | number · can be null | Unit amount without tax |
items[]. | number · can be null | Unit amount with tax |
items[]. | number · can be null | Withholding tax amount |
items[]. | boolean · can be null | Withholding tax enabled |
items[]. | object · can be null | Item data |
items[]. | string · can be null | Item name |
items[]. | string · can be null | Item description |
items[]. | string | Item type |
items[]. | number · can be null | Unit price |
items[]. | number · can be null | Tax rate |
items[]. | string · can be null | VAT rate |
items[]. | string · can be null | VAT territory |
items[]. | string · can be null | VAT exemption reason |
items[]. | boolean · can be null | Automatic VAT enabled |
items[]. | string · can be null | Only on the lines of partial credit/debit notes: what the line changes on the corrected invoice line — the quantity (QUANTITY) or the unit price (PRICE). Absent on other lines and on older notes. One of: QUANTITY, PRICE |
items[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line before this note. |
items[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line after this note. |
schedule | object · can be null | Schedule |
schedule. | string · can be null | Schedule status. SCHEDULED issues on the next occurrence; PAUSED is on hold; COMPLETED reached endDate; FAILED stopped on an error (see failReason) and resumes with status=SCHEDULED. One of: COMPLETED, FAILED, PAUSED, SCHEDULED, STOPPED |
schedule. | string | Frequency. CUSTOM only appears on schedules created in the web app; the API does not accept it on create. One of: ANNUALLY, CUSTOM, DAILY, MONTHLY, QUARTERLY, WEEKLY |
schedule. | number · can be null | Interval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update. |
schedule. | string · can be null | Internal schedule name |
schedule. | number[] · can be null | Weekdays (0 = Monday … 6 = Sunday) |
schedule. | number[] · can be null | Days of the month (1–31) |
schedule. | string | Issuing time (HH:mm, account's timezone) |
schedule. | string | Start of the frequency |
schedule. | string (date-time) · can be null | End of the frequency |
schedule. | number · can be null | Due term in days |
schedule. | boolean · can be null | Automatic email sending |
schedule. | object · can be null | Recipients of the automatic sending |
schedule. | boolean · can be null | |
schedule. | string · can be null | |
schedule. | boolean · can be null | |
schedule. | string (date-time) · can be null | Next planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped. |
schedule. | string · can be null | Reason for the last failure, when status=FAILED |
createdAt | string · can be null | Creation date |
updatedAt | string · can be null | Last change date |
Errors
400Invalid data, or a schedule with no occurrences (endDate before startDate, say)401Unauthorized - API key missing or invalid403The account plan does not include recurring invoices409A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown422The idempotency key was already used with a different request body
Get recurring invoice by ID
GET /invoices/scheduled/{id}
Returns one recurring-invoice template and its schedule
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Recurring invoice ID |
curl 'https://api.fiz.co/invoices/scheduled/ID' \
--header "x-api-key: $FIZ_API_KEY"import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.recurringInvoices.retrieve('ID');from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.recurring_invoices.retrieve("ID")<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->recurringInvoices->retrieve('ID');Response 200
Recurring invoice found
| Field | Type | Description |
|---|---|---|
id | string | Schedule ID. Also the scheduleTemplateId of the documents issued from it. |
number | string · can be null | Internal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series. |
documentType | string · can be null | Document type to issue |
status | string | Template status — always SCHEDULED; the schedule status is in schedule.status |
notes | string · can be null | Notes copied to each document |
cae | string · can be null | CAE code |
series | object · can be null | Series the documents are issued in |
series. | string · can be null | Series identifier |
series. | string · can be null | Series name |
customer | object · can be null | Customer |
customer. | string · can be null | Customer identifier |
customer. | object · can be null | Customer data |
customer. | string · can be null | Tax number (NIF) |
customer. | string · can be null | Customer name |
customer. | string · can be null | Customer email |
customer. | string · can be null | Customer country |
customer. | string · can be null | Customer phone |
summary | object · can be null | Totals of each document to issue |
summary. | number · can be null | Amount without tax |
summary. | number · can be null | Amount with tax |
summary. | number · can be null | Amount without tax and discount |
summary. | number · can be null | Tax amount |
summary. | string · can be null | Global discount type One of: AMOUNT, PERCENT |
summary. | number · can be null | Global discount percentage |
summary. | number · can be null | Global discount amount |
summary. | number · can be null | Total |
summary. | number · can be null | Total payable |
summary. | number · can be null | Withholding tax amount |
summary. | number · can be null | Total of credit notes |
items | object[] · can be null | Items |
items[]. | string | Identifier of the item on the invoice |
items[]. | string · can be null | Item reference |
items[]. | object · can be null | Item metadata |
items[]. | number · can be null | Item quantity |
items[]. | number · can be null | Amount without tax |
items[]. | number · can be null | Amount with tax |
items[]. | number · can be null | Tax amount |
items[]. | number · can be null | Discount amount applied to the item |
items[]. | number · can be null | Unit amount without tax |
items[]. | number · can be null | Unit amount with tax |
items[]. | number · can be null | Withholding tax amount |
items[]. | boolean · can be null | Withholding tax enabled |
items[]. | object · can be null | Item data |
items[]. | string · can be null | Item name |
items[]. | string · can be null | Item description |
items[]. | string | Item type |
items[]. | number · can be null | Unit price |
items[]. | number · can be null | Tax rate |
items[]. | string · can be null | VAT rate |
items[]. | string · can be null | VAT territory |
items[]. | string · can be null | VAT exemption reason |
items[]. | boolean · can be null | Automatic VAT enabled |
items[]. | string · can be null | Only on the lines of partial credit/debit notes: what the line changes on the corrected invoice line — the quantity (QUANTITY) or the unit price (PRICE). Absent on other lines and on older notes. One of: QUANTITY, PRICE |
items[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line before this note. |
items[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line after this note. |
schedule | object · can be null | Schedule |
schedule. | string · can be null | Schedule status. SCHEDULED issues on the next occurrence; PAUSED is on hold; COMPLETED reached endDate; FAILED stopped on an error (see failReason) and resumes with status=SCHEDULED. One of: COMPLETED, FAILED, PAUSED, SCHEDULED, STOPPED |
schedule. | string | Frequency. CUSTOM only appears on schedules created in the web app; the API does not accept it on create. One of: ANNUALLY, CUSTOM, DAILY, MONTHLY, QUARTERLY, WEEKLY |
schedule. | number · can be null | Interval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update. |
schedule. | string · can be null | Internal schedule name |
schedule. | number[] · can be null | Weekdays (0 = Monday … 6 = Sunday) |
schedule. | number[] · can be null | Days of the month (1–31) |
schedule. | string | Issuing time (HH:mm, account's timezone) |
schedule. | string | Start of the frequency |
schedule. | string (date-time) · can be null | End of the frequency |
schedule. | number · can be null | Due term in days |
schedule. | boolean · can be null | Automatic email sending |
schedule. | object · can be null | Recipients of the automatic sending |
schedule. | boolean · can be null | |
schedule. | string · can be null | |
schedule. | boolean · can be null | |
schedule. | string (date-time) · can be null | Next planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped. |
schedule. | string · can be null | Reason for the last failure, when status=FAILED |
createdAt | string · can be null | Creation date |
updatedAt | string · can be null | Last change date |
Errors
401Unauthorized - API key missing or invalid404Recurring invoice not found
Update recurring invoice
PATCH /invoices/scheduled/{id}
Changes the schedule (frequency, dates, time, auto-send) or pauses/resumes issuing. Only the fields sent are changed; null is accepted on endDate only. To change the document itself (items, customer, notes) use PATCH /invoices/{id} with the same id.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Recurring invoice ID |
Request body
Schedule fields to update
| Field | Type | Description |
|---|---|---|
frequency | string | Frequency. WEEKLY uses byDay; MONTHLY, QUARTERLY and ANNUALLY use byMonthDay. If omitted, the weekday / day of month of startDate applies. One of: DAILY, WEEKLY, MONTHLY, QUARTERLY, ANNUALLY |
startDate | string | First day the frequency is computed from (ISO 8601). The first document is issued on the first occurrence of the frequency from this date. |
timeOfDay | string | Issuing time as HH:mm, in the account's timezone. If omitted, 12:00 is used. |
byDay | number[] | Weekdays to issue on (0 = Monday … 6 = Sunday). Only with frequency=WEEKLY. |
byMonthDay | number[] | Days of the month to issue on (1–31). Only with frequency=MONTHLY, QUARTERLY or ANNUALLY. A day the month lacks (31 in April) skips that month — use 28 or less to issue every month. |
dueDateInDaysRange | number | Due term in days, counted from each document's issue date. 0 (or omitted) = due on the same day. |
autoSend | boolean | Email each issued document automatically, as set in autoSendEmails |
autoSendEmails | object | Recipients of the automatic sending (only with autoSend=true) |
autoSendEmails. | boolean | Email the issued document to the customer |
autoSendEmails. | string | Alternative customer email for the sending. If omitted, the email on the customer's record is used. |
autoSendEmails. | boolean | Send a copy of the issued document to the account's email |
name | string | Internal schedule name (optional) |
status | string | Pause (PAUSED) or (re)activate (SCHEDULED) the schedule. A FAILED or COMPLETED schedule only issues again after receiving SCHEDULED. One of: SCHEDULED, PAUSED |
endDate | string (date-time) · can be null | Last day a document may be issued on (ISO 8601). Send null to remove the end and repeat indefinitely. If omitted, the stored value is kept. |
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)curl --request PATCH 'https://api.fiz.co/invoices/scheduled/ID' \
--header "x-api-key: $FIZ_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?set the operation key first, in the step above}" \
--data '{
"frequency": "MONTHLY",
"startDate": "2026-10-01T00:00:00.000Z",
"timeOfDay": "09:00"
}'# Once per fiscal operation, before the call. Store it with the document:
# a retry after a lost response reuses it and gets the recorded result, or a 409
# without Retry-After when the outcome is unknown: then check the document first.
export IDEMPOTENCY_KEY=$(uuidgen)import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const idempotencyKey = process.env.IDEMPOTENCY_KEY; // from the step above, the same on every retry
if (!idempotencyKey) throw new Error('Set IDEMPOTENCY_KEY first, in the step above');
const result = await fiz.recurringInvoices.update('ID', {
frequency: 'MONTHLY',
startDate: '2026-10-01T00:00:00.000Z',
timeOfDay: '09:00',
}, { idempotencyKey });# Once per fiscal operation, before the call. Store it with the document:
# a retry after a lost response reuses it and gets the recorded result, or a 409
# without Retry-After when the outcome is unknown: then check the document first.
export IDEMPOTENCY_KEY=$(uuidgen)import os
from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
idempotency_key = os.environ["IDEMPOTENCY_KEY"] # from the step above, the same on every retry
result = fiz.recurring_invoices.update("ID", {
"frequency": "MONTHLY",
"startDate": "2026-10-01T00:00:00.000Z",
"timeOfDay": "09:00",
}, idempotency_key=idempotency_key)# Once per fiscal operation, before the call. Store it with the document:
# a retry after a lost response reuses it and gets the recorded result, or a 409
# without Retry-After when the outcome is unknown: then check the document first.
export IDEMPOTENCY_KEY=$(uuidgen)<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
// from the step above, the same on every retry
$idempotencyKey = getenv('IDEMPOTENCY_KEY') ?: throw new RuntimeException('Set IDEMPOTENCY_KEY first, in the step above');
$result = $fiz->recurringInvoices->update('ID', [
'frequency' => 'MONTHLY',
'startDate' => '2026-10-01T00:00:00.000Z',
'timeOfDay' => '09:00',
], ['idempotencyKey' => $idempotencyKey]);Response 200
Recurring invoice updated successfully
| Field | Type | Description |
|---|---|---|
id | string | Schedule ID. Also the scheduleTemplateId of the documents issued from it. |
number | string · can be null | Internal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series. |
documentType | string · can be null | Document type to issue |
status | string | Template status — always SCHEDULED; the schedule status is in schedule.status |
notes | string · can be null | Notes copied to each document |
cae | string · can be null | CAE code |
series | object · can be null | Series the documents are issued in |
series. | string · can be null | Series identifier |
series. | string · can be null | Series name |
customer | object · can be null | Customer |
customer. | string · can be null | Customer identifier |
customer. | object · can be null | Customer data |
customer. | string · can be null | Tax number (NIF) |
customer. | string · can be null | Customer name |
customer. | string · can be null | Customer email |
customer. | string · can be null | Customer country |
customer. | string · can be null | Customer phone |
summary | object · can be null | Totals of each document to issue |
summary. | number · can be null | Amount without tax |
summary. | number · can be null | Amount with tax |
summary. | number · can be null | Amount without tax and discount |
summary. | number · can be null | Tax amount |
summary. | string · can be null | Global discount type One of: AMOUNT, PERCENT |
summary. | number · can be null | Global discount percentage |
summary. | number · can be null | Global discount amount |
summary. | number · can be null | Total |
summary. | number · can be null | Total payable |
summary. | number · can be null | Withholding tax amount |
summary. | number · can be null | Total of credit notes |
items | object[] · can be null | Items |
items[]. | string | Identifier of the item on the invoice |
items[]. | string · can be null | Item reference |
items[]. | object · can be null | Item metadata |
items[]. | number · can be null | Item quantity |
items[]. | number · can be null | Amount without tax |
items[]. | number · can be null | Amount with tax |
items[]. | number · can be null | Tax amount |
items[]. | number · can be null | Discount amount applied to the item |
items[]. | number · can be null | Unit amount without tax |
items[]. | number · can be null | Unit amount with tax |
items[]. | number · can be null | Withholding tax amount |
items[]. | boolean · can be null | Withholding tax enabled |
items[]. | object · can be null | Item data |
items[]. | string · can be null | Item name |
items[]. | string · can be null | Item description |
items[]. | string | Item type |
items[]. | number · can be null | Unit price |
items[]. | number · can be null | Tax rate |
items[]. | string · can be null | VAT rate |
items[]. | string · can be null | VAT territory |
items[]. | string · can be null | VAT exemption reason |
items[]. | boolean · can be null | Automatic VAT enabled |
items[]. | string · can be null | Only on the lines of partial credit/debit notes: what the line changes on the corrected invoice line — the quantity (QUANTITY) or the unit price (PRICE). Absent on other lines and on older notes. One of: QUANTITY, PRICE |
items[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line before this note. |
items[]. | number · can be null | With noteChangeKind: the quantity or unit price of the invoice line after this note. |
schedule | object · can be null | Schedule |
schedule. | string · can be null | Schedule status. SCHEDULED issues on the next occurrence; PAUSED is on hold; COMPLETED reached endDate; FAILED stopped on an error (see failReason) and resumes with status=SCHEDULED. One of: COMPLETED, FAILED, PAUSED, SCHEDULED, STOPPED |
schedule. | string | Frequency. CUSTOM only appears on schedules created in the web app; the API does not accept it on create. One of: ANNUALLY, CUSTOM, DAILY, MONTHLY, QUARTERLY, WEEKLY |
schedule. | number · can be null | Interval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update. |
schedule. | string · can be null | Internal schedule name |
schedule. | number[] · can be null | Weekdays (0 = Monday … 6 = Sunday) |
schedule. | number[] · can be null | Days of the month (1–31) |
schedule. | string | Issuing time (HH:mm, account's timezone) |
schedule. | string | Start of the frequency |
schedule. | string (date-time) · can be null | End of the frequency |
schedule. | number · can be null | Due term in days |
schedule. | boolean · can be null | Automatic email sending |
schedule. | object · can be null | Recipients of the automatic sending |
schedule. | boolean · can be null | |
schedule. | string · can be null | |
schedule. | boolean · can be null | |
schedule. | string (date-time) · can be null | Next planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped. |
schedule. | string · can be null | Reason for the last failure, when status=FAILED |
createdAt | string · can be null | Creation date |
updatedAt | string · can be null | Last change date |
Errors
400Invalid data, or a schedule with no occurrences (endDate before startDate, say)401Unauthorized - API key missing or invalid404Recurring invoice not found409A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown422The idempotency key was already used with a different request body
Delete recurring invoice
DELETE /invoices/scheduled/{id}
Deletes the template and ends issuing. Documents already issued are kept but stop referencing this schedule (scheduleTemplateId) — save the ids from GET /invoices?scheduleTemplateId={id} before deleting if you need to reconcile them later. To stop without losing the history, pause with PATCH /invoices/scheduled/{id} and status=PAUSED.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Recurring invoice ID |
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)curl --request DELETE 'https://api.fiz.co/invoices/scheduled/ID' \
--header "x-api-key: $FIZ_API_KEY" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?set the operation key first, in the step above}"import { Fiz } from '@fiz-co/sdk';
const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.recurringInvoices.delete('ID');from fiz_sdk import Fiz
fiz = Fiz() # reads FIZ_API_KEY
result = fiz.recurring_invoices.delete("ID")<?php
require 'vendor/autoload.php';
$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->recurringInvoices->delete('ID');Response 200
Recurring invoice deleted successfully
| Field | Type | Description |
|---|---|---|
id | string | Unique invoice identifier |
createdAt | string · can be null | Invoice creation date |
Errors
401Unauthorized - API key missing or invalid404Recurring invoice not found409A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown422The idempotency key was already used with a different request body
Errors
Errors share one shape: statusCode, message, code and error, with the request id in the X-Request-Id header.