API reference

Pro formas

Commercial proposals before an invoice. Not fiscal documents: never reported to the AT. 6 operations.

List pro formas

GET /proposals

Returns a list of pro formas with pagination and filters. By default, returns 20 records starting at offset 0.

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. date:desc, number:asc)
searchquerystringGlobal search term (number, customer, etc.)
statusquerystringFilter by status
One of: CANCELED, CREATED, ISSUED, PROCESSING
fromDatequerystringFilter from this date (ISO 8601 with timezone)
toDatequerystringFilter up to this date (ISO 8601 with timezone)
curl 'https://api.fiz.co/proposals' \
  --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.proposals.list();
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.proposals.list()
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->proposals->list();

Response 200

List of pro formas returned successfully

FieldTypeDescription
[].idstringUnique pro forma identifier
[].numberstring · can be nullPro forma number, assigned at creation
[].documentTypestring · can be nullDocument type
One of: PROFORMA
[].statusstringStatus: CREATED (active), ISSUED (converted into an invoice), CANCELED (void)
One of: CANCELED, CREATED, ISSUED, PROCESSING
[].datestring · can be nullDocument date
[].dueDatestring · can be nullValidity / due date
[].currencystring · can be nullCurrency
[].notesstring · can be nullNotes
[].caestring · can be nullCAE code
[].seriesobject · can be nullSeries
[].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
[].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.
[].relatedDocumentsobject[] · can be nullInvoices raised from this pro forma
[].relatedDocuments[].idstringIdentifier of the invoice raised from the pro forma
[].relatedDocuments[].numberstring · can be nullInvoice number
[].relatedDocuments[].documentTypestring · can be nullDocument type
[].relatedDocuments[].statusstringInvoice status
[].relatedDocuments[].datestring · can be nullInvoice date
[].createdAtstring · can be nullCreation date
[].canceledAtstring · can be nullCancellation date, when canceled

Errors

  • 400 Invalid parameters
  • 401 Unauthorized - API key missing or invalid

Create pro forma

POST /proposals

Creates a pro forma (commercial proposal). A pro forma is numbered immediately (PF …), is not reported to the AT and has no fiscal effect. It stays CREATED until it is converted into an invoice in the FIZ app (ISSUED) or canceled (CANCELED).

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

Request body

Data required to create the pro forma

FieldTypeDescription
datestringDocument date (optional). If omitted, the current date and time are used.
dueDatestringValidity / due date of the pro forma (optional). If omitted, the document date is used.
caestringCAE code (economic activity classification). Optional on a pro forma, but required once it is converted into an invoice.
customerId requiredstringCustomer identifier
seriesIdstringSeries identifier (optional). Use the "id" returned by GET /series.
notesstringPro forma notes (optional)
items requiredobject[]List of pro forma 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.
summaryobjectPro forma 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
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)
curl --request POST 'https://api.fiz.co/proposals' \
  --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 '{
  "customerId": "6863b1513117c5892ff55296",
  "items": [
    {
      "id": "68483e978073231c3947077c",
      "quantity": 1,
      "discountType": "PERCENT",
      "discountPercent": 10
    }
  ]
}'
import { Fiz } from '@fiz-co/sdk';

const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.proposals.create({
  customerId: '6863b1513117c5892ff55296',
  items: [
    {
      id: '68483e978073231c3947077c',
      quantity: 1,
      discountType: 'PERCENT',
      discountPercent: 10,
    },
  ],
});
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.proposals.create({
    "customerId": "6863b1513117c5892ff55296",
    "items": [
        {
            "id": "68483e978073231c3947077c",
            "quantity": 1,
            "discountType": "PERCENT",
            "discountPercent": 10,
        },
    ],
})
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->proposals->create([
    'customerId' => '6863b1513117c5892ff55296',
    'items' => [
        [
            'id' => '68483e978073231c3947077c',
            'quantity' => 1,
            'discountType' => 'PERCENT',
            'discountPercent' => 10,
        ],
    ],
]);

Response 201

Pro forma created successfully

FieldTypeDescription
idstringUnique pro forma identifier
numberstring · can be nullPro forma number, assigned at creation
documentTypestring · can be nullDocument type
One of: PROFORMA
statusstringStatus: CREATED (active), ISSUED (converted into an invoice), CANCELED (void)
One of: CANCELED, CREATED, ISSUED, PROCESSING
datestring · can be nullDocument date
dueDatestring · can be nullValidity / due date
currencystring · can be nullCurrency
notesstring · can be nullNotes
caestring · can be nullCAE code
seriesobject · can be nullSeries
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
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.
relatedDocumentsobject[] · can be nullInvoices raised from this pro forma
relatedDocuments[].idstringIdentifier of the invoice raised from the pro forma
relatedDocuments[].numberstring · can be nullInvoice number
relatedDocuments[].documentTypestring · can be nullDocument type
relatedDocuments[].statusstringInvoice status
relatedDocuments[].datestring · can be nullInvoice date
createdAtstring · can be nullCreation date
canceledAtstring · can be nullCancellation date, when canceled

Errors

  • 400 Invalid data
  • 401 Unauthorized - API key missing or invalid
  • 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 pro forma by ID

