نقلة
Docs menuRead an order's invoice

GET Read an order's invoice

العربية

The invoice issued for an order (a simplified tax invoice when the store is VAT-registered, otherwise an invoice with no VAT and no QR code): number, totals, lines, the QR code and a signed PDF link valid for 30 days. 404 until the invoice is issued (on payment, or on delivery for cash on delivery). No buyer name.

GET /orders/{id}/invoice
Full address
https://naqllah.com/api/apps/v1/orders/{id}/invoice
Rate limit
120 a minute per store, 1200 a minute across all stores
The merchant reads
Read the invoices issued for orders: number, amounts, the QR code when there is one and a download link

Request

Parameters

NameInTypeDescription
idrequired path integer · ≥ 1 The numeric id.

Samples

Each sample reads the access token from the environment variable NAQLLAH_ACCESS_TOKEN.

cURL
curl "https://naqllah.com/api/apps/v1/orders/5521/invoice" \
  -H "Authorization: Bearer $NAQLLAH_ACCESS_TOKEN"
PHP
<?php
$ch = curl_init('https://naqllah.com/api/apps/v1/orders/5521/invoice');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('NAQLLAH_ACCESS_TOKEN'),
        'Accept: application/json',
    ],
]);

$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$json = json_decode($body, true);
if ($status >= 400) {
    throw new RuntimeException($json['error'] ?? 'http_' . $status);
}
$data = $json['data'];
Node.js
// Node.js 18+ (fetch is built in)
const res = await fetch('https://naqllah.com/api/apps/v1/orders/5521/invoice', {
  headers: {
    Authorization: `Bearer ${process.env.NAQLLAH_ACCESS_TOKEN}`,
    Accept: 'application/json',
  },
});

const json = await res.json();
if (!res.ok) throw new Error(json.error);
const { data } = json;
Python
import os
import requests

res = requests.get(
    "https://naqllah.com/api/apps/v1/orders/5521/invoice",
    headers={
        "Authorization": f"Bearer {os.environ['NAQLLAH_ACCESS_TOKEN']}",
        "Accept": "application/json",
    },
    timeout=10,
)

body = res.json()
if res.status_code >= 400:
    raise RuntimeError(body["error"])
data = body["data"]

Response

On success the answer is 200 with this body. The example uses sample data.

FieldTypeNotes
data object —
data.order_id integer —
data.number string —
data.kind string one of simplified_tax commercial
data.seller_name string —
data.vat_number string may be null
data.issued_at string may be null · ISO 8601 time
data.currency string —
data.subtotal string SAR, two decimals, as text
data.tax_amount string SAR, two decimals, as text
data.total string SAR, two decimals, as text
data.lines array<object> —
data.lines[].name string —
data.lines[].quantity integer —
data.lines[].unit_price string SAR, two decimals, as text
data.lines[].tax_rate_percent number —
data.lines[].tax_amount string SAR, two decimals, as text
data.lines[].line_total string SAR, two decimals, as text
data.qr_tlv_base64 string may be null
data.pdf_url string may be null · uri
200 · JSON
{
    "data": {
        "order_id": 5521,
        "number": "INV-000214",
        "kind": "simplified_tax",
        "seller_name": "متجر الورد",
        "vat_number": null,
        "issued_at": "2026-11-04T09:15:41+03:00",
        "currency": "SAR",
        "subtotal": "425.22",
        "tax_amount": "63.78",
        "total": "489.00",
        "lines": [
            {
                "name": "باقة ورد",
                "quantity": 1,
                "unit_price": "425.22",
                "tax_rate_percent": 15,
                "tax_amount": "63.78",
                "line_total": "489.00"
            }
        ],
        "qr_tlv_base64": "AQ3Zhdiq2KzYsSDYp9mE2YjYsdivAg8zMDAwMDAwMDAwMDAwMDM=",
        "pdf_url": "https://ward.example/invoice/INV-000214?expires=1765000000&signature=…"
    }
}

Errors

HTTPCodeMeaning
401invalid_tokenThe access token is invalid or expired.
401not_installedThe app is not installed on this store.
402payment_requiredThe app's subscription on this store is unpaid.
403app_suspendedThe app or the developer account is suspended.
403insufficient_scopeThe merchant has not granted this permission to the app.
404not_foundNot found.
429rate_limitedThe app is over its request limit. Try again shortly.

All error codes

Rate limits

120 requests a minute per store, and 1200 requests a minute for your app across all stores. Over the limit you get 429 with Retry-After. Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining.

Try it

Fill in the request and see the answer this endpoint gives.

Mock Answers come from this page's examples and rules, in your browser. Nothing is sent to any store, and no token leaves this page. To call the real API, use the test store with your own token.

Trying needs JavaScript; the samples above work without it.

Version v1.0.0 Changelog Service status openapi-v1.json Support