עברית

Quickly Invoice API

Make receipts and invoices for an Israeli business from your own system: a shop, a CRM, a booking app.

https://api.quicklyinvoice.com/v1

Quickstart: your first receipt in 5 minutes

In the Quickly Invoice app, open Settings → API and make a key (the API comes with the monthly and yearly plans; a test key, on every plan, makes nothing real, see Testing). Copy it into an environment variable on your server, QUICKLY_INVOICE_KEY, and make a receipt:

curl https://api.quicklyinvoice.com/v1/documents \
  -H "Authorization: Bearer $QUICKLY_INVOICE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1842" \
  -d '{ "type": "receipt", "customer": { "externalId": "shop-1842", "name": "Dana Levi", "phone": "0501234567" }, "items": [{ "description": "Haircut", "price": 100 }], "payments": [{ "method": "credit_card", "amount": 100, "cardLast4": "4242" }], "send": { "email": "[email protected]" } }'

The answer is the document: its number, totals, VAT and pdfUrl. It is in the app at once, numbered like every other document of the business.

Node.js

const response = await fetch('https://api.quicklyinvoice.com/v1/documents', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QUICKLY_INVOICE_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': `order-${order.id}`,
  },
  body: JSON.stringify({
    type: 'receipt',
    customer: { externalId: String(order.customerId), name: order.name, phone: order.phone },
    items: order.lines.map(line => ({ description: line.title, quantity: line.qty, price: line.price })),
    payments: [{ method: 'credit_card', amount: order.total }],
  }),
});
const document = await response.json();
if (!response.ok) throw new Error(`${document.error.code}: ${document.error.message}`);
console.log(document.number, document.pdfUrl);

Python

import os, requests

response = requests.post(
    "https://api.quicklyinvoice.com/v1/documents",
    headers={
        "Authorization": f"Bearer {os.environ['QUICKLY_INVOICE_KEY']}",
        "Idempotency-Key": f"order-{order_id}",
    },
    json={
        "type": "receipt",
        "items": [{"description": "Haircut", "price": 100}],
        "payments": [{"method": "cash", "amount": 100}],
    },
    timeout=70,
)
document = response.json()
response.raise_for_status()
print(document["number"], document["pdfUrl"])

PHP

$ch = curl_init('https://api.quicklyinvoice.com/v1/documents');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 70,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('QUICKLY_INVOICE_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: order-' . $orderId,
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'type' => 'receipt',
        'items' => [['description' => 'Haircut', 'price' => 100]],
        'payments' => [['method' => 'cash', 'amount' => 100]],
    ]),
]);
$document = json_decode(curl_exec($ch), true);
echo $document['number'] . ' ' . $document['pdfUrl'];

Keys and scopes

Send the key on every request as Authorization: Bearer qik_live_.... A key acts as the business, so keep it on your server: a request from a browser (one with an Origin header) is refused, and the API has no CORS. The owner can revoke a key at any time on the same page, and it stops at once. Each key has scopes:

scope
documents:readList and read documents and their PDFs.
documents:writeMake, email and cancel documents.
customers:readList and read customers.
customers:writeAdd customers (also when a document names a new one).

Retries and Idempotency-Key

Send Idempotency-Key (your order id is a good one) with every POST. Sending the same request again with the same key, within 24 hours, answers the first answer with Idempotent-Replayed: true and never makes a second document. The same key with a different body is refused (409). A tax invoice can wait up to a minute for the Tax Authority, so give requests a 70-second timeout; if one times out (504 outcome_unknown), send it again with the same key.

Israeli documents in short

Call GET /business first: it says whether the business is licensed (עוסק מורשה), a company, or VAT-exempt (עוסק פטור), which types it may make, and the approval-number threshold. Prices include VAT unless an item says "vatIncluded": false; the API works out VAT, the discount and rounding exactly as the app does. A tax_invoice or invoice_receipt from the threshold up (before VAT) gets an allocation number (מספר הקצאה) from the Tax Authority: the business must have connected the Tax Authority in the app, and the customer needs a taxId. receipt and invoice_receipt take payments, which must add up to the total.

typecodeHebrewpaymentsVAT-exempt business
receipt400קבלה✓✓
tax_invoice305חשבונית מס
invoice_receipt320חשבונית מס קבלה✓
credit_invoice330חשבונית זיכוי
transaction_invoice300חשבון עסקה✓
order100הזמנה✓
quote10הצעת מחיר✓
delivery_note200תעודת משלוח✓

Payment methods

cash cheque credit_card bank_transfer payment_app withholding_tax

Errors

An error answers {"error": {"code", "message", "details"}}. Act on code; message is for people (Hebrew with Accept-Language: he), and details names each field that was wrong. Every answer has a request-id header: send it to us when something is unclear.

