Ir al contenido

API de proformas

List the quotes

GET
/v1/ec/quotes

Your business's quotes in its environment, the newest first, of every status or of status. Poll it with updated_at[gte] to read what changed since: every change moves updated_at, the daily expiry check's too.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Query Parameters

limit?integer

How many per page, from 1 to 100.

Range1 <= value <= 100
Default20
cursor?string

The next_cursor or prev_cursor of a previous response. Without a cursor, the first page.

Lengthlength <= 200
created_at[gte]?string

Only what was created at or after this moment, ISO 8601 with its offset.

Formatdate-time
created_at[lte]?string

Only what was created at or before this moment, ISO 8601 with its offset.

Formatdate-time
updated_at[gte]?string

Only what last changed at or after this moment, ISO 8601 with its offset: poll with the time of your last read to get what changed since.

Formatdate-time
updated_at[lte]?string

Only what last changed at or before this moment, ISO 8601 with its offset.

Formatdate-time
status?|array<>

Only in these statuses, as status reports them today; repeat it for several (status=sent&status=accepted).

counterparty_identification?string

Only those to this buyer, by their identification.

Lengthlength <= 20
q?string

Its number (PRO-000012 or 12), or the start of its customer's name or identification.

Lengthlength <= 100
metadata?

Only those whose metadata has exactly these pairs, for example metadata[order_id]=5812345678901. Up to 20; all must match.

Response Body

The quotes

application/json
  1. response
object*"list"
Value in"list"
data*array<>
next_cursor*|

The next page (older); null if there are no more.

prev_cursor*|

