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}.

Authentication: an API key (x-api-key).

Parameters

NameInTypeDescription
offsetquerynumberNumber of records to skip (offset)
limitquerynumberMaximum number of records to return
sortquerystringSort field and order (e.g. createdAt:desc)
customerIdquerystringFilter 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

FieldTypeDescription
[].idstringSchedule ID. Also the scheduleTemplateId of the documents issued from it.
[].numberstring · can be nullInternal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series.
[].documentTypestring · can be nullDocument type to issue
[].statusstringTemplate status — always SCHEDULED; the schedule status is in schedule.status
[].notesstring · can be nullNotes copied to each document
[].caestring · can be nullCAE code
[].seriesobject · can be nullSeries the documents are issued in
[].series.refstring · can be nullSeries identifier
[].series.namestring · can be nullSeries name
[].customerobject · can be nullCustomer
[].customer.refstring · can be nullCustomer identifier
[].customer.dataobject · can be nullCustomer data
[].customer.data.taxpayerNumberstring · can be nullTax number (NIF)
[].customer.data.namestring · can be nullCustomer name
[].customer.data.emailstring · can be nullCustomer email
[].customer.data.countrystring · can be nullCustomer country
[].customer.data.phonestring · can be nullCustomer phone
[].summaryobject · can be nullTotals of each document to issue
[].summary.amountWithoutTaxnumber · can be nullAmount without tax
[].summary.amountWithTaxnumber · can be nullAmount with tax
[].summary.amountWithoutTaxWithoutDiscountnumber · can be nullAmount without tax and discount
[].summary.taxAmountnumber · can be nullTax amount
[].summary.globalDiscountTypestring · can be nullGlobal discount type
One of: AMOUNT, PERCENT
[].summary.globalDiscountPercentnumber · can be nullGlobal discount percentage
[].summary.globalDiscountAmountnumber · can be nullGlobal discount amount
[].summary.totalnumber · can be nullTotal
[].summary.totalToPaynumber · can be nullTotal payable
[].summary.withholdingTaxAmountnumber · can be nullWithholding tax amount
[].summary.creditNotesTotalnumber · can be nullTotal of credit notes
[].itemsobject[] · can be nullItems
[].items[].idstringIdentifier of the item on the invoice
[].items[].refstring · can be nullItem reference
[].items[].metaobject · can be nullItem metadata
[].items[].meta.quantitynumber · can be nullItem quantity
[].items[].meta.amountWithoutTaxnumber · can be nullAmount without tax
[].items[].meta.amountWithTaxnumber · can be nullAmount with tax
[].items[].meta.taxAmountnumber · can be nullTax amount
[].items[].meta.discountAmountnumber · can be nullDiscount amount applied to the item
[].items[].meta.unitAmountWithoutTaxnumber · can be nullUnit amount without tax
[].items[].meta.unitAmountWithTaxnumber · can be nullUnit amount with tax
[].items[].meta.withholdingTaxAmountnumber · can be nullWithholding tax amount
[].items[].meta.withholdingTaxEnabledboolean · can be nullWithholding tax enabled
[].items[].dataobject · can be nullItem data
[].items[].data.namestring · can be nullItem name
[].items[].data.descriptionstring · can be nullItem description
[].items[].data.typestringItem type
[].items[].data.unitPricenumber · can be nullUnit price
[].items[].data.taxRatenumber · can be nullTax rate
[].items[].data.vatRatestring · can be nullVAT rate
[].items[].data.vatTerritorystring · can be nullVAT territory
[].items[].data.vatExemptionReasonstring · can be nullVAT exemption reason
[].items[].data.isAutoVATEnabledboolean · can be nullAutomatic VAT enabled
[].items[].noteChangeKindstring · can be nullOnly 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[].noteChangeFromnumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line before this note.
[].items[].noteChangeTonumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line after this note.
[].scheduleobject · can be nullSchedule
[].schedule.statusstring · can be nullSchedule 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.frequencystringFrequency. 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.intervalnumber · can be nullInterval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update.
[].schedule.namestring · can be nullInternal schedule name
[].schedule.byDaynumber[] · can be nullWeekdays (0 = Monday … 6 = Sunday)
[].schedule.byMonthDaynumber[] · can be nullDays of the month (1–31)
[].schedule.timeOfDaystringIssuing time (HH:mm, account's timezone)
[].schedule.startDatestringStart of the frequency
[].schedule.endDatestring (date-time) · can be nullEnd of the frequency
[].schedule.dueDateInDaysRangenumber · can be nullDue term in days
[].schedule.autoSendboolean · can be nullAutomatic email sending
[].schedule.autoSendEmailsobject · can be nullRecipients of the automatic sending
[].schedule.autoSendEmails.sendToCustomerboolean · can be null
[].schedule.autoSendEmails.customerEmailstring · can be null
[].schedule.autoSendEmails.sendToIssuerboolean · can be null
[].schedule.nextRunAtstring (date-time) · can be nullNext planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped.
[].schedule.failReasonstring · can be nullReason for the last failure, when status=FAILED
[].createdAtstring · can be nullCreation date
[].updatedAtstring · can be nullLast change date

Errors

  • 400 Invalid parameters
  • 401 Unauthorized - 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.

Authentication: an API key (x-api-key). Send an Idempotency-Key to retry this call safely.

Request body

The document to repeat and its schedule

FieldTypeDescription
cae requiredstringCAE code (Portuguese classification of economic activities)
customerId requiredstringCustomer identifier
seriesIdstringSeries identifier (optional). Use the "id" returned by GET /series. If omitted, the account's default series is used.
notesstringInvoice notes (optional)
items requiredobject[]List of invoice items
items[].id requiredstringItem identifier
items[].quantity requirednumberItem quantity
items[].unitPricenumberUnit 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[].unitPriceWithVatnumberUnit 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[].discountTypestringDiscount 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[].discountPercentnumberDiscount percentage for this line (e.g. 10 for 10%). Requires discountType=PERCENT.
items[].discountAmountnumberAbsolute per-unit discount amount for this line, before VAT. Requires discountType=AMOUNT.
items[].withholdingTaxEnabledbooleanApply 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[].withholdingTaxPercentnumberWithholding 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.
summaryobjectInvoice summary with global discount (optional)
summary.globalDiscountTypestringGlobal discount type
One of: AMOUNT, PERCENT
summary.globalDiscountPercentnumberGlobal discount percentage (e.g. 10 for 10%)
summary.globalDiscountAmountnumberAbsolute global discount amount
schedule requiredobjectFrequency and issuing options
schedule.frequency requiredstringFrequency. 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.startDate requiredstringFirst day the frequency is computed from (ISO 8601). The first document is issued on the first occurrence of the frequency from this date.
schedule.endDatestringLast day a document may be issued on (ISO 8601). If omitted, issuing repeats until paused or deleted.
schedule.timeOfDaystringIssuing time as HH:mm, in the account's timezone. If omitted, 12:00 is used.
schedule.byDaynumber[]Weekdays to issue on (0 = Monday … 6 = Sunday). Only with frequency=WEEKLY.
schedule.byMonthDaynumber[]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.dueDateInDaysRangenumberDue term in days, counted from each document's issue date. 0 (or omitted) = due on the same day.
schedule.autoSendbooleanEmail each issued document automatically, as set in autoSendEmails
schedule.autoSendEmailsobjectRecipients of the automatic sending (only with autoSend=true)
schedule.autoSendEmails.sendToCustomerbooleanEmail the issued document to the customer
schedule.autoSendEmails.customerEmailstringAlternative customer email for the sending. If omitted, the email on the customer's record is used.
schedule.autoSendEmails.sendToIssuerbooleanSend a copy of the issued document to the account's email
schedule.namestringInternal 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

FieldTypeDescription
idstringSchedule ID. Also the scheduleTemplateId of the documents issued from it.
numberstring · can be nullInternal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series.
documentTypestring · can be nullDocument type to issue
statusstringTemplate status — always SCHEDULED; the schedule status is in schedule.status
notesstring · can be nullNotes copied to each document
caestring · can be nullCAE code
seriesobject · can be nullSeries the documents are issued in
series.refstring · can be nullSeries identifier
series.namestring · can be nullSeries name
customerobject · can be nullCustomer
customer.refstring · can be nullCustomer identifier
customer.dataobject · can be nullCustomer data
customer.data.taxpayerNumberstring · can be nullTax number (NIF)
customer.data.namestring · can be nullCustomer name
customer.data.emailstring · can be nullCustomer email
customer.data.countrystring · can be nullCustomer country
customer.data.phonestring · can be nullCustomer phone
summaryobject · can be nullTotals of each document to issue
summary.amountWithoutTaxnumber · can be nullAmount without tax
summary.amountWithTaxnumber · can be nullAmount with tax
summary.amountWithoutTaxWithoutDiscountnumber · can be nullAmount without tax and discount
summary.taxAmountnumber · can be nullTax amount
summary.globalDiscountTypestring · can be nullGlobal discount type
One of: AMOUNT, PERCENT
summary.globalDiscountPercentnumber · can be nullGlobal discount percentage
summary.globalDiscountAmountnumber · can be nullGlobal discount amount
summary.totalnumber · can be nullTotal
summary.totalToPaynumber · can be nullTotal payable
summary.withholdingTaxAmountnumber · can be nullWithholding tax amount
summary.creditNotesTotalnumber · can be nullTotal of credit notes
itemsobject[] · can be nullItems
items[].idstringIdentifier of the item on the invoice
items[].refstring · can be nullItem reference
items[].metaobject · can be nullItem metadata
items[].meta.quantitynumber · can be nullItem quantity
items[].meta.amountWithoutTaxnumber · can be nullAmount without tax
items[].meta.amountWithTaxnumber · can be nullAmount with tax
items[].meta.taxAmountnumber · can be nullTax amount
items[].meta.discountAmountnumber · can be nullDiscount amount applied to the item
items[].meta.unitAmountWithoutTaxnumber · can be nullUnit amount without tax
items[].meta.unitAmountWithTaxnumber · can be nullUnit amount with tax
items[].meta.withholdingTaxAmountnumber · can be nullWithholding tax amount
items[].meta.withholdingTaxEnabledboolean · can be nullWithholding tax enabled
items[].dataobject · can be nullItem data
items[].data.namestring · can be nullItem name
items[].data.descriptionstring · can be nullItem description
items[].data.typestringItem type
items[].data.unitPricenumber · can be nullUnit price
items[].data.taxRatenumber · can be nullTax rate
items[].data.vatRatestring · can be nullVAT rate
items[].data.vatTerritorystring · can be nullVAT territory
items[].data.vatExemptionReasonstring · can be nullVAT exemption reason
items[].data.isAutoVATEnabledboolean · can be nullAutomatic VAT enabled
items[].noteChangeKindstring · can be nullOnly 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[].noteChangeFromnumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line before this note.
items[].noteChangeTonumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line after this note.
scheduleobject · can be nullSchedule
schedule.statusstring · can be nullSchedule 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.frequencystringFrequency. 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.intervalnumber · can be nullInterval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update.
schedule.namestring · can be nullInternal schedule name
schedule.byDaynumber[] · can be nullWeekdays (0 = Monday … 6 = Sunday)
schedule.byMonthDaynumber[] · can be nullDays of the month (1–31)
schedule.timeOfDaystringIssuing time (HH:mm, account's timezone)
schedule.startDatestringStart of the frequency
schedule.endDatestring (date-time) · can be nullEnd of the frequency
schedule.dueDateInDaysRangenumber · can be nullDue term in days
schedule.autoSendboolean · can be nullAutomatic email sending
schedule.autoSendEmailsobject · can be nullRecipients of the automatic sending
schedule.autoSendEmails.sendToCustomerboolean · can be null
schedule.autoSendEmails.customerEmailstring · can be null
schedule.autoSendEmails.sendToIssuerboolean · can be null
schedule.nextRunAtstring (date-time) · can be nullNext planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped.
schedule.failReasonstring · can be nullReason for the last failure, when status=FAILED
createdAtstring · can be nullCreation date
updatedAtstring · can be nullLast change date

Errors

  • 400 Invalid data, or a schedule with no occurrences (endDate before startDate, say)
  • 401 Unauthorized - API key missing or invalid
  • 403 The account plan does not include recurring invoices
  • 409 A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown
  • 422 The 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

Authentication: an API key (x-api-key).

Parameters

NameInTypeDescription
id requiredpathstringRecurring 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

FieldTypeDescription
idstringSchedule ID. Also the scheduleTemplateId of the documents issued from it.
numberstring · can be nullInternal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series.
documentTypestring · can be nullDocument type to issue
statusstringTemplate status — always SCHEDULED; the schedule status is in schedule.status
notesstring · can be nullNotes copied to each document
caestring · can be nullCAE code
seriesobject · can be nullSeries the documents are issued in
series.refstring · can be nullSeries identifier
series.namestring · can be nullSeries name
customerobject · can be nullCustomer
customer.refstring · can be nullCustomer identifier
customer.dataobject · can be nullCustomer data
customer.data.taxpayerNumberstring · can be nullTax number (NIF)
customer.data.namestring · can be nullCustomer name
customer.data.emailstring · can be nullCustomer email
customer.data.countrystring · can be nullCustomer country
customer.data.phonestring · can be nullCustomer phone
summaryobject · can be nullTotals of each document to issue
summary.amountWithoutTaxnumber · can be nullAmount without tax
summary.amountWithTaxnumber · can be nullAmount with tax
summary.amountWithoutTaxWithoutDiscountnumber · can be nullAmount without tax and discount
summary.taxAmountnumber · can be nullTax amount
summary.globalDiscountTypestring · can be nullGlobal discount type
One of: AMOUNT, PERCENT
summary.globalDiscountPercentnumber · can be nullGlobal discount percentage
summary.globalDiscountAmountnumber · can be nullGlobal discount amount
summary.totalnumber · can be nullTotal
summary.totalToPaynumber · can be nullTotal payable
summary.withholdingTaxAmountnumber · can be nullWithholding tax amount
summary.creditNotesTotalnumber · can be nullTotal of credit notes
itemsobject[] · can be nullItems
items[].idstringIdentifier of the item on the invoice
items[].refstring · can be nullItem reference
items[].metaobject · can be nullItem metadata
items[].meta.quantitynumber · can be nullItem quantity
items[].meta.amountWithoutTaxnumber · can be nullAmount without tax
items[].meta.amountWithTaxnumber · can be nullAmount with tax
items[].meta.taxAmountnumber · can be nullTax amount
items[].meta.discountAmountnumber · can be nullDiscount amount applied to the item
items[].meta.unitAmountWithoutTaxnumber · can be nullUnit amount without tax
items[].meta.unitAmountWithTaxnumber · can be nullUnit amount with tax
items[].meta.withholdingTaxAmountnumber · can be nullWithholding tax amount
items[].meta.withholdingTaxEnabledboolean · can be nullWithholding tax enabled
items[].dataobject · can be nullItem data
items[].data.namestring · can be nullItem name
items[].data.descriptionstring · can be nullItem description
items[].data.typestringItem type
items[].data.unitPricenumber · can be nullUnit price
items[].data.taxRatenumber · can be nullTax rate
items[].data.vatRatestring · can be nullVAT rate
items[].data.vatTerritorystring · can be nullVAT territory
items[].data.vatExemptionReasonstring · can be nullVAT exemption reason
items[].data.isAutoVATEnabledboolean · can be nullAutomatic VAT enabled
items[].noteChangeKindstring · can be nullOnly 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[].noteChangeFromnumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line before this note.
items[].noteChangeTonumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line after this note.
scheduleobject · can be nullSchedule
schedule.statusstring · can be nullSchedule 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.frequencystringFrequency. 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.intervalnumber · can be nullInterval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update.
schedule.namestring · can be nullInternal schedule name
schedule.byDaynumber[] · can be nullWeekdays (0 = Monday … 6 = Sunday)
schedule.byMonthDaynumber[] · can be nullDays of the month (1–31)
schedule.timeOfDaystringIssuing time (HH:mm, account's timezone)
schedule.startDatestringStart of the frequency
schedule.endDatestring (date-time) · can be nullEnd of the frequency
schedule.dueDateInDaysRangenumber · can be nullDue term in days
schedule.autoSendboolean · can be nullAutomatic email sending
schedule.autoSendEmailsobject · can be nullRecipients of the automatic sending
schedule.autoSendEmails.sendToCustomerboolean · can be null
schedule.autoSendEmails.customerEmailstring · can be null
schedule.autoSendEmails.sendToIssuerboolean · can be null
schedule.nextRunAtstring (date-time) · can be nullNext planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped.
schedule.failReasonstring · can be nullReason for the last failure, when status=FAILED
createdAtstring · can be nullCreation date
updatedAtstring · can be nullLast change date

Errors

  • 401 Unauthorized - API key missing or invalid
  • 404 Recurring 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.

Authentication: an API key (x-api-key). Send an Idempotency-Key to retry this call safely.

Parameters

NameInTypeDescription
id requiredpathstringRecurring invoice ID

Request body

Schedule fields to update

FieldTypeDescription
frequencystringFrequency. 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
startDatestringFirst day the frequency is computed from (ISO 8601). The first document is issued on the first occurrence of the frequency from this date.
timeOfDaystringIssuing time as HH:mm, in the account's timezone. If omitted, 12:00 is used.
byDaynumber[]Weekdays to issue on (0 = Monday … 6 = Sunday). Only with frequency=WEEKLY.
byMonthDaynumber[]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.
dueDateInDaysRangenumberDue term in days, counted from each document's issue date. 0 (or omitted) = due on the same day.
autoSendbooleanEmail each issued document automatically, as set in autoSendEmails
autoSendEmailsobjectRecipients of the automatic sending (only with autoSend=true)
autoSendEmails.sendToCustomerbooleanEmail the issued document to the customer
autoSendEmails.customerEmailstringAlternative customer email for the sending. If omitted, the email on the customer's record is used.
autoSendEmails.sendToIssuerbooleanSend a copy of the issued document to the account's email
namestringInternal schedule name (optional)
statusstringPause (PAUSED) or (re)activate (SCHEDULED) the schedule. A FAILED or COMPLETED schedule only issues again after receiving SCHEDULED.
One of: SCHEDULED, PAUSED
endDatestring (date-time) · can be nullLast 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

FieldTypeDescription
idstringSchedule ID. Also the scheduleTemplateId of the documents issued from it.
numberstring · can be nullInternal template reference (SCHED-0001, …). Not a fiscal number — each issued document gets its own number in the series.
documentTypestring · can be nullDocument type to issue
statusstringTemplate status — always SCHEDULED; the schedule status is in schedule.status
notesstring · can be nullNotes copied to each document
caestring · can be nullCAE code
seriesobject · can be nullSeries the documents are issued in
series.refstring · can be nullSeries identifier
series.namestring · can be nullSeries name
customerobject · can be nullCustomer
customer.refstring · can be nullCustomer identifier
customer.dataobject · can be nullCustomer data
customer.data.taxpayerNumberstring · can be nullTax number (NIF)
customer.data.namestring · can be nullCustomer name
customer.data.emailstring · can be nullCustomer email
customer.data.countrystring · can be nullCustomer country
customer.data.phonestring · can be nullCustomer phone
summaryobject · can be nullTotals of each document to issue
summary.amountWithoutTaxnumber · can be nullAmount without tax
summary.amountWithTaxnumber · can be nullAmount with tax
summary.amountWithoutTaxWithoutDiscountnumber · can be nullAmount without tax and discount
summary.taxAmountnumber · can be nullTax amount
summary.globalDiscountTypestring · can be nullGlobal discount type
One of: AMOUNT, PERCENT
summary.globalDiscountPercentnumber · can be nullGlobal discount percentage
summary.globalDiscountAmountnumber · can be nullGlobal discount amount
summary.totalnumber · can be nullTotal
summary.totalToPaynumber · can be nullTotal payable
summary.withholdingTaxAmountnumber · can be nullWithholding tax amount
summary.creditNotesTotalnumber · can be nullTotal of credit notes
itemsobject[] · can be nullItems
items[].idstringIdentifier of the item on the invoice
items[].refstring · can be nullItem reference
items[].metaobject · can be nullItem metadata
items[].meta.quantitynumber · can be nullItem quantity
items[].meta.amountWithoutTaxnumber · can be nullAmount without tax
items[].meta.amountWithTaxnumber · can be nullAmount with tax
items[].meta.taxAmountnumber · can be nullTax amount
items[].meta.discountAmountnumber · can be nullDiscount amount applied to the item
items[].meta.unitAmountWithoutTaxnumber · can be nullUnit amount without tax
items[].meta.unitAmountWithTaxnumber · can be nullUnit amount with tax
items[].meta.withholdingTaxAmountnumber · can be nullWithholding tax amount
items[].meta.withholdingTaxEnabledboolean · can be nullWithholding tax enabled
items[].dataobject · can be nullItem data
items[].data.namestring · can be nullItem name
items[].data.descriptionstring · can be nullItem description
items[].data.typestringItem type
items[].data.unitPricenumber · can be nullUnit price
items[].data.taxRatenumber · can be nullTax rate
items[].data.vatRatestring · can be nullVAT rate
items[].data.vatTerritorystring · can be nullVAT territory
items[].data.vatExemptionReasonstring · can be nullVAT exemption reason
items[].data.isAutoVATEnabledboolean · can be nullAutomatic VAT enabled
items[].noteChangeKindstring · can be nullOnly 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[].noteChangeFromnumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line before this note.
items[].noteChangeTonumber · can be nullWith noteChangeKind: the quantity or unit price of the invoice line after this note.
scheduleobject · can be nullSchedule
schedule.statusstring · can be nullSchedule 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.frequencystringFrequency. 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.intervalnumber · can be nullInterval between occurrences. Only has an effect with frequency=CUSTOM (schedules created in the web app); the API keeps it on update.
schedule.namestring · can be nullInternal schedule name
schedule.byDaynumber[] · can be nullWeekdays (0 = Monday … 6 = Sunday)
schedule.byMonthDaynumber[] · can be nullDays of the month (1–31)
schedule.timeOfDaystringIssuing time (HH:mm, account's timezone)
schedule.startDatestringStart of the frequency
schedule.endDatestring (date-time) · can be nullEnd of the frequency
schedule.dueDateInDaysRangenumber · can be nullDue term in days
schedule.autoSendboolean · can be nullAutomatic email sending
schedule.autoSendEmailsobject · can be nullRecipients of the automatic sending
schedule.autoSendEmails.sendToCustomerboolean · can be null
schedule.autoSendEmails.customerEmailstring · can be null
schedule.autoSendEmails.sendToIssuerboolean · can be null
schedule.nextRunAtstring (date-time) · can be nullNext planned issue. Null when there are no more occurrences (COMPLETED) or the schedule is stopped.
schedule.failReasonstring · can be nullReason for the last failure, when status=FAILED
createdAtstring · can be nullCreation date
updatedAtstring · can be nullLast change date

Errors

  • 400 Invalid data, or a schedule with no occurrences (endDate before startDate, say)
  • 401 Unauthorized - API key missing or invalid
  • 404 Recurring invoice not found
  • 409 A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown
  • 422 The 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.

Authentication: an API key (x-api-key). Send an Idempotency-Key to retry this call safely.

Parameters

NameInTypeDescription
id requiredpathstringRecurring 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

FieldTypeDescription
idstringUnique invoice identifier
createdAtstring · can be nullInvoice creation date

Errors

  • 401 Unauthorized - API key missing or invalid
  • 404 Recurring invoice not found
  • 409 A request with this idempotency key is still being processed, or the outcome of the first attempt is unknown
  • 422 The 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.

All resources