GET /proposals/{id}

Returns a pro forma with its lines, totals and the invoices raised from it (relatedDocuments).

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

Parameters

NameInTypeDescription
id requiredpathstringPro forma identifier
curl 'https://api.fiz.co/proposals/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.proposals.retrieve('ID');
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.proposals.retrieve("ID")
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->proposals->retrieve('ID');

Response 200

Pro forma found

FieldTypeDescription
idstringUnique pro forma identifier
numberstring · can be nullPro forma number, assigned at creation
documentTypestring · can be nullDocument type
One of: PROFORMA
statusstringStatus: CREATED (active), ISSUED (converted into an invoice), CANCELED (void)
One of: CANCELED, CREATED, ISSUED, PROCESSING
datestring · can be nullDocument date
dueDatestring · can be nullValidity / due date
currencystring · can be nullCurrency
notesstring · can be nullNotes
caestring · can be nullCAE code
seriesobject · can be nullSeries
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
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.
relatedDocumentsobject[] · can be nullInvoices raised from this pro forma
relatedDocuments[].idstringIdentifier of the invoice raised from the pro forma
relatedDocuments[].numberstring · can be nullInvoice number
relatedDocuments[].documentTypestring · can be nullDocument type
relatedDocuments[].statusstringInvoice status
relatedDocuments[].datestring · can be nullInvoice date
createdAtstring · can be nullCreation date
canceledAtstring · can be nullCancellation date, when canceled

Errors

  • 401 Unauthorized - API key missing or invalid
  • 404 Pro forma not found

Delete pro forma

DELETE /proposals/{id}

Permanently deletes an active (CREATED) or canceled (CANCELED) pro forma. A pro forma converted into an invoice (ISSUED) cannot be deleted, because the invoice references it.

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

Parameters

NameInTypeDescription
id requiredpathstringPro forma identifier
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)
curl --request DELETE 'https://api.fiz.co/proposals/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.proposals.delete('ID');
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.proposals.delete("ID")
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->proposals->delete('ID');

Response 200

Pro forma deleted successfully

FieldTypeDescription
idstringIdentifier of the deleted pro forma
numberstring · can be nullNumber of the deleted pro forma
statusstringStatus at the time of deletion
One of: CANCELED, CREATED, ISSUED, PROCESSING

Errors

  • 400 Pro forma converted into an invoice — cannot be deleted
  • 401 Unauthorized - API key missing or invalid
  • 404 Pro forma 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

Cancel pro forma

POST /proposals/{id}/cancel

Cancels an active (CREATED) pro forma. The pro forma becomes CANCELED and stays in the history. A pro forma already converted into an invoice (ISSUED) cannot be canceled.

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

Parameters

NameInTypeDescription
id requiredpathstringPro forma identifier
# Once per operation. Keep it and reuse it on every retry.
IDEMPOTENCY_KEY=$(uuidgen)
curl --request POST 'https://api.fiz.co/proposals/ID/cancel' \
  --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.proposals.cancel('ID');
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.proposals.cancel("ID")
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->proposals->cancel('ID');

Response 200

Pro forma canceled successfully

FieldTypeDescription
idstringUnique pro forma identifier
numberstring · can be nullPro forma number, assigned at creation
documentTypestring · can be nullDocument type
One of: PROFORMA
statusstringStatus: CREATED (active), ISSUED (converted into an invoice), CANCELED (void)
One of: CANCELED, CREATED, ISSUED, PROCESSING
datestring · can be nullDocument date
dueDatestring · can be nullValidity / due date
currencystring · can be nullCurrency
notesstring · can be nullNotes
caestring · can be nullCAE code
seriesobject · can be nullSeries
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
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.
relatedDocumentsobject[] · can be nullInvoices raised from this pro forma
relatedDocuments[].idstringIdentifier of the invoice raised from the pro forma
relatedDocuments[].numberstring · can be nullInvoice number
relatedDocuments[].documentTypestring · can be nullDocument type
relatedDocuments[].statusstringInvoice status
relatedDocuments[].datestring · can be nullInvoice date
createdAtstring · can be nullCreation date
canceledAtstring · can be nullCancellation date, when canceled

Errors

  • 400 Pro forma already converted into an invoice or already canceled
  • 401 Unauthorized - API key missing or invalid
  • 404 Pro forma 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

Download pro forma PDF

GET /proposals/{id}/pdf

Generates and returns the download link for the PDF of a pro forma.

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

Parameters

NameInTypeDescription
id requiredpathstringPro forma identifier
isDuplicatequerybooleanMark PDF as duplicate
templateIdquerystringID of the template to use
curl 'https://api.fiz.co/proposals/ID/pdf' \
  --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.proposals.pdf('ID');
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.proposals.pdf("ID")
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->proposals->pdf('ID');

Response 200

PDF generated successfully

FieldTypeDescription
idstringPDF file ID
namestring · can be nullPDF file name
urlstring · can be nullPDF download URL

Errors

  • 401 Unauthorized - API key missing or invalid
  • 404 Pro forma not found

Errors

Errors share one shape: statusCode, message, code and error, with the request id in the X-Request-Id header.

All resources