The previous page (newer); null on the first.

Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/quotes'
Example Response
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "object": "quote",
      "country": "ec",
      "business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
      "environment": "sandbox",
      "establishment": "string",
      "number": "string",
      "status": "draft",
      "status_transitions": {
        "draft": "2019-08-24T14:15:22Z",
        "sent": "2019-08-24T14:15:22Z",
        "accepted": "2019-08-24T14:15:22Z",
        "expired": "2019-08-24T14:15:22Z",
        "invoiced": "2019-08-24T14:15:22Z"
      },
      "issue_date": "2019-08-24",
      "valid_until": "2019-08-24",
      "currency": "string",
      "total": "string",
      "counterparty": {
        "name": "string",
        "identification": "string"
      },
      "document": {
        "property1": null,
        "property2": null
      },
      "calculation": {
        "lines": [
          {
            "code": "string",
            "auxiliary_code": "string",
            "description": "string",
            "unit": "string",
            "quantity": "string",
            "unit_price": "string",
            "discount": "string",
            "net": "string",
            "taxes": [
              {
                "type": "iva",
                "rate": "iva_15",
                "base": "string",
                "value": "string"
              }
            ],
            "additional_info": [
              {
                "name": "string",
                "value": "string"
              }
            ],
            "unsubsidized_price": "string"
          }
        ],
        "taxes": [
          {
            "type": "iva",
            "rate": "iva_15",
            "base": "string",
            "value": "string",
            "additional_discount": "string",
            "refund": "string"
          }
        ],
        "subtotal": "string",
        "discount": "string",
        "iva": "string",
        "ice": "string",
        "irbpnr": "string",
        "total": "string",
        "subsidy": "string",
        "tip": "string",
        "issue_date": "2019-08-24",
        "buyer": {
          "identification_type": "ruc",
          "identification": "string",
          "name": "string",
          "address": "string",
          "email": "string"
        },
        "payments": [
          {
            "method": "sin_sistema_financiero",
            "amount": "string",
            "term": {
              "length": 0,
              "unit": "days"
            }
          }
        ],
        "plate": "string",
        "delivery_note_number": "string",
        "export": {
          "incoterm": "string",
          "incoterm_place": "string",
          "origin_country": "string",
          "loading_port": "string",
          "destination_port": "string",
          "destination_country": "string",
          "acquisition_country": "string",
          "subtotal_incoterm": "string",
          "international_freight": "string",
          "international_insurance": "string",
          "customs_costs": "string",
          "other_transport_costs": "string"
        },
        "reimbursement": {
          "document_type": "factura",
          "total": "string",
          "base": "string",
          "tax": "string",
          "documents": [
            {
              "supplier": {
                "identification_type": "ruc",
                "identification": "string"
              },
              "supplier_type": "persona_natural",
              "payment_country": "string",
              "document_type": "factura",
              "number": "string",
              "issue_date": "2019-08-24",
              "authorization_number": "string",
              "taxes": [
                {
                  "type": "iva",
                  "rate": "iva_15",
                  "base": "string",
                  "value": "string"
                }
              ],
              "compensations": [
                {
                  "code": "string",
                  "rate": "string",
                  "value": "string"
                }
              ]
            }
          ]
        },
        "withholdings": [
          {
            "type": "iva_100",
            "value": "string"
          }
        ],
        "withheld_iva": "string",
        "withheld_renta": "string",
        "substitute_delivery_note": {
          "origin_address": "string",
          "destination_address": "string",
          "transport_start": "string",
          "transport_end": "string",
          "carrier": {
            "identification_type": "ruc",
            "identification": "string",
            "name": "string"
          },
          "plate": "string",
          "destinations": [
            {
              "reason": "string",
              "customs_document": "string",
              "destination_establishment": "string",
              "route": "string"
            }
          ]
        },
        "third_party_charges": [
          {
            "concept": "string",
            "amount": "string"
          }
        ],
        "negotiable": {
          "notification_email": "string"
        },
        "compensations": [
          {
            "code": "string",
            "rate": "string",
            "value": "string"
          }
        ],
        "fiscal_machine": {
          "brand": "string",
          "model": "string",
          "serial": "string"
        },
        "additional_info": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "pdf_ready": true,
      "sent_to": "string",
      "invoice": {
        "object": "document",
        "type": "invoice",
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "number": "string"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "next_cursor": "string",
  "prev_cursor": "string"
}

Make a quote

POST
/v1/ec/quotes

A quote for your customer, with no tax validity: it is never sent to the SRI, takes no series and counts against no plan's documents. It is numbered PRO-000001 on, dated today, and a draft until it is sent; its PDF renders in seconds (pdf_ready). Email it with POST /v1/ec/quotes/{id}/send and issue the factura it becomes with POST /v1/ec/quotes/{id}/convert. Tells quote.created.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Header Parameters

idempotency-key?string

Send the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.

Length1 <= length <= 255

Request Body

application/json
  1. body
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

establishment?string

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
metadata?

Up to 20 pairs of your own, such as your CRM's deal id, returned as sent and never interpreted, as a document's: the list filters by them (metadata[key]=value), and the factura issued from the quote carries them unless its request brings its own.

valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate

Response Body

Made

application/json
  1. response
id*string
Formatuuid
object*"quote"
Value in"quote"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
business_id*string
Formatuuid
environment*string
Value in"sandbox""test""live"
establishment*|

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
number*string

Its number among the business's quotes in the environment, PRO-000001: no SRI series, no establishment or emission point.

status*string

draft until it is sent; sent once emailed; accepted when you mark that your customer took it; expired for a draft or a sent one whose valid_until has passed; invoiced once a factura was issued from it (invoice).

Value in"draft""sent""accepted""expired""invoiced"
status_transitions*

When it last reached each status it has been in: draft when it was made, sent when it was last emailed, accepted, expired when the daily check found it expired (the day after valid_until, at 00:05 in Ecuador) and invoiced.

issue_date*string

The day it was made, in Ecuador.

Formatdate
valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
total*string

What it comes to, by the factura's calculation.

counterparty*
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

calculation*

What the factura's calculation makes of document on its issue_date, in the fields an invoice carries after its envelope: the buyer, each line with its taxes, taxes by rate, subtotal, discount, iva, total and the payments.

metadata*
pdf_ready*boolean

Whether the PDF of its current version is rendered: it renders again after every change, in seconds.

sent_to*|

Where it was last emailed, the addresses separated by commas.

invoice*|

The factura issued from it, once it is invoiced, with its number as it stands: whole at GET /v1/ec/documents/{id}, which names the quote back in quote_id.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/quotes' \
  -H 'Content-Type: application/json' \
  -d '{
  "document": {
    "buyer": {
      "identification_type": "ruc",
      "identification": "1790012345001",
      "name": "FERRETERÍA EL SOL S.A.",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "email": "compras@elsol.ec"
    },
    "lines": [
      {
        "code": "SKU-1",
        "description": "Taladro percutor",
        "quantity": "2",
        "unit_price": "120.00",
        "taxes": [
          {
            "type": "iva",
            "rate": "iva_15"
          }
        ]
      },
      {
        "code": "SKU-1",
        "description": "Guantes",
        "quantity": "2",
        "unit_price": "4.50",
        "taxes": [
          {
            "type": "iva",
            "rate": "iva_0"
          }
        ]
      }
    ],
    "payments": [
      {
        "method": "tarjeta_credito",
        "term": {
          "length": 30,
          "unit": "days"
        }
      }
    ],
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ]
  },
  "valid_until": "2026-11-26"
}'
Example Response
{
  "id": "01a21860-6785-7b0c-8854-7b87cf25fe47",
  "object": "quote",
  "country": "ec",
  "business_id": "01a21860-66d5-7966-b23f-f23170b3c8df",
  "environment": "sandbox",
  "establishment": null,
  "number": "PRO-000001",
  "status": "draft",
  "status_transitions": {
    "draft": "2026-11-26T15:01:40.868Z"
  },
  "issue_date": "2026-11-26",
  "valid_until": "2026-11-26",
  "currency": "USD",
  "total": "285.00",
  "counterparty": {
    "name": "FERRETERÍA EL SOL S.A.",
    "identification": "1790012345001"
  },
  "document": {
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_15",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "120.00",
        "description": "Taladro percutor"
      },
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_0",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "4.50",
        "description": "Guantes"
      }
    ],
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "method": "tarjeta_credito"
      }
    ],
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ]
  },
  "calculation": {
    "ice": "0.00",
    "iva": "36.00",
    "tip": "0.00",
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "net": "240.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "240.00",
            "rate": "iva_15",
            "type": "iva",
            "value": "36.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "120",
        "description": "Taladro percutor",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      },
      {
        "net": "9.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "9.00",
            "rate": "iva_0",
            "type": "iva",
            "value": "0.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "4.5",
        "description": "Guantes",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      }
    ],
    "plate": null,
    "taxes": [
      {
        "base": "240.00",
        "rate": "iva_15",
        "type": "iva",
        "value": "36.00",
        "refund": null,
        "additional_discount": null
      },
      {
        "base": "9.00",
        "rate": "iva_0",
        "type": "iva",
        "value": "0.00",
        "refund": null,
        "additional_discount": null
      }
    ],
    "total": "285.00",
    "export": null,
    "irbpnr": "0.00",
    "subsidy": null,
    "discount": "0.00",
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "amount": "285.00",
        "method": "tarjeta_credito"
      }
    ],
    "subtotal": "249.00",
    "issue_date": "2026-11-26",
    "negotiable": null,
    "withheld_iva": null,
    "withholdings": [],
    "compensations": [],
    "reimbursement": null,
    "fiscal_machine": null,
    "withheld_renta": null,
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ],
    "third_party_charges": [],
    "delivery_note_number": null,
    "substitute_delivery_note": null
  },
  "metadata": {},
  "pdf_ready": false,
  "sent_to": null,
  "invoice": null,
  "created_at": "2026-11-26T15:01:40.868Z",
  "updated_at": "2026-11-26T15:01:40.868Z"
}

Get a quote

GET
/v1/ec/quotes/{id}

One quote by its id, with its lines, its totals and where it stands.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Response Body

The quote

application/json
  1. response
id*string
Formatuuid
object*"quote"
Value in"quote"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
business_id*string
Formatuuid
environment*string
Value in"sandbox""test""live"
establishment*|

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
number*string

Its number among the business's quotes in the environment, PRO-000001: no SRI series, no establishment or emission point.

status*string

draft until it is sent; sent once emailed; accepted when you mark that your customer took it; expired for a draft or a sent one whose valid_until has passed; invoiced once a factura was issued from it (invoice).

