QuoteBill Calculation API
Figures worked out as a document's are, saved nowhere.
Figures worked out as a document's are, saved nowhere.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/quotebill-com:quotebill-com-calculation-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: QuoteBill Calculation API
version: 1.1.0
summary: Make quotations and invoices in a QuoteBill account, read them, and work out document totals by country.
description: 'The personal API of QuoteBill (https://quotebill.com). A member makes a key in Company settings; it reaches only that member''s own documents.
Authentication: send the key as "Authorization: Bearer qbk_..." and nowhere else. A missing, wrong, revoked or expired key gets the same 401.
Limits: Each key may make 60 requests a minute and 5,000 a day (UTC days), whichever endpoint it calls; one account may make 500 documents a day through the API. A request over a limit gets 429 with Retry-After (seconds). There are no other rate-limit headers.
Bodies: JSON with Content-Type: application/json, at most 256 KB. Every answer is JSON and Cache-Control: no-store. There are no CORS headers: call the API from a server, a script or an automation tool, not from a web page.
Idempotency: POST /v1/documents takes an Idempotency-Key header; a retry of the same request within 24 hours returns the same document.
Versioning: v1 changes only by addition: new endpoints, new optional request fields and new fields in answers. A change that could break a working integration (a field or endpoint removed or renamed, a type or meaning changed, a field made required) is made only in a new version, /v2, announced in the changelog at least six months before v1 changes or stops. Only a security problem or a legal obligation could make a change sooner, and the changelog would say so and why.
Terms: The API is free for QuoteBill members, within the limits above. To ask about higher limits, write through the contact page: https://quotebill.com/en/contact/.
Guide, changelog and examples: https://quotebill.com/en/developers/'
termsOfService: https://quotebill.com/en/terms/
contact:
name: QuoteBill
url: https://quotebill.com/en/contact/
servers:
- url: https://quotebill.com/functions/v1/api
description: QuoteBill
security:
- bearerAuth: []
tags:
- name: Calculation
description: Figures worked out as a document's are, saved nowhere.
paths:
/v1/calculate:
post:
operationId: calculate
tags:
- Calculation
summary: Work out a document's figures without saving it
description: 'The subtotal, the line discounts, the tax and the total that a document of this body would show, worked out by the code that works out a saved document''s: the totals equal the totals POST /v1/documents answers with for the same body. Fields the request leaves out come from your account''s settings, as for a document; send country, currency and tax_rate for an answer that does not depend on them. Nothing is saved. Any key; it counts against the key''s limits. Prices are before tax.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CalculateRequest'
examples:
germany:
summary: Two lines in Germany, one with a discount
value:
country: DE
currency: EUR
items:
- description: Design work
quantity: 3
unit_price: 33.33
discount:
type: percent
value: 10
- description: Printing
quantity: 0.5
unit_price: 19.99
responses:
'200':
description: The figures.
content:
application/json:
schema:
$ref: '#/components/schemas/Calculation'
examples:
calculate:
summary: VAT at 19% on two lines
value:
kind: invoice
country: DE
region: null
currency: EUR
currency_decimals: 2
lines:
- quantity: 3
unit_price: 33.33
discount:
type: percent
value: 10
gross: 99.99
discount_amount: 10
amount: 89.99
- quantity: 0.5
unit_price: 19.99
discount: null
gross: 10
discount_amount: 0
amount: 10
subtotal_before_discounts: 109.99
discount_total: 10
totals:
currency: EUR
subtotal: 99.99
tax_name: VAT
tax_rate: 19
tax_amount: 19
total: 118.99
tax_status: calculated
tax:
components:
- name: VAT
rate: 19
amount: 19
rate_from: published
status: standard-rate-estimate
review_reasons:
- confirm-registration-supply-place-date-and-tax-treatment
source:
title: 'European Commission: VAT rates'
url: https://europa.eu/youreurope/business/finance-and-tax/vat/vat-rules-rates/index_en.htm
checked_on: '2026-09-06'
effective_from: null
defaults:
country: request
currency: request
rounding: half-up; currency-rounded base; each tax component rounded separately
'400':
description: 'invalid_json: The body is not valid JSON or not valid UTF-8 text.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'413':
$ref: '#/components/responses/PayloadTooLarge'
'415':
$ref: '#/components/responses/UnsupportedMediaType'
'422':
$ref: '#/components/responses/InvalidRequest'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
components:
responses:
InvalidRequest:
description: 'invalid_request: A field is missing, unknown or out of range, or a text holds characters that cannot be stored; the fields list says which.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalid:
summary: A quantity sent as text
value:
error:
code: invalid_request
message: items[0].quantity must be a JSON number (not text such as "10")
fields:
- path: items[0].quantity
message: must be a JSON number (not text such as "10")
Unauthorized:
description: 'invalid_api_key: The key is missing, wrong, revoked or expired.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidKey:
summary: A missing, wrong, revoked or expired key
value:
error:
code: invalid_api_key
message: 'The API key is missing, not valid, revoked or expired. Send a key from QuoteBill Settings as "Authorization: Bearer <key>".'
headers:
WWW-Authenticate:
$ref: '#/components/headers/WWWAuthenticate'
TooManyRequests:
description: 'rate_limited: A key made too many requests; wait Retry-After seconds.'
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
InternalError:
description: 'internal_error: Something went wrong on QuoteBill''s side. Retry; if it persists, contact support.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
UnsupportedMediaType:
description: 'unsupported_media_type: The body is not sent as application/json.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
ServiceUnavailable:
description: 'service_unavailable: QuoteBill could not answer just now. Retry after a few seconds.'
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PayloadTooLarge:
description: 'payload_too_large: The body is over 256 KB.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
properties:
error:
type: object
properties:
code:
type: string
description: One of the codes in x-error-codes.
message:
type: string
description: Plain words for a person; do not parse it.
fields:
type: array
maxItems: 20
items:
$ref: '#/components/schemas/Problem'
description: Only with invalid_request (422) and invalid_query (400).
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
Discount:
type: object
properties:
type:
type: string
enum:
- percent
- amount
value:
type: number
minimum: 0
maximum: 100000000000
description: 'percent: 0 to 100. amount: in the document''s currency, at most quantity x unit_price.'
required:
- type
- value
additionalProperties: false
description: A line's discount (V 1.38 on requests; read back since V 1.28).
Calculation:
type: object
properties:
kind:
type: string
enum:
- quotation
- invoice
- proforma
- receipt
- creditNote
- purchaseOrder
- deliveryNote
- workOrder
- commercialInvoice
country:
type: string
region:
anyOf:
- type: string
- type: 'null'
currency:
type: string
pattern: ^[A-Z]{3}$
currency_decimals:
type: integer
minimum: 0
maximum: 4
lines:
type: array
items:
type: object
properties:
quantity:
type: number
unit_price:
type: number
discount:
anyOf:
- $ref: '#/components/schemas/Discount'
- type: 'null'
gross:
type: number
description: quantity x unit_price, rounded to the currency.
discount_amount:
type: number
description: gross less amount.
amount:
type: number
description: 'The line as the document prints it: after its discount, rounded to the currency.'
required:
- quantity
- unit_price
- discount
- gross
- discount_amount
- amount
additionalProperties: false
subtotal_before_discounts:
type: number
discount_total:
type: number
totals:
$ref: '#/components/schemas/Totals'
tax:
type: object
properties:
components:
type: array
items:
type: object
properties:
name:
type: string
rate:
type: number
amount:
type: number
required:
- name
- rate
- amount
additionalProperties: false
description: 'Each tax, rounded on its own: two for a Canadian province with GST and PST.'
rate_from:
anyOf:
- type: string
enum:
- request
- kind
- template
- account
- published
- type: 'null'
description: 'Where the rate came from: the request''s tax_rate, the kind''s own (0 for a commercial invoice), the template''s own (0 for a template made for someone not registered for VAT or GST), the account''s default, or the published rate of the country or region. null when there is none.'
status:
type: string
description: The catalogue's note on the rate, such as standard-rate-estimate or jurisdiction-required.
review_reasons:
type: array
items:
type: string
source:
anyOf:
- type: object
properties:
title:
type: string
url:
anyOf:
- type: string
format: uri
- type: 'null'
checked_on:
anyOf:
- type: string
format: date
pattern: ^\d{4}-\d{2}-\d{2}$
- type: 'null'
required:
- title
- url
- checked_on
additionalProperties: false
- type: 'null'
description: Where the rate was read, and when.
effective_from:
anyOf:
- type: string
format: date
pattern: ^\d{4}-\d{2}-\d{2}$
- type: 'null'
required:
- components
- rate_from
- status
- review_reasons
- source
- effective_from
additionalProperties: false
defaults:
type: object
properties:
country:
type: string
enum:
- request
- template
- account
- fallback
currency:
type: string
enum:
- request
- account
- country
required:
- country
- currency
additionalProperties: false
description: 'Which fields the request left to the template (its country), to the account''s settings (as for a document), or to the fallbacks: US, and the country''s currency.'
rounding:
type: string
description: How the figures are rounded, in the catalogue's words.
required:
- kind
- country
- region
- currency
- currency_decimals
- lines
- subtotal_before_discounts
- discount_total
- totals
- tax
- defaults
- rounding
additionalProperties: false
CalculateRequest:
type: object
properties:
kind:
type: string
enum:
- quotation
- invoice
- proforma
- receipt
- creditNote
- purchaseOrder
- deliveryNote
- workOrder
- commercialInvoice
description: 'Default: the template''s kind, else invoice.'
template:
anyOf:
- type: string
pattern: ^[a-z0-9][a-z0-9._-]{0,80}$
- type: 'null'
description: 'A template slug from GET /v1/templates, of the same kind. Optional: null or an empty string counts as left out.'
language:
anyOf:
- type: string
enum:
- en
- ko
- ja
- zh
- de
- fr
- es
- vi
- ar
- ru
- pt
- it
- nl
- pl
- tr
- sv
- th
- id
- ms
- da
- fi
- nb
- el
- cs
- hu
- ro
- bg
- hr
- lt
- lv
- et
- sl
- sk
- type: 'null'
description: 'The language the document is written in. Default: the account''s, else en. Optional: null or an empty string counts as left out.'
country:
anyOf:
- type: string
pattern: ^[A-Z]{2}$
- type: 'null'
description: 'A country of GET /v1/countries. The tax follows it. Default: the template''s own country (a regional template), else the account''s, else US. Optional: null or an empty string counts as left out.'
region:
anyOf:
- type: string
pattern: ^[A-Z]{2}$
- type: 'null'
description: 'A Canadian province or territory of GET /v1/countries (CA regions), only with country CA: its GST, HST, PST or QST, each rounded on its own. Optional: null or an empty string counts as left out.'
currency:
anyOf:
- type: string
pattern: ^[A-Z]{3}$
- type: 'null'
description: 'A currency of GET /v1/countries. Default: the account''s, else the country''s. Amounts round to its decimals. Optional: null or an empty string counts as left out.'
issue_date:
anyOf:
- type: string
format: date
pattern: ^\d{4}-\d{2}-\d{2}$
- type: 'null'
description: 'A day from 2000 to 2100. Default: today (UTC). Optional: null or an empty string counts as left out.'
due_date:
anyOf:
- type: string
format: date
pattern: ^\d{4}-\d{2}-\d{2}$
- type: 'null'
description: 'For an invoice or commercial invoice. Default: 30 days after the issue date. Optional: null or an empty string counts as left out.'
valid_until:
anyOf:
- type: string
format: date
pattern: ^\d{4}-\d{2}-\d{2}$
- type: 'null'
description: 'For a quotation or proforma invoice. Default: 30 days after the issue date. Optional: null or an empty string counts as left out.'
document_number:
anyOf:
- type: string
maxLength: 100
- type: 'null'
description: 'Default: made as the account''s numbering setting says. Optional: null or an empty string counts as left out.'
tax_rate:
anyOf:
- type: number
minimum: 0
maximum: 100
- type: 'null'
description: 'A percentage for the whole document. Default: the kind''s own (0 for a commercial invoice), else the template''s own (0 for a template made for someone not registered for VAT or GST), else the account''s saved rate when the document is for the account''s own country, else the country''s or region''s published rate. Optional: null or an empty string counts as left out.'
customer:
anyOf:
- $ref: '#/components/schemas/Customer'
- type: 'null'
description: 'Not used by the calculation; checked as for a document. Optional: null or an empty string counts as left out.'
items:
type: array
minItems: 1
maxItems: 200
items:
type: object
properties:
description:
anyOf:
- type: string
minLength: 1
maxLength: 500
- type: 'null'
description: 'Up to 500 characters, one line. Optional: null or an empty string counts as left out.'
quantity:
type: number
exclusiveMinimum: 0
maximum: 1000000000
description: A JSON number above 0. Hours on an hours template.
unit_price:
type: number
minimum: 0
maximum: 100000000000
description: A JSON number from 0, before tax. Required, except on a kind or template whose lines are quantities only. quantity x unit_price may not pass 100000000000.
tax_rate:
anyOf:
- type: number
minimum: 0
maximum: 100
- type: 'null'
description: 'A percentage. A document has one tax rate, so it must equal the document''s tax_rate and every other item''s. Optional: null or an empty string counts as left out.'
discount:
anyOf:
- $ref: '#/components/schemas/Discount'
- type: 'null'
description: 'Taken off the line before tax, as the editor''s discount column does. Optional: null or an empty string counts as left out.'
required:
- quantity
additionalProperties: false
description: 1 to 200 lines.
notes:
anyOf:
- type: string
maxLength: 2000
- type: 'null'
description: 'Up to 2,000 characters, printed on the document. Optional: null or an empty string counts as left out.'
required:
- items
additionalProperties: false
description: 'The body of POST /v1/documents, read the same way; kind, customer and the items'' descriptions may be left out. A field the API does not know is refused (422). Numbers are JSON numbers, not text. Prices are before tax: QuoteBill documents have no tax-inclusive prices.'
Customer:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 200
description: Required.
email:
anyOf:
- type: string
maxLength: 254
pattern: ^[^\s@]{1,64}@[^\s@]{1,255}$
- type: 'null'
description: 'An e-mail address. Optional: null or an empty string counts as left out.'
address:
anyOf:
- type: string
maxLength: 500
- type: 'null'
description: 'Up to 500 characters; may hold line breaks. Optional: null or an empty string counts as left out.'
tax_id:
anyOf:
- type: string
maxLength: 60
- type: 'null'
description: 'Up to 60 characters. Optional: null or an empty string counts as left out.'
required:
- name
additionalProperties: false
Totals:
type: object
properties:
currency:
type: string
pattern: ^[A-Z]{3}$
subtotal:
type: number
description: The lines, each rounded to the currency, added up.
tax_name:
anyOf:
- type: string
- type: 'null'
tax_rate:
anyOf:
- type: number
- type: 'null'
description: 'A percentage: 19 is 19%.'
tax_amount:
anyOf:
- type: number
- type: 'null'
total:
anyOf:
- type: number
- type: 'null'
tax_status:
type: string
enum:
- calculated
- rate_needed
description: 'rate_needed: the country has no single national rate (the United States, Canada without a region). No tax and no total until tax_rate is sent.'
total_hours:
type: number
description: 'Only on an hours template: the quantities added up.'
required:
- currency
- subtotal
- tax_name
- tax_rate
- tax_amount
- total
- tax_status
additionalProperties: false
description: What the editor shows under the lines.
Problem:
type: object
properties:
path:
type: string
description: The field, such as items[0].unit_price; empty for the body as a whole.
message:
type: string
required:
- path
- message
additionalProperties: false
headers:
WWWAuthenticate:
schema:
type: string
RetryAfter:
description: Seconds to wait before trying again.
schema:
type: integer
minimum: 1
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: qbk_ followed by 32 characters a-z and 2-7
description: 'A personal API key from QuoteBill Company settings. Scopes: documents:create, documents:read.'
x-error-codes:
- status: 400
code: invalid_json
meaning: The body is not valid JSON or not valid UTF-8 text.
- status: 400
code: invalid_query
meaning: A parameter of the list is not one the endpoint has, or has a wrong value.
- status: 400
code: invalid_idempotency_key
meaning: The Idempotency-Key header is not 1 to 255 letters, digits, dots, dashes, underscores or colons.
- status: 401
code: invalid_api_key
meaning: The key is missing, wrong, revoked or expired.
- status: 403
code: insufficient_scope
meaning: The key does not have the scope the endpoint needs.
- status: 403
code: document_limit_reached
meaning: Your QuoteBill cloud is full.
- status: 404
code: not_found
meaning: No such endpoint, or no such document of yours.
- status: 405
code: method_not_allowed
meaning: The endpoint does not have that method (the Allow header lists them).
- status: 409
code: document_number_taken
meaning: Another of your documents has this document_number.
- status: 409
code: idempotency_key_reused
meaning: The Idempotency-Key was used for a different request in the last 24 hours.
- status: 413
code: payload_too_large
meaning: The body is over 256 KB.
- status: 415
code: unsupported_media_type
meaning: The body is not sent as application/json.
- status: 422
code: invalid_request
meaning: A field is missing, unknown or out of range, or a text holds characters that cannot be stored; the fields list says which.
- status: 429
code: rate_limited
meaning: A key made too many requests; wait Retry-After seconds.
- status: 429
code: daily_document_limit
meaning: The account has made 500 documents through the API today.
- status: 500
code: internal_error
meaning: Something went wrong on QuoteBill's side. Retry; if it persists, contact support.
- status: 503
code: service_unavailable
meaning: QuoteBill could not answer just now. Retry after a few seconds.