Egy bizonylatot kétféleképpen kérhetsz le: a Billingo azonosítójával, vagy a kiállításkor megadott vendorId-val.
GET/documents/{id}
- tárca
- documents.get
- Billingo
- GetDocument
- spec
- 3.0.14 és 3.0.15
GET/documents/vendor/{vendor_id}
- tárca
- documents.getByVendorId, documents.findByVendorId, documents.createOnce
- Billingo
- GetDocumentByVendorId
- spec
- 3.0.14 és 3.0.15
Kérés#
tarca.documents.get(id: number, options?: { signal?: AbortSignal }): Promise<Billingo.Document>
tarca.documents.getByVendorId(vendorId: string, options?: { signal?: AbortSignal }): Promise<Billingo.Document>
tarca.documents.findByVendorId(vendorId: string, options?: { signal?: AbortSignal }): Promise<Billingo.Document | null>import { } from 'tarcajs'
const = ()
const = await ..('ORDER-1001')
if ( === null) {
.('Ehhez a rendeléshez még nincs számla.')
} else {
.(., ., .)
}- A
get(id)aGET /documents/{id}kérést küldi. Az azonosítót a kiállítás válaszánakidmezője adja. - A
getByVendorId()és afindByVendorId()aGET /documents/vendor/{vendor_id}kérést küldi. A tárca levágja avendorIdszélein lévő szóközöket, és URL-kódolja. - Üres
vendorId, vagy a.és a..kérés nélkülRangeError-t ad. - Mindhárom lekérdezés, ezért a tárca hálózati hiba, időtúllépés, 429 és szerverhiba után újrapróbálja, legfeljebb
maxAttemptsalkalommal.
Nyugtát is ugyanígy kérhetsz le: a nyugta is bizonylat, közös azonosító- és vendorId-térrel.
Válasz#
Mindhárom metódus a teljes Billingo.Document-et adja, ugyanazokkal a mezőkkel, mint a kiállítás (Válasz). Élőben a GET /documents/{id} mezői pontosan megegyeztek a POST /documents válaszáéval.
A lekérés friss állapotot ad: a sztornózott számlán cancelled: true, a befizetett számlán paymentStatus: 'paid'.
| Státusz | Kategória | Mikor? |
|---|---|---|
| 403 | forbidden | get(): ismeretlen, törölt vagy másik céghez tartozó azonosító. A Billingo itt nem 404-et ad. |
| 404 | not_found | getByVendorId(): nincs ilyen vendorId (Document is not found.). A findByVendorId() ilyenkor null-t ad. |
| 401 | auth | Érvénytelen API kulcs. |
| 429, 5xx | rate_limit, server | A tárca újrapróbálta, de nem sikerült. |
Minta#
A példa kiállít egy számlát ORDER-1001 azonosítóval, majd lekéri az id-jével és a vendorId-jával, végül egy nem létező vendorId-ra is rákérdez. Az utolsó kérésre 404 a válasz, a hívás eredménye null.
Lekérés azonosítóval és vendorId-val; az ismeretlen vendorId-ra a findByVendorId null értéket ad.
Futtatás a sandboxbanimport { } from 'tarcajs'
const = ()
const = await ..({
: 'ORDER-1001',
: {
: 'Vevő Kft.',
: { : '1111', : 'Budapest', : 'Fő utca 1.' },
},
: [{ : 'Webfejlesztés', : 10, : 'óra', : 15_000, : 27 }],
})
const = await ..(. ?? 0)
const = await ..('ORDER-1001')
const = await ..('ORDER-9999')
.(., ., )GET /document-blocks?per_page=100&type=invoice HTTP/1.1GET /partners?page=1&per_page=100&query=Vevő Kft. HTTP/1.1POST /partners HTTP/1.1
content-type: application/json
{
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
}
}POST /documents HTTP/1.1
content-type: application/json
{
"vendor_id": "ORDER-1001",
"type": "invoice",
"fulfillment_date": "2026-11-16",
"due_date": "2026-11-24",
"payment_method": "wire_transfer",
"language": "hu",
"currency": "HUF",
"electronic": false,
"items": [
{
"name": "Webfejlesztés",
"quantity": 10,
"unit": "óra",
"vat": "27%",
"unit_price": 15000,
"unit_price_type": "net"
}
],
"settings": {
"should_send_email": false
},
"block_id": 1,
"partner_id": 1
}GET /documents/1 HTTP/1.1GET /documents/vendor/ORDER-1001 HTTP/1.1GET /documents/vendor/ORDER-9999 HTTP/1.1HTTP/1.1 200
content-type: application/json
{
"total": 1,
"per_page": 100,
"current_page": 1,
"last_page": 1,
"prev_page_url": null,
"next_page_url": null,
"data": [
{
"id": 1,
"name": "Számlák",
"prefix": "",
"custom_field1": "",
"custom_field2": "",
"type": "invoice"
}
]
}HTTP/1.1 200
content-type: application/json
{
"total": 0,
"per_page": 100,
"current_page": 1,
"last_page": 1,
"prev_page_url": null,
"next_page_url": null,
"data": []
}HTTP/1.1 201
content-type: application/json
{
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": "show_all"
}HTTP/1.1 201
content-type: application/json
{
"id": 1,
"invoice_number": "2026-1",
"type": "invoice",
"cancelled": false,
"block_id": 1,
"payment_status": "outstanding",
"payment_method": "wire_transfer",
"gross_total": 190500,
"currency": "HUF",
"conversion_rate": 1,
"invoice_date": "2026-11-16",
"fulfillment_date": "2026-11-16",
"due_date": "2026-11-24",
"paid_date": "2026-11-16",
"organization": {
"name": "Hamis Billingo teszt szervezet",
"tax_number": "00000000-0-00",
"bank_account": {
"id": null,
"name": "",
"account_number": "",
"account_number_iban": "",
"swift": ""
},
"address": {
"country_code": "HU",
"post_code": "1011",
"city": "Budapest",
"address": "Fő utca 1."
},
"small_taxpayer": false,
"ev_number": "",
"eu_tax_number": "",
"cash_settled": false
},
"partner": {
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": null
},
"document_partner": {
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"tax_type": "",
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
}
},
"electronic": false,
"comment": "",
"tags": [],
"notification_status": "none",
"language": "hu",
"items": [
{
"product_id": null,
"name": "Webfejlesztés",
"net_unit_amount": 15000,
"quantity": 10,
"unit": "óra",
"net_amount": 150000,
"gross_amount": 190500,
"vat": "27%",
"vat_amount": 40500,
"entitlement": null,
"comment": "",
"sku": null,
"data_eraser_codes": null,
"is_deposit_fee": false,
"ean": null,
"is_connect_product": false,
"connected_item": null,
"connect_document_item_setting": null
}
],
"summary": {
"net_amount": 150000,
"net_amount_local": 150000,
"gross_amount_local": 190500,
"vat_amount": 40500,
"vat_amount_local": 40500,
"vat_rate_summary": [
{
"vat_name": "27%",
"vat_percentage": 0.27,
"vat_rate_net_amount": 150000,
"vat_rate_vat_amount": 40500,
"vat_rate_vat_amount_local": 40500,
"vat_rate_gross_amount": 190500
}
]
},
"settings": {
"mediated_service": false,
"without_financial_fulfillment": false,
"online_payment": "no",
"should_send_email": false,
"round": "none",
"no_send_onlineszamla_by_user": false,
"dont_send_to_nav_reason": null,
"order_number": "",
"place_id": null,
"instant_payment": true,
"selected_type": null,
"instant_payment_request": null,
"is_waybill_hide_prices": false
},
"online_szamla_status": "processing",
"kobak_receipt_status": null,
"kobak_receipt_message": null,
"related_documents": [],
"discount": null,
"correction_type": "invoice",
"recurring_id": null
}HTTP/1.1 200
content-type: application/json
{
"id": 1,
"invoice_number": "2026-1",
"type": "invoice",
"cancelled": false,
"block_id": 1,
"payment_status": "outstanding",
"payment_method": "wire_transfer",
"gross_total": 190500,
"currency": "HUF",
"conversion_rate": 1,
"invoice_date": "2026-11-16",
"fulfillment_date": "2026-11-16",
"due_date": "2026-11-24",
"paid_date": "2026-11-16",
"organization": {
"name": "Hamis Billingo teszt szervezet",
"tax_number": "00000000-0-00",
"bank_account": {
"id": null,
"name": "",
"account_number": "",
"account_number_iban": "",
"swift": ""
},
"address": {
"country_code": "HU",
"post_code": "1011",
"city": "Budapest",
"address": "Fő utca 1."
},
"small_taxpayer": false,
"ev_number": "",
"eu_tax_number": "",
"cash_settled": false
},
"partner": {
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": null
},
"document_partner": {
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"tax_type": "",
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
}
},
"electronic": false,
"comment": "",
"tags": [],
"notification_status": "none",
"language": "hu",
"items": [
{
"product_id": null,
"name": "Webfejlesztés",
"net_unit_amount": 15000,
"quantity": 10,
"unit": "óra",
"net_amount": 150000,
"gross_amount": 190500,
"vat": "27%",
"vat_amount": 40500,
"entitlement": null,
"comment": "",
"sku": null,
"data_eraser_codes": null,
"is_deposit_fee": false,
"ean": null,
"is_connect_product": false,
"connected_item": null,
"connect_document_item_setting": null
}
],
"summary": {
"net_amount": 150000,
"net_amount_local": 150000,
"gross_amount_local": 190500,
"vat_amount": 40500,
"vat_amount_local": 40500,
"vat_rate_summary": [
{
"vat_name": "27%",
"vat_percentage": 0.27,
"vat_rate_net_amount": 150000,
"vat_rate_vat_amount": 40500,
"vat_rate_vat_amount_local": 40500,
"vat_rate_gross_amount": 190500
}
]
},
"settings": {
"mediated_service": false,
"without_financial_fulfillment": false,
"online_payment": "no",
"should_send_email": false,
"round": "none",
"no_send_onlineszamla_by_user": false,
"dont_send_to_nav_reason": null,
"order_number": "",
"place_id": null,
"instant_payment": true,
"selected_type": null,
"instant_payment_request": null,
"is_waybill_hide_prices": false
},
"online_szamla_status": "processing",
"kobak_receipt_status": null,
"kobak_receipt_message": null,
"related_documents": [],
"discount": null,
"correction_type": "invoice",
"recurring_id": null
}HTTP/1.1 200
content-type: application/json
{
"id": 1,
"invoice_number": "2026-1",
"type": "invoice",
"cancelled": false,
"block_id": 1,
"payment_status": "outstanding",
"payment_method": "wire_transfer",
"gross_total": 190500,
"currency": "HUF",
"conversion_rate": 1,
"invoice_date": "2026-11-16",
"fulfillment_date": "2026-11-16",
"due_date": "2026-11-24",
"paid_date": "2026-11-16",
"organization": {
"name": "Hamis Billingo teszt szervezet",
"tax_number": "00000000-0-00",
"bank_account": {
"id": null,
"name": "",
"account_number": "",
"account_number_iban": "",
"swift": ""
},
"address": {
"country_code": "HU",
"post_code": "1011",
"city": "Budapest",
"address": "Fő utca 1."
},
"small_taxpayer": false,
"ev_number": "",
"eu_tax_number": "",
"cash_settled": false
},
"partner": {
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": null
},
"document_partner": {
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"tax_type": "",
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
}
},
"electronic": false,
"comment": "",
"tags": [],
"notification_status": "none",
"language": "hu",
"items": [
{
"product_id": null,
"name": "Webfejlesztés",
"net_unit_amount": 15000,
"quantity": 10,
"unit": "óra",
"net_amount": 150000,
"gross_amount": 190500,
"vat": "27%",
"vat_amount": 40500,
"entitlement": null,
"comment": "",
"sku": null,
"data_eraser_codes": null,
"is_deposit_fee": false,
"ean": null,
"is_connect_product": false,
"connected_item": null,
"connect_document_item_setting": null
}
],
"summary": {
"net_amount": 150000,
"net_amount_local": 150000,
"gross_amount_local": 190500,
"vat_amount": 40500,
"vat_amount_local": 40500,
"vat_rate_summary": [
{
"vat_name": "27%",
"vat_percentage": 0.27,
"vat_rate_net_amount": 150000,
"vat_rate_vat_amount": 40500,
"vat_rate_vat_amount_local": 40500,
"vat_rate_gross_amount": 190500
}
]
},
"settings": {
"mediated_service": false,
"without_financial_fulfillment": false,
"online_payment": "no",
"should_send_email": false,
"round": "none",
"no_send_onlineszamla_by_user": false,
"dont_send_to_nav_reason": null,
"order_number": "",
"place_id": null,
"instant_payment": true,
"selected_type": null,
"instant_payment_request": null,
"is_waybill_hide_prices": false
},
"online_szamla_status": "processing",
"kobak_receipt_status": null,
"kobak_receipt_message": null,
"related_documents": [],
"discount": null,
"correction_type": "invoice",
"recurring_id": null
}HTTP/1.1 404
content-type: application/json
{
"error": {
"message": "Document is not found."
}
}2026-1 2026-1 null