Value in"draft""sent""accepted""expired""invoiced"
status_transitions*

When it last reached each status it has been in: draft when it was made, sent when it was last emailed, accepted, expired when the daily check found it expired (the day after valid_until, at 00:05 in Ecuador) and invoiced.

issue_date*string

The day it was made, in Ecuador.

Formatdate
valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
total*string

What it comes to, by the factura's calculation.

counterparty*
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

calculation*

What the factura's calculation makes of document on its issue_date, in the fields an invoice carries after its envelope: the buyer, each line with its taxes, taxes by rate, subtotal, discount, iva, total and the payments.

metadata*
pdf_ready*boolean

Whether the PDF of its current version is rendered: it renders again after every change, in seconds.

sent_to*|

Where it was last emailed, the addresses separated by commas.

invoice*|

The factura issued from it, once it is invoiced, with its number as it stands: whole at GET /v1/ec/documents/{id}, which names the quote back in quote_id.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "id": "01a21860-6785-7b0c-8854-7b87cf25fe47",
  "object": "quote",
  "country": "ec",
  "business_id": "01a21860-66d5-7966-b23f-f23170b3c8df",
  "environment": "sandbox",
  "establishment": null,
  "number": "PRO-000001",
  "status": "draft",
  "status_transitions": {
    "draft": "2026-11-26T15:01:40.868Z"
  },
  "issue_date": "2026-11-26",
  "valid_until": "2026-11-26",
  "currency": "USD",
  "total": "285.00",
  "counterparty": {
    "name": "FERRETERÍA EL SOL S.A.",
    "identification": "1790012345001"
  },
  "document": {
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_15",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "120.00",
        "description": "Taladro percutor"
      },
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_0",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "4.50",
        "description": "Guantes"
      }
    ],
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "method": "tarjeta_credito"
      }
    ],
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ]
  },
  "calculation": {
    "ice": "0.00",
    "iva": "36.00",
    "tip": "0.00",
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "net": "240.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "240.00",
            "rate": "iva_15",
            "type": "iva",
            "value": "36.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "120",
        "description": "Taladro percutor",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      },
      {
        "net": "9.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "9.00",
            "rate": "iva_0",
            "type": "iva",
            "value": "0.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "4.5",
        "description": "Guantes",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      }
    ],
    "plate": null,
    "taxes": [
      {
        "base": "240.00",
        "rate": "iva_15",
        "type": "iva",
        "value": "36.00",
        "refund": null,
        "additional_discount": null
      },
      {
        "base": "9.00",
        "rate": "iva_0",
        "type": "iva",
        "value": "0.00",
        "refund": null,
        "additional_discount": null
      }
    ],
    "total": "285.00",
    "export": null,
    "irbpnr": "0.00",
    "subsidy": null,
    "discount": "0.00",
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "amount": "285.00",
        "method": "tarjeta_credito"
      }
    ],
    "subtotal": "249.00",
    "issue_date": "2026-11-26",
    "negotiable": null,
    "withheld_iva": null,
    "withholdings": [],
    "compensations": [],
    "reimbursement": null,
    "fiscal_machine": null,
    "withheld_renta": null,
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ],
    "third_party_charges": [],
    "delivery_note_number": null,
    "substitute_delivery_note": null
  },
  "metadata": {},
  "pdf_ready": false,
  "sent_to": null,
  "invoice": null,
  "created_at": "2026-11-26T15:01:40.868Z",
  "updated_at": "2026-11-26T15:01:40.868Z"
}

Change a draft quote

PATCH
/v1/ec/quotes/{id}

Replaces its document whole, its metadata whole, its valid_until, or any of them, while it is a draft; once sent, duplicate it instead. Its PDF renders again. Tells quote.updated, with what changed in previous_attributes.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
document?

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

metadata?

Up to 20 pairs of your own, such as your CRM's deal id, returned as sent and never interpreted, as a document's: the list filters by them (metadata[key]=value), and the factura issued from the quote carries them unless its request brings its own.

valid_until?string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate

Response Body

The quote

application/json
  1. response
id*string
Formatuuid
object*"quote"
Value in"quote"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
business_id*string
Formatuuid
environment*string
Value in"sandbox""test""live"
establishment*|

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
number*string

Its number among the business's quotes in the environment, PRO-000001: no SRI series, no establishment or emission point.

status*string

draft until it is sent; sent once emailed; accepted when you mark that your customer took it; expired for a draft or a sent one whose valid_until has passed; invoiced once a factura was issued from it (invoice).

Value in"draft""sent""accepted""expired""invoiced"
status_transitions*

When it last reached each status it has been in: draft when it was made, sent when it was last emailed, accepted, expired when the daily check found it expired (the day after valid_until, at 00:05 in Ecuador) and invoiced.

issue_date*string

The day it was made, in Ecuador.

Formatdate
valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
total*string

What it comes to, by the factura's calculation.

counterparty*
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

calculation*

What the factura's calculation makes of document on its issue_date, in the fields an invoice carries after its envelope: the buyer, each line with its taxes, taxes by rate, subtotal, discount, iva, total and the payments.

metadata*
pdf_ready*boolean

Whether the PDF of its current version is rendered: it renders again after every change, in seconds.

sent_to*|

Where it was last emailed, the addresses separated by commas.

invoice*|

