A példa létrehoz egy Webshop tömböt WEB előtaggal, kiállít benne egy számlát, és kiírja a sorszámát. Végül egy kötőjeles nevű tömböt próbál létrehozni, ezt a tárca validation hibával megállítja.
WEB előtagú tömb, benne a WEB / 2026-000001 számla, és egy kötőjeles név, ami el sem megy.
Futtatás a sandboxbanimport { } from 'tarcajs'
const = ()
const = await ..({ : 'Webshop', : 'WEB', : 'invoice' })
.('új tömb:', ., ., .)
const = await ..({
: . ?? 0,
: {
: 'Vevő Kft.',
: { : '1111', : 'Budapest', : 'Fő utca 1.' },
},
: [{ : 'Webfejlesztés', : 1, : 15_000, : 27 }],
})
.('számlaszám:', .)
try {
await ..({ : 'Web-shop', : 'WS', : 'invoice' })
} catch () {
.('kötőjeles név:', ())
}POST /document-blocks HTTP/1.1
content-type: application/json
{
"name": "Webshop",
"prefix": "WEB",
"type": "invoice"
}GET /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
{
"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": 1,
"unit": "db",
"vat": "27%",
"unit_price": 15000,
"unit_price_type": "net"
}
],
"settings": {
"should_send_email": false
},
"block_id": 3,
"partner_id": 1
}HTTP/1.1 201
content-type: application/json
{
"id": 3,
"name": "Webshop",
"prefix": "WEB",
"type": "invoice",
"custom_field1": "",
"custom_field2": "",
"template_id": 0,
"pic_path": null,
"normal_notification_id": 0,
"proforma_notification_id": 0,
"generated": false,
"invoice_number_format": "default",
"sender_email": null,
"sender_name": "",
"bcc_email": null,
"create_invoice_from_paid_proforma": false,
"fulfillment_date_from_proforma_payment_date": false,
"attach_xml_to_invoice_pdf": false,
"advance_paid_instant": false,
"financial_fulfillment_highlight": "basic",
"entitlements_in_document_comment": false,
"bank_account_id": null
}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": "WEB / 2026-000001",
"type": "invoice",
"cancelled": false,
"block_id": 3,
"payment_status": "outstanding",
"payment_method": "wire_transfer",
"gross_total": 19050,
"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": 1,
"unit": "db",
"net_amount": 15000,
"gross_amount": 19050,
"vat": "27%",
"vat_amount": 4050,
"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": 15000,
"net_amount_local": 15000,
"gross_amount_local": 19050,
"vat_amount": 4050,
"vat_amount_local": 4050,
"vat_rate_summary": [
{
"vat_name": "27%",
"vat_percentage": 0.27,
"vat_rate_net_amount": 15000,
"vat_rate_vat_amount": 4050,
"vat_rate_vat_amount_local": 4050,
"vat_rate_gross_amount": 19050
}
]
},
"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
}új tömb: 3 default null
számlaszám: WEB / 2026-000001
kötőjeles név: BillingoError: A számlatömb neve csak betűt, számot és szóközt tartalmazhat (például „TARCA E2E”), kapott: „Web-shop”.Az Elküldött kérések fülön a CreateDocument törzsében a block_id az új tömb azonosítója, és nincs második CreateDocumentBlock kérés. A Billingo válasz fülön a tömb 201-es válaszában a teljes beállításlista látszik.