statuscodemeaning
400invalid_requestThe request is not valid: details names each field.
400idempotency_key_invalidIdempotency-Key must be 8 to 255 visible ASCII characters.
401unauthorizedNo key, a key that is not one, a revoked key, a developer's key whose connection ended, or a call from a browser.
402plan_requiredA live key's business has no plan with the API (monthly and yearly plans do). Test keys work on every plan.
402plan_limitThe business reached its plan's documents for this month.
403forbidden_scopeThe key lacks the scope this call needs.
403customers_scope_neededAdding a customer through a document needs customers:write.
404not_foundNo such document or customer in this business.
409already_cancelledThe document is already cancelled.
409already_cancellingAnother request is cancelling this document right now.
409idempotency_key_reusedThis Idempotency-Key was used with another body.
409idempotency_key_in_useA request with this Idempotency-Key is still running.
422document_type_not_allowedA VAT-exempt business (עוסק פטור) cannot make this type.
422payments_mismatchThe payments don't add up to the document's total.
422payments_not_allowedOnly receipt and invoice_receipt take payments.
422tax_authority_not_connectedAn invoice over the threshold needs the Tax Authority connected in the app.
422cannot_cancelThis document type cannot be cancelled.
422send_failedThe email could not be sent.
422rejectedThe document service refused it; the message says why.
429rate_limitedMore than 60 requests in a minute. Wait for Retry-After.
429daily_limitThe key reached today's 5,000 requests (resets at midnight UTC).
500internal_errorOur mistake. Try again; write to us with the request-id if it repeats.
500outcome_unknownIt failed after it started and may have been done: look it up, or repeat with the same Idempotency-Key.
503unavailableThe API is not available right now. Retry after Retry-After.

Limits

Each key may send 60 requests a minute and 5,000 a day (the day resets at midnight UTC). Past that the answer is 429 with Retry-After in seconds. Documents count toward the business's plan like documents made in the app.

Testing

Make a test key (qik_test_...) on the same page: it works on every plan, and nothing it does is real. Requests are checked exactly as with a live key, so a wrong total or a missing tax id fails the same way, but no document is made in the business, no number is used, the Tax Authority is not asked, no email is sent and no customer is added. A test document has no PDF (pdfUrl is null), counts from 1 per type, can be read, listed, sent and cancelled like a real one, and is deleted after 7 days. Customers are never kept in test mode: the list is empty. GET /business is the real business. Every answer says "test": true. When it works, switch to a live key: nothing else changes.

Building for several businesses

Building for many businesses (an agency, a POS, a booking or shop platform)? Open a developer office in the app: Settings → API → developer office. Its name and logo are what a business sees. Send each business the office's developer link; its owner approves in their own app. Then make that business's keys from the office, without getting into its app. Each key acts for one business only, as its owner: its documents carry that business's name and numbering, and its limits and request log are its own. Keep one key per business on your server and call each business with its own. Test keys work the same way.

A developer's key stops at once (401 unauthorized) when the owner disconnects the office, when the office lets the business go, or when either account is blocked. A new connection needs a new key.