The factura issued from it, once it is invoiced, with its number as it stands: whole at GET /v1/ec/documents/{id}, which names the quote back in quote_id.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Content-Type: application/json' \
  -d '{
  "metadata": {
    "crm_deal_id": "D-1",
    "stage": "negotiation"
  }
}'
Example Response
{
  "id": "01a21860-95b8-7cda-832d-5aabb9340fbe",
  "object": "quote",
  "country": "ec",
  "business_id": "01a21860-959f-73db-ab58-c4330443ef02",
  "environment": "sandbox",
  "establishment": null,
  "number": "PRO-000001",
  "status": "draft",
  "status_transitions": {
    "draft": "2026-11-26T15:01:52.694Z"
  },
  "issue_date": "2026-11-26",
  "valid_until": "2026-12-11",
  "currency": "USD",
  "total": "285.00",
  "counterparty": {
    "name": "FERRETERÍA EL SOL S.A.",
    "identification": "1790012345001"
  },
  "document": {
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_15",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "120.00",
        "description": "Taladro percutor"
      },
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_0",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "4.50",
        "description": "Guantes"
      }
    ],
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "method": "tarjeta_credito"
      }
    ],
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ]
  },
  "calculation": {
    "ice": "0.00",
    "iva": "36.00",
    "tip": "0.00",
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "net": "240.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "240.00",
            "rate": "iva_15",
            "type": "iva",
            "value": "36.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "120",
        "description": "Taladro percutor",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      },
      {
        "net": "9.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "9.00",
            "rate": "iva_0",
            "type": "iva",
            "value": "0.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "4.5",
        "description": "Guantes",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      }
    ],
    "plate": null,
    "taxes": [
      {
        "base": "240.00",
        "rate": "iva_15",
        "type": "iva",
        "value": "36.00",
        "refund": null,
        "additional_discount": null
      },
      {
        "base": "9.00",
        "rate": "iva_0",
        "type": "iva",
        "value": "0.00",
        "refund": null,
        "additional_discount": null
      }
    ],
    "total": "285.00",
    "export": null,
    "irbpnr": "0.00",
    "subsidy": null,
    "discount": "0.00",
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "amount": "285.00",
        "method": "tarjeta_credito"
      }
    ],
    "subtotal": "249.00",
    "issue_date": "2026-11-26",
    "negotiable": null,
    "withheld_iva": null,
    "withholdings": [],
    "compensations": [],
    "reimbursement": null,
    "fiscal_machine": null,
    "withheld_renta": null,
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ],
    "third_party_charges": [],
    "delivery_note_number": null,
    "substitute_delivery_note": null
  },
  "metadata": {
    "stage": "negotiation",
    "crm_deal_id": "D-1"
  },
  "pdf_ready": false,
  "sent_to": null,
  "invoice": null,
  "created_at": "2026-11-26T15:01:52.694Z",
  "updated_at": "2026-11-26T15:01:52.750Z"
}

Delete a draft quote

DELETE
/v1/ec/quotes/{id}

Only a draft: one sent stays, since your customer has it. Its number is not given again. Tells quote.deleted, with the quote as it last stood.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Response Body

Deleted

Example Request
curl -X DELETE 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Email a quote

POST
/v1/ec/quotes/{id}/send

Emails its PDF to to, or to the buyer's email, once it is rendered. A draft becomes sent; a sent or accepted one is sent again. An address other than the buyer's counts against your organization's daily limit of emails to addresses a document doesn't name, as POST /v1/ec/documents/{id}/email does (429 email_unnamed_limit_reached). In sandbox it answers the same and emails nobody, as no document there is emailed. Tells quote.sent, each time.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string

Send the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.

Length1 <= length <= 255

Request Body

application/json
  1. body
to?array<>

Where to send it, at most 5 addresses; without it, the buyer's email.

Items1 <= items <= 5

Response Body

Queued: the quote, sent

application/json
  1. response
id*string
Formatuuid
object*"quote"
Value in"quote"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
business_id*string
Formatuuid
environment*string
Value in"sandbox""test""live"
establishment*|

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
number*string

Its number among the business's quotes in the environment, PRO-000001: no SRI series, no establishment or emission point.

status*string

draft until it is sent; sent once emailed; accepted when you mark that your customer took it; expired for a draft or a sent one whose valid_until has passed; invoiced once a factura was issued from it (invoice).

Value in"draft""sent""accepted""expired""invoiced"
status_transitions*

When it last reached each status it has been in: draft when it was made, sent when it was last emailed, accepted, expired when the daily check found it expired (the day after valid_until, at 00:05 in Ecuador) and invoiced.

issue_date*string

The day it was made, in Ecuador.

Formatdate
valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
total*string

What it comes to, by the factura's calculation.

counterparty*
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

calculation*

What the factura's calculation makes of document on its issue_date, in the fields an invoice carries after its envelope: the buyer, each line with its taxes, taxes by rate, subtotal, discount, iva, total and the payments.

metadata*
pdf_ready*boolean

Whether the PDF of its current version is rendered: it renders again after every change, in seconds.

sent_to*|

Where it was last emailed, the addresses separated by commas.

invoice*|

