- Fakturan.nu API 2 /
- Estimates /
- create
Params
-
number
Estimate number. Defaults to +1 of highest number currently in account.
-
date
Date string in the format “yyyy-mm-dd”
-
valid_to
Date string in the format “yyyy-mm-dd”. Defaults to “date” plus the estimate validity set in the account settings.
-
client_id
Id of existing client. “client_id” OR “client” is required.
-
our_reference
Name of person who acts as reference at senders company
-
your_reference
Name of person who acts as reference at recievers company
-
locale
One of: “sv”, “en”, “da”, “nb”
- currency
- settings Must be a Hash
-
settings[invoice_template]
One of: “urban”, “clean”, “iconic”, “foxy”, “static”, “original”, “croatia”
-
settings[show_product_code]
Boolean. Should the estimate show the product code column?
-
client
Must be a Hash
See documentation for ‘create client’ for detailed information about the client params. Note: it’s not possible to update a client on an estimate update, only create a client on estimate create.
Metadata::only: :create - rows Must be an Array of nested elements
- rows[id]
- rows[product_id]
-
rows[discount]
Discount in %
-
rows[amount]
How many units of this item? May be fractional (“1.5”).
-
rows[text]
Max length 255
-
rows[product_code]
Max length 30
-
rows[product_name]
Max length 255
-
rows[product_unit]
Max length 30
-
rows[product_price]
Price of this item. May be fractional (“9.95”).
-
rows[product_tax]
One of 25, 12, 6, 0
-
rows[text_row]
Boolean. Show this row as purely text?
- rows[sort_order]
Examples
# Create an estimate to an existing client. valid_to defaults to the estimate date plus the validity set in the account settings.
POST /api/v2/estimates
{
"client_id": 1,
"date": "2026-11-08",
"rows": [
{
"product_name": "My product",
"product_tax": 25,
"product_price": "100",
"amount": "10"
},
{
"text": "Some arbitrary text",
"text_row": true
}
]
}
201
{
"data": {
"id": 1,
"number": 1,
"date": "2026-11-08",
"valid_to": "2026-12-08",
"client_id": 1,
"our_reference": "",
"your_reference": "",
"sent": false,
"status": "pending",
"locale": "sv",
"currency": "SEK",
"settings": {
"prices_inc_tax": "no",
"show_product_code": false,
"invoice_template": "original"
},
"sum": "1250.0",
"net": "1000.0",
"tax": "250.0",
"tax_details": {
"25": "250.0"
},
"address": {
"name": "Google Inc",
"street_address": "1600 Amphitheatre Parkway",
"care_of": "",
"zip_code": "940 43",
"city": "Mountain View",
"country": "SE"
},
"rows": [
{
"id": 1,
"product_id": 0,
"discount": "0.0",
"amount": "10.0",
"text": "",
"product_code": null,
"product_name": "My product",
"product_unit": "",
"product_price": "100.0",
"product_tax": 25,
"text_row": false,
"sort_order": 0,
"tax_deductible": false
},
{
"id": 2,
"product_id": 0,
"discount": "0.0",
"amount": "0.0",
"text": "Some arbitrary text",
"product_code": null,
"product_name": "",
"product_unit": "",
"product_price": "0.0",
"product_tax": 0,
"text_row": true,
"sort_order": 1,
"tax_deductible": false
}
]
}
}
# Invalid estimate
POST /api/v2/estimates
{
"client_id": 0,
"rows": [
{
"product_code": "ABCD-ABCD-ABCD-ABCD-ABCD-ABCD-ABCD-"
}
]
}
422
{
"errors": {
"client_id": [
{
"error": "blank"
}
],
"rows": [
{
"0": {
"rows.product_code": [
{
"error": "too_long",
"count": 30
}
]
}
}
]
}
}
# Create an estimate to a new client.
POST /api/v2/estimates
{
"date": "2026-10-08",
"valid_to": "2026-10-22",
"client": {
"company": "Google",
"address": {
"street_address": "1600 Amphitheatre Parkway",
"zip_code": "94043",
"city": "Mountain View",
"country": "SE"
}
},
"rows": [
{
"product_name": "My product",
"product_tax": 25,
"product_price": "100",
"amount": "10"
}
]
}
201
{
"data": {
"id": 3,
"number": 1,
"date": "2026-10-08",
"valid_to": "2026-10-22",
"client_id": 2,
"our_reference": "",
"your_reference": "",
"sent": false,
"status": "pending",
"locale": "sv",
"currency": "SEK",
"settings": {
"prices_inc_tax": "no",
"show_product_code": false,
"invoice_template": "original"
},
"sum": "1250.0",
"net": "1000.0",
"tax": "250.0",
"tax_details": {
"25": "250.0"
},
"address": {
"name": "Google",
"street_address": "1600 Amphitheatre Parkway",
"care_of": "",
"zip_code": "940 43",
"city": "Mountain View",
"country": "SE"
},
"rows": [
{
"id": 5,
"product_id": 0,
"discount": "0.0",
"amount": "10.0",
"text": "",
"product_code": null,
"product_name": "My product",
"product_unit": "",
"product_price": "100.0",
"product_tax": 25,
"text_row": false,
"sort_order": 0,
"tax_deductible": false
}
]
}
}