The office may also pay for its businesses' plans: tick them on the office's billing page. A business you pay for gets the plan with the API included, and you get one bill a month, charged on the 1st on the card of one of your own businesses, for the businesses that made documents that month. The price is per business, a month, before VAT, and each one includes 100 documents (above that, the plan's tiers). The more businesses, the lower the price for the ones past each step. Prices

Versions

/v1 changes only by adding: new fields, new endpoints, new error codes. Ignore fields you don't know. Anything that would break a caller goes to /v2, with six months' notice by email to every key holder.

Help

Write to [email protected] with the request-id of the request. The request log on Settings → API shows the last 30 days of each key.

Reference

GET /v1/business

The business, its VAT status and what it may make. Call it first: it says which document types the business makes and when an invoice needs an approval number. Needs no scope.

GET /v1/documents

List documents, newest first. Scope: documents:read.

Parameters

namein
typequery
fromqueryFirst day, Israel time.
toqueryLast day, Israel time.
customerqueryA customer's id.
pagequery
perPagequery

POST /v1/documents

Make a document. Made exactly as the Quickly Invoice app makes it: the business's numbering, its plan limit, and an approval number from the Tax Authority for a tax_invoice or invoice_receipt from the threshold up (see GET /business). Scope: documents:write.

Parameters

namein
Idempotency-KeyheaderAny unique string (8 to 255 characters), e.g. your order id. Sending the same request again with the same key answers the first answer (for 24 hours) and never makes a second document.

Request body

{
  "type": "receipt",
  "customer": {
    "externalId": "shop-1842",
    "name": "Dana Levi",
    "phone": "0501234567",
    "email": "[email protected]"
  },
  "items": [
    {
      "description": "Haircut",
      "quantity": 1,
      "price": 100
    }
  ],
  "payments": [
    {
      "method": "credit_card",
      "amount": 100,
      "cardLast4": "4242"
    }
  ],
  "send": {
    "email": "[email protected]"
  }
}

Answer (201)

{
  "id": "6ae7ad705b41bf815c641079",
  "type": "receipt",
  "typeCode": "400",
  "number": 1043,
  "date": "2026-11-01",
  "status": "issued",
  "customer": {
    "id": "6ae7aa88a8bda9fb93c58e1c",
    "name": "Dana Levi",
    "taxId": null,
    "companyName": null
  },
  "items": [
    {
      "description": "Haircut",
      "quantity": 1,
      "unitPrice": 100,
      "vatIncluded": true
    }
  ],
  "discount": 0,
  "total": 100,
  "vat": 15.25,
  "totalBeforeVat": 84.75,
  "currency": "ILS",
  "payments": [
    {
      "method": "credit_card",
      "amount": 100,
      "date": "2026-11-01"
    }
  ],
  "approvalNumber": null,
  "approvalNumberStatus": "not_needed",
  "note": null,
  "pdfUrl": "https://api.zenat.app/customer/document/pdf/6ae7ad705b41bf815c641079",
  "shareUrl": null,
  "createdAt": "2026-11-01T12:00:00.000Z"
}

GET /v1/documents/{id}

Read a document. Scope: documents:read.

Parameters

namein
idpathThe document's id.

Answer (200)

{
  "id": "6ae7ad705b41bf815c641079",
  "type": "receipt",
  "typeCode": "400",
  "number": 1043,
  "date": "2026-11-01",
  "status": "issued",
  "customer": {
    "id": "6ae7aa88a8bda9fb93c58e1c",
    "name": "Dana Levi",
    "taxId": null,
    "companyName": null
  },
  "items": [
    {
      "description": "Haircut",
      "quantity": 1,
      "unitPrice": 100,
      "vatIncluded": true
    }
  ],
  "discount": 0,
  "total": 100,
  "vat": 15.25,
  "totalBeforeVat": 84.75,
  "currency": "ILS",
  "payments": [
    {
      "method": "credit_card",
      "amount": 100,
      "date": "2026-11-01"
    }
  ],
  "approvalNumber": null,
  "approvalNumberStatus": "not_needed",
  "note": null,
  "pdfUrl": "https://api.zenat.app/customer/document/pdf/6ae7ad705b41bf815c641079",
  "shareUrl": null,
  "createdAt": "2026-11-01T12:00:00.000Z"
}

GET /v1/documents/{id}/pdf

Redirect to the document's PDF. Answers 302 to the PDF, which opens without a key (the link the app shares). Scope: documents:read.

Parameters

namein
idpathThe document's id.

POST /v1/documents/{id}/send

Email the document's PDF. Scope: documents:write.

Parameters

namein
idpathThe document's id.
Idempotency-KeyheaderAny unique string (8 to 255 characters), e.g. your order id. Sending the same request again with the same key answers the first answer (for 24 hours) and never makes a second document.

Request body

{
  "email": "[email protected]",
  "name": "Dana"
}

POST /v1/documents/{id}/cancel

Cancel a document. Makes the credit document for it, as the app does, and answers both. Quotes, orders, transaction invoices and credit invoices cannot be cancelled. Scope: documents:write.

Parameters

namein
idpathThe document's id.
Idempotency-KeyheaderAny unique string (8 to 255 characters), e.g. your order id. Sending the same request again with the same key answers the first answer (for 24 hours) and never makes a second document.

GET /v1/customers

List customers. Scope: customers:read.

Parameters

namein
searchqueryPart of a name, phone or email.
externalIdqueryYour system's id.
pagequery
perPagequery

POST /v1/customers

Add a customer. A customer with the same externalId or phone is not added twice: the answer is the existing one (200, existing: true). Scope: customers:write.

Parameters

namein
Idempotency-KeyheaderAny unique string (8 to 255 characters), e.g. your order id. Sending the same request again with the same key answers the first answer (for 24 hours) and never makes a second document.

Request body

{
  "name": "Dana Levi",
  "phone": "0501234567",
  "externalId": "shop-1842"
}

GET /v1/customers/{id}

Read a customer. Scope: customers:read.

Parameters

namein
idpathThe customer's id.

Answer (200)

{
  "id": "6ae7aa88a8bda9fb93c58e1c",
  "name": "Dana Levi",
  "phone": "+972501234567",
  "email": "[email protected]",
  "taxId": null,
  "companyName": null,
  "address": null,
  "externalId": "shop-1842",
  "createdAt": "2026-11-01T12:00:00.000Z"
}