The factura issued from it, once it is invoiced, with its number as it stands: whole at GET /v1/ec/documents/{id}, which names the quote back in quote_id.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08/send' \
  -H 'Content-Type: application/json' \
  -d '{
  "to": [
    "cliente@example.com"
  ]
}'
Example Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "object": "quote",
  "country": "ec",
  "business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
  "environment": "sandbox",
  "establishment": "string",
  "number": "string",
  "status": "draft",
  "status_transitions": {
    "draft": "2019-08-24T14:15:22Z",
    "sent": "2019-08-24T14:15:22Z",
    "accepted": "2019-08-24T14:15:22Z",
    "expired": "2019-08-24T14:15:22Z",
    "invoiced": "2019-08-24T14:15:22Z"
  },
  "issue_date": "2019-08-24",
  "valid_until": "2019-08-24",
  "currency": "string",
  "total": "string",
  "counterparty": {
    "name": "string",
    "identification": "string"
  },
  "document": {
    "property1": null,
    "property2": null
  },
  "calculation": {
    "lines": [
      {
        "code": "string",
        "auxiliary_code": "string",
        "description": "string",
        "unit": "string",
        "quantity": "string",
        "unit_price": "string",
        "discount": "string",
        "net": "string",
        "taxes": [
          {
            "type": "iva",
            "rate": "iva_15",
            "base": "string",
            "value": "string"
          }
        ],
        "additional_info": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "unsubsidized_price": "string"
      }
    ],
    "taxes": [
      {
        "type": "iva",
        "rate": "iva_15",
        "base": "string",
        "value": "string",
        "additional_discount": "string",
        "refund": "string"
      }
    ],
    "subtotal": "string",
    "discount": "string",
    "iva": "string",
    "ice": "string",
    "irbpnr": "string",
    "total": "string",
    "subsidy": "string",
    "tip": "string",
    "issue_date": "2019-08-24",
    "buyer": {
      "identification_type": "ruc",
      "identification": "string",
      "name": "string",
      "address": "string",
      "email": "string"
    },
    "payments": [
      {
        "method": "sin_sistema_financiero",
        "amount": "string",
        "term": {
          "length": 0,
          "unit": "days"
        }
      }
    ],
    "plate": "string",
    "delivery_note_number": "string",
    "export": {
      "incoterm": "string",
      "incoterm_place": "string",
      "origin_country": "string",
      "loading_port": "string",
      "destination_port": "string",
      "destination_country": "string",
      "acquisition_country": "string",
      "subtotal_incoterm": "string",
      "international_freight": "string",
      "international_insurance": "string",
      "customs_costs": "string",
      "other_transport_costs": "string"
    },
    "reimbursement": {
      "document_type": "factura",
      "total": "string",
      "base": "string",
      "tax": "string",
      "documents": [
        {
          "supplier": {
            "identification_type": "ruc",
            "identification": "string"
          },
          "supplier_type": "persona_natural",
          "payment_country": "string",
          "document_type": "factura",
          "number": "string",
          "issue_date": "2019-08-24",
          "authorization_number": "string",
          "taxes": [
            {
              "type": "iva",
              "rate": "iva_15",
              "base": "string",
              "value": "string"
            }
          ],
          "compensations": [
            {
              "code": "string",
              "rate": "string",
              "value": "string"
            }
          ]
        }
      ]
    },
    "withholdings": [
      {
        "type": "iva_100",
        "value": "string"
      }
    ],
    "withheld_iva": "string",
    "withheld_renta": "string",
    "substitute_delivery_note": {
      "origin_address": "string",
      "destination_address": "string",
      "transport_start": "string",
      "transport_end": "string",
      "carrier": {
        "identification_type": "ruc",
        "identification": "string",
        "name": "string"
      },
      "plate": "string",
      "destinations": [
        {
          "reason": "string",
          "customs_document": "string",
          "destination_establishment": "string",
          "route": "string"
        }
      ]
    },
    "third_party_charges": [
      {
        "concept": "string",
        "amount": "string"
      }
    ],
    "negotiable": {
      "notification_email": "string"
    },
    "compensations": [
      {
        "code": "string",
        "rate": "string",
        "value": "string"
      }
    ],
    "fiscal_machine": {
      "brand": "string",
      "model": "string",
      "serial": "string"
    },
    "additional_info": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "pdf_ready": true,
  "sent_to": "string",
  "invoice": {
    "object": "document",
    "type": "invoice",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "number": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Mark a quote as accepted

POST
/v1/ec/quotes/{id}/accept

Records that your customer took it: only a draft or a sent one still valid. Tells quote.accepted.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string

Send the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.

Length1 <= length <= 255

Response Body

The quote

application/json
  1. response
id*string
Formatuuid
object*"quote"
Value in"quote"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
business_id*string
Formatuuid
environment*string
Value in"sandbox""test""live"
establishment*|

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
number*string

Its number among the business's quotes in the environment, PRO-000001: no SRI series, no establishment or emission point.

status*string

draft until it is sent; sent once emailed; accepted when you mark that your customer took it; expired for a draft or a sent one whose valid_until has passed; invoiced once a factura was issued from it (invoice).

Value in"draft""sent""accepted""expired""invoiced"
status_transitions*

When it last reached each status it has been in: draft when it was made, sent when it was last emailed, accepted, expired when the daily check found it expired (the day after valid_until, at 00:05 in Ecuador) and invoiced.

issue_date*string

The day it was made, in Ecuador.

Formatdate
valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
total*string

What it comes to, by the factura's calculation.

counterparty*
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

calculation*

What the factura's calculation makes of document on its issue_date, in the fields an invoice carries after its envelope: the buyer, each line with its taxes, taxes by rate, subtotal, discount, iva, total and the payments.

metadata*
pdf_ready*boolean

Whether the PDF of its current version is rendered: it renders again after every change, in seconds.

sent_to*|

Where it was last emailed, the addresses separated by commas.

invoice*|

The factura issued from it, once it is invoiced, with its number as it stands: whole at GET /v1/ec/documents/{id}, which names the quote back in quote_id.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08/accept'
Example Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "object": "quote",
  "country": "ec",
  "business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
  "environment": "sandbox",
  "establishment": "string",
  "number": "string",
  "status": "draft",
  "status_transitions": {
    "draft": "2019-08-24T14:15:22Z",
    "sent": "2019-08-24T14:15:22Z",
    "accepted": "2019-08-24T14:15:22Z",
    "expired": "2019-08-24T14:15:22Z",
    "invoiced": "2019-08-24T14:15:22Z"
  },
  "issue_date": "2019-08-24",
  "valid_until": "2019-08-24",
  "currency": "string",
  "total": "string",
  "counterparty": {
    "name": "string",
    "identification": "string"
  },
  "document": {
    "property1": null,
    "property2": null
  },
  "calculation": {
    "lines": [
      {
        "code": "string",
        "auxiliary_code": "string",
        "description": "string",
        "unit": "string",
        "quantity": "string",
        "unit_price": "string",
        "discount": "string",
        "net": "string",
        "taxes": [
          {
            "type": "iva",
            "rate": "iva_15",
            "base": "string",
            "value": "string"
          }
        ],
        "additional_info": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "unsubsidized_price": "string"
      }
    ],
    "taxes": [
      {
        "type": "iva",
        "rate": "iva_15",
        "base": "string",
        "value": "string",
        "additional_discount": "string",
        "refund": "string"
      }
    ],
    "subtotal": "string",
    "discount": "string",
    "iva": "string",
    "ice": "string",
    "irbpnr": "string",
    "total": "string",
    "subsidy": "string",
    "tip": "string",
    "issue_date": "2019-08-24",
    "buyer": {
      "identification_type": "ruc",
      "identification": "string",
      "name": "string",
      "address": "string",
      "email": "string"
    },
    "payments": [
      {
        "method": "sin_sistema_financiero",
        "amount": "string",
        "term": {
          "length": 0,
          "unit": "days"
        }
      }
    ],
    "plate": "string",
    "delivery_note_number": "string",
    "export": {
      "incoterm": "string",
      "incoterm_place": "string",
      "origin_country": "string",
      "loading_port": "string",
      "destination_port": "string",
      "destination_country": "string",
      "acquisition_country": "string",
      "subtotal_incoterm": "string",
      "international_freight": "string",
      "international_insurance": "string",
      "customs_costs": "string",
      "other_transport_costs": "string"
    },
    "reimbursement": {
      "document_type": "factura",
      "total": "string",
      "base": "string",
      "tax": "string",
      "documents": [
        {
          "supplier": {
            "identification_type": "ruc",
            "identification": "string"
          },
          "supplier_type": "persona_natural",
          "payment_country": "string",
          "document_type": "factura",
          "number": "string",
          "issue_date": "2019-08-24",
          "authorization_number": "string",
          "taxes": [
            {
              "type": "iva",
              "rate": "iva_15",
              "base": "string",
              "value": "string"
            }
          ],
          "compensations": [
            {
              "code": "string",
              "rate": "string",
              "value": "string"
            }
          ]
        }
      ]
    },
    "withholdings": [
      {
        "type": "iva_100",
        "value": "string"
      }
    ],
    "withheld_iva": "string",
    "withheld_renta": "string",
    "substitute_delivery_note": {
      "origin_address": "string",
      "destination_address": "string",
      "transport_start": "string",
      "transport_end": "string",
      "carrier": {
        "identification_type": "ruc",
        "identification": "string",
        "name": "string"
      },
      "plate": "string",
      "destinations": [
        {
          "reason": "string",
          "customs_document": "string",
          "destination_establishment": "string",
          "route": "string"
        }
      ]
    },
    "third_party_charges": [
      {
        "concept": "string",
        "amount": "string"
      }
    ],
    "negotiable": {
      "notification_email": "string"
    },
    "compensations": [
      {
        "code": "string",
        "rate": "string",
        "value": "string"
      }
    ],
    "fiscal_machine": {
      "brand": "string",
      "model": "string",
      "serial": "string"
    },
    "additional_info": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "pdf_ready": true,
  "sent_to": "string",
  "invoice": {
    "object": "document",
    "type": "invoice",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "number": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Duplicate a quote

POST
/v1/ec/quotes/{id}/duplicate

A new draft with the same document and metadata, numbered next, dated today and valid as many days as the original was. Tells quote.created.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string

Send the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.

Length1 <= length <= 255

Response Body

The new quote

application/json
  1. response
id*string
Formatuuid
object*"quote"
Value in"quote"
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
business_id*string
Formatuuid
environment*string
Value in"sandbox""test""live"
establishment*|

The establishment it is quoted from (001), whose trade name and logo it wears, as a factura numbered there would; without it, the business's. Fixed when it is made.

Match^\d{3}$
number*string

Its number among the business's quotes in the environment, PRO-000001: no SRI series, no establishment or emission point.

status*string

draft until it is sent; sent once emailed; accepted when you mark that your customer took it; expired for a draft or a sent one whose valid_until has passed; invoiced once a factura was issued from it (invoice).

Value in"draft""sent""accepted""expired""invoiced"
status_transitions*

When it last reached each status it has been in: draft when it was made, sent when it was last emailed, accepted, expired when the daily check found it expired (the day after valid_until, at 00:05 in Ecuador) and invoiced.

issue_date*string

The day it was made, in Ecuador.

Formatdate
valid_until*string

The last day the quote holds, on or after the day it is made, in Ecuador's calendar.

Formatdate
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
total*string

What it comes to, by the factura's calculation.

counterparty*
document*

What the quote offers: the body POST /v1/ec/invoices takes (buyer, lines, payments, additional_info and the factura's other fields), without establishment, emission_point, simulate, deliver_to or metadata (the quote's own metadata is beside it), since a quote is numbered by the business alone and sent nowhere. It is checked as a factura is (422 at document.<path>) and priced by the factura's calculation. Its buyer is remembered among your contacts as issuing to them remembers them: a new one is added, and an archived one stays archived.

calculation*

What the factura's calculation makes of document on its issue_date, in the fields an invoice carries after its envelope: the buyer, each line with its taxes, taxes by rate, subtotal, discount, iva, total and the payments.

metadata*
pdf_ready*boolean

Whether the PDF of its current version is rendered: it renders again after every change, in seconds.

sent_to*|

Where it was last emailed, the addresses separated by commas.

invoice*|

The factura issued from it, once it is invoiced, with its number as it stands: whole at GET /v1/ec/documents/{id}, which names the quote back in quote_id.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08/duplicate'
Example Response
{
  "id": "01a21860-977d-7ae8-b6bf-9cbce12d0112",
  "object": "quote",
  "country": "ec",
  "business_id": "01a21860-9699-7137-a77a-ca3cade57734",
  "environment": "sandbox",
  "establishment": null,
  "number": "PRO-000002",
  "status": "draft",
  "status_transitions": {
    "draft": "2026-11-26T15:01:53.147Z"
  },
  "issue_date": "2026-11-26",
  "valid_until": "2026-12-16",
  "currency": "USD",
  "total": "285.00",
  "counterparty": {
    "name": "FERRETERÍA EL SOL S.A.",
    "identification": "1790012345001"
  },
  "document": {
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_15",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "120.00",
        "description": "Taladro percutor"
      },
      {
        "code": "SKU-1",
        "taxes": [
          {
            "rate": "iva_0",
            "type": "iva"
          }
        ],
        "quantity": "2",
        "unit_price": "4.50",
        "description": "Guantes"
      }
    ],
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "method": "tarjeta_credito"
      }
    ],
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ]
  },
  "calculation": {
    "ice": "0.00",
    "iva": "36.00",
    "tip": "0.00",
    "buyer": {
      "name": "FERRETERÍA EL SOL S.A.",
      "email": "compras@elsol.ec",
      "address": "Av. 10 de Agosto N21-44, Quito",
      "identification": "1790012345001",
      "identification_type": "ruc"
    },
    "lines": [
      {
        "net": "240.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "240.00",
            "rate": "iva_15",
            "type": "iva",
            "value": "36.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "120",
        "description": "Taladro percutor",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      },
      {
        "net": "9.00",
        "code": "SKU-1",
        "unit": null,
        "taxes": [
          {
            "base": "9.00",
            "rate": "iva_0",
            "type": "iva",
            "value": "0.00"
          }
        ],
        "discount": "0.00",
        "quantity": "2",
        "unit_price": "4.5",
        "description": "Guantes",
        "auxiliary_code": null,
        "additional_info": [],
        "unsubsidized_price": null
      }
    ],
    "plate": null,
    "taxes": [
      {
        "base": "240.00",
        "rate": "iva_15",
        "type": "iva",
        "value": "36.00",
        "refund": null,
        "additional_discount": null
      },
      {
        "base": "9.00",
        "rate": "iva_0",
        "type": "iva",
        "value": "0.00",
        "refund": null,
        "additional_discount": null
      }
    ],
    "total": "285.00",
    "export": null,
    "irbpnr": "0.00",
    "subsidy": null,
    "discount": "0.00",
    "payments": [
      {
        "term": {
          "unit": "days",
          "length": 30
        },
        "amount": "285.00",
        "method": "tarjeta_credito"
      }
    ],
    "subtotal": "249.00",
    "issue_date": "2026-11-26",
    "negotiable": null,
    "withheld_iva": null,
    "withholdings": [],
    "compensations": [],
    "reimbursement": null,
    "fiscal_machine": null,
    "withheld_renta": null,
    "additional_info": [
      {
        "name": "Orden de compra",
        "value": "OC-1041"
      }
    ],
    "third_party_charges": [],
    "delivery_note_number": null,
    "substitute_delivery_note": null
  },
  "metadata": {
    "crm_deal_id": "D-7"
  },
  "pdf_ready": false,
  "sent_to": null,
  "invoice": null,
  "created_at": "2026-11-26T15:01:53.147Z",
  "updated_at": "2026-11-26T15:01:53.147Z"
}

Issue the factura a quote becomes

POST
/v1/ec/quotes/{id}/convert

Issues a factura as POST /v1/ec/invoices does (the same validation, readiness, plan, quota and required Idempotency-Key, numbered where the Fiscalbase-Emission-Point header or your key's default says unless the body names its place): invoice when you send it, such as the quote changed before issuing, else the quote's own document with its number in the additional information (Proforma: PRO-000001, the name the PDF prints) while there is room. The factura carries the quote's metadata unless invoice brings its own, and names the quote in quote_id. The quote becomes invoiced, naming the factura in invoice, in the transaction that numbers it, which tells quote.converted; one already invoiced is 409 quote_convert_not_allowed and nothing is numbered, so of any number of calls one factura is issued. A sale held at the month's quota leaves the quote as it was.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key*string

Required. Without it a retry could number another document or reach the SRI again. A retry with the same key and body answers the first answer instead; the same key with another body is 409 idempotency_key_reused.

Length1 <= length <= 255
Fiscalbase-Emission-Point?string

The emission point (GET /v1/ec/emission-points) the documents this call issues are numbered at, when their body names no establishment or emission_point. One the business lacks in the call's environment is 422 emission_point_not_found. It beats the key's default emission point.

Formatuuid

Request Body

application/json
  1. body
invoice?

The factura to issue, when it isn't the quote's own document.

Response Body

Issued: the factura, numbered; a repeat with the same Idempotency-Key answers the same

application/json
  1. response
id*string
Formatuuid
country*"ec"

The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.

Value in"ec"
currency*string

The currency of the amounts, as its ISO 4217 code. New currencies may appear.

Match^[A-Z]{3}$
environment*string
Value in"sandbox""test""live"
status*string
Value in"pending""submitted""authorized""returned""not_authorized""annulled"
status_transitions*

When the document last reached each status.

business_id*string
Formatuuid
number*string
access_key*string
Length49 <= length <= 49
authorization*|null
sri_messages*array<>

The messages of the SRI's latest response, each with its cause and what to do. A returned or not_authorized document says here why.

metadata*
issued_at*|

When it was issued, with date and time. On a document issued here it is the moment Fiscalbase accepted and numbered it, which sets its issue date (always today in Ecuador). SRI documents carry only the date, so on an imported one (channel imported) it is the time the SRI authorized it, and null if nothing dates it.

Formatdate-time
delivery_status*|

How the emails of the current revision are doing, the heaviest outcome wins: complained (marked the email as spam) over bounced (bounced) over opened (opened it) over delivered (reached the mailbox) over sent (the email provider accepted it, no news yet). null if no email was sent. The email provider reports it; without its notices it stays at sent.

Value in"sent""delivered""opened""bounced""complained"null
emails*array<>

The emails sent with the document's current revision, one per recipient and per send, from first to last. Empty if none was sent.

portal_views*integer

How many times its recipient opened the document in the portal, signing in with their code or with the link in the email. Downloads of the PDF and the XML do not count. 0 if it was never opened.

portal_last_viewed_at*|

The last time it was opened in the portal; null if never.

Formatdate-time
channel*string

How it arrived: api if your system issued it with a key, or an agent did for the person who connected it, console if someone issued it on the platform, imported if it came in an import from another system. It is recorded at issue and does not change.

Value in"api""console""imported"
import_id*|

The import that brought it; null if it was issued here.

Formatuuid
verification*|

Imported documents only, how we know it is authorized, from most to least certain: sri if the SRI confirmed it at import; listed if its key appears in an SRI listing you uploaded (the Facturador report or the issued-documents one from the SRI's online portal); signature if its file carries the authorization, which nobody signs; unconfirmed if it only has the issuer's signature and nothing shows that the SRI authorized it. unconfirmed documents do not appear in the portal until you upload the listing. Except for sri, the SRI no longer remembered it (or it was imported in sandbox) and its annulment cannot be detected. null if it was issued here.

Value in"sri""listed""signature""unconfirmed"null
listing*|

With verification listed, the listing that shows it authorized and where it came from. Any listing of keys counts, so which one it was is recorded. null otherwise.

object*"document"
Value in"document"
type*"invoice"

The family: invoice, credit_note, debit_note, withholding, delivery_note or purchase_settlement. Every other operation on the document is under its path (/v1/ec/invoices/{id}/…).

Value in"invoice"
lines*array<>
taxes*array<||>
subtotal*string
discount*string
iva*string
ice*string
irbpnr*string
total*string
subsidy*string|null
tip*string
issue_date*string
Formatdate
buyer*
payments*array<>
plate*string|null
delivery_note_number*string|null
export*|null
reimbursement*|null
withholdings*array<>
withheld_iva*string|null
withheld_renta*string|null
substitute_delivery_note*|null
third_party_charges*array<>
negotiable*|null
compensations*array<>

Solidarity compensation of 2 % of the IVA (2016), only on imported documents that carry it.

fiscal_machine*|null
additional_info*array<>
credit_balance*|

Invoices only. What can still be credited: the total minus that of the credit notes that modify it and still stand (authorized or still on their way to the SRI; not the returned, not authorized or annulled ones). It never goes below zero. POST /v1/ec/credit-notes rejects a note that exceeds it. null for an invoice issued to consumidor_final, which takes no credit note (NAC-DGERCGC25-00000014, art. 3).

receivable*|

Invoices only. What it is still owed, when it was issued on credit (a payment with a term) or with collect_later. null for an invoice paid at once, for one issued to consumidor_final, who is nobody to collect from, and for imported ones.

quote_id*|

Invoices only. The quote it was issued from (POST /v1/ec/quotes/{id}/convert), whole at GET /v1/ec/quotes/{id}; null for one issued otherwise.

Formatuuid
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08/convert' \
  -H 'idempotency-key: string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "id": "01a21860-8f5a-78c8-a901-74854505d6f5",
  "object": "document",
  "type": "invoice",
  "country": "ec",
  "currency": "USD",
  "environment": "sandbox",
  "status": "pending",
  "status_transitions": {
    "pending": "2026-11-26T15:01:55.217Z"
  },
  "business_id": "01a21860-8f31-78a4-a5df-3f949e4dd334",
  "number": "001-001-000000001",
  "access_key": "2611202601179214673900110010010000000012183325611",
  "authorization": null,
  "sri_messages": [],
  "metadata": {
    "crm_deal_id": "D-2291"
  },
  "channel": "api",
  "import_id": null,
  "verification": null,
  "listing": null,
  "issued_at": "2026-11-26T15:01:51.063Z",
  "delivery_status": null,
  "emails": [],
  "portal_views": 0,
  "portal_last_viewed_at": null,
  "ice": "0.00",
  "iva": "36.00",
  "tip": "0.00",
  "buyer": {
    "name": "FERRETERÍA EL SOL S.A.",
    "email": "compras@elsol.ec",
    "address": "Av. 10 de Agosto N21-44, Quito",
    "identification": "1790012345001",
    "identification_type": "ruc"
  },
  "lines": [
    {
      "net": "240.00",
      "code": "SKU-1",
      "unit": null,
      "taxes": [
        {
          "base": "240.00",
          "rate": "iva_15",
          "type": "iva",
          "value": "36.00"
        }
      ],
      "discount": "0.00",
      "quantity": "2",
      "unit_price": "120",
      "description": "Taladro percutor",
      "auxiliary_code": null,
      "additional_info": [],
      "unsubsidized_price": null
    },
    {
      "net": "9.00",
      "code": "SKU-1",
      "unit": null,
      "taxes": [
        {
          "base": "9.00",
          "rate": "iva_0",
          "type": "iva",
          "value": "0.00"
        }
      ],
      "discount": "0.00",
      "quantity": "2",
      "unit_price": "4.5",
      "description": "Guantes",
      "auxiliary_code": null,
      "additional_info": [],
      "unsubsidized_price": null
    }
  ],
  "plate": null,
  "taxes": [
    {
      "base": "240.00",
      "rate": "iva_15",
      "type": "iva",
      "value": "36.00",
      "refund": null,
      "additional_discount": null
    },
    {
      "base": "9.00",
      "rate": "iva_0",
      "type": "iva",
      "value": "0.00",
      "refund": null,
      "additional_discount": null
    }
  ],
  "total": "285.00",
  "export": null,
  "irbpnr": "0.00",
  "subsidy": null,
  "discount": "0.00",
  "payments": [
    {
      "term": {
        "unit": "days",
        "length": 30
      },
      "amount": "285.00",
      "method": "tarjeta_credito"
    }
  ],
  "subtotal": "249.00",
  "issue_date": "2026-11-26",
  "negotiable": null,
  "withheld_iva": null,
  "withholdings": [],
  "compensations": [],
  "reimbursement": null,
  "fiscal_machine": null,
  "withheld_renta": null,
  "additional_info": [
    {
      "name": "Orden de compra",
      "value": "OC-1041"
    },
    {
      "name": "Proforma",
      "value": "PRO-000001"
    }
  ],
  "third_party_charges": [],
  "delivery_note_number": null,
  "substitute_delivery_note": null,
  "created_at": "2026-11-26T15:01:51.063Z",
  "updated_at": "2026-11-26T15:01:51.063Z",
  "credit_balance": "285.00",
  "receivable": {
    "object": "receivable",
    "state": "open",
    "currency": "USD",
    "amount": "285.00",
    "collected": "0.00",
    "withheld": "0.00",
    "credited": "0.00",
    "balance": "285.00",
    "next_due_date": "2026-12-26",
    "overdue_days": 0,
    "collect_later": false,
    "installments": [
      {
        "amount": "285.00",
        "due_date": "2026-12-26",
        "balance": "285.00"
      }
    ],
    "closed_on": null
  },
  "quote_id": "01a21860-8f47-72fc-aaa8-95874a100e39"
}

Download a quote's PDF

GET
/v1/ec/quotes/{id}/pdf

Its current version on A4, in the PDF's layout, marked as a quote without tax validity: no access key, authorization or barcode.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Path Parameters

id*string
Formatuuid

Response Body

The PDF

response?fileapplication/pdf
Formatbinary
Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/quotes/497f6eca-6276-4993-bfeb-53cbbbba6f08/pdf'
Example Response
"string"