### Line Example Source: https://www.fakturoid.cz/api/v3/recurring-generators Provides a comprehensive JSON example of a line item, illustrating the structure and typical values for various attributes. ```APIDOC ### Line Example ```json { "id": 1304, "name": "Disk 2TB", "quantity": "2.0", "unit_name": "ks", "unit_price": "1000.0", "vat_rate": 21, "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0", "total_price_without_vat": "2000.0", "total_vat": "420.0", "native_total_price_without_vat": "2000.0", "native_total_vat": "420.0", "inventory": { "item_id": 28, "sku": "KU994RUR8465", "article_number_type": "ian", "article_number": "32165478", "move_id": 52 } } ``` When editing a document, it is important to send the line `ID` with the lines, without it the line will be added again. The `unit_price_without_vat` and `unit_price_with_vat` attributes are read-only and are set based on the amount entered in `unit_price`, the `vat_rate` and the `vat_price_mode` attribute. The `unit_price_without_vat` and `unit_price_with_vat` attributes have the same value in the following cases: * The VAT rate is set to 0. * Reverse charge is enabled (if reverse charge is enabled on the document, `the vat_price_mode` setting is ignored). ``` -------------------------------- ### VAT Price Mode Examples Source: https://www.fakturoid.cz/api/v3/recurring-generators Illustrates how to use `vat_price_mode` with examples for 'Unit price without VAT' and 'Unit price with VAT', showing request and response structures. ```APIDOC ## More Examples ### Unit price without VAT #### Request ```json { "vat_price_mode": "without_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21" } ] } ``` #### Response ```json { … "vat_price_mode": "without_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21", "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0" } ] } ``` ### Unit price with VAT #### Request ```json { … "vat_price_mode": "from_total_with_vat", … "lines": [ { … "unit_price": "1210.0", "vat_rate": "21" } ] } ``` #### Response ```json { … "vat_price_mode": "from_total_with_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21", "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0" } ] } ``` ``` -------------------------------- ### Inventory Moves Response Example Source: https://www.fakturoid.cz/api/v3/inventory-moves Example JSON response for the Inventory Moves Index endpoint, showing the structure of a single inventory move object. ```json [ { "id": 1, "direction": "in", "moved_on": "2023-08-05", "quantity_change": "1000.0", "purchase_price": "500.0", "purchase_currency": "CZK", "native_purchase_price": "500.0", "retail_price": null, "retail_currency": "CZK", "native_retail_price": null, "private_note": null, "inventory_item_id": 1, "document": null, "created_at": "2023-08-05T13:26:20.871+02:00", "updated_at": "2023-08-05T13:26:20.871+02:00" }, { "id": 24, "direction": "in", "moved_on": "2023-08-07", "quantity_change": "624.0", "purchase_price": "1978.0", "purchase_currency": "CZK", "native_purchase_price": "1978.0", "retail_price": null, "retail_currency": "CZK", "native_retail_price": null, "private_note": "3 letá záruka za příplatek. Disk je vybaven nejnovějším řadičem, který umožňuje dosahovat rychlosti čtení až 500 MB/s a zápisu 320 MB/s.", "inventory_item_id": 46, "document": { "id": 540, "type": "Invoice", "line_id": 1298 }, "created_at": "2023-09-05T13:26:21.041+02:00", "updated_at": "2023-09-05T13:26:21.041+02:00" }, … ] ``` -------------------------------- ### Line Item Example Source: https://www.fakturoid.cz/api/v3/generators This is a comprehensive example of a line item, showcasing all available attributes including inventory details. Use this structure when creating or updating line items. ```json { "id": 1304, "name": "Disk 2TB", "quantity": "2.0", "unit_name": "ks", "unit_price": "1000.0", "vat_rate": 21, "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0", "total_price_without_vat": "2000.0", "total_vat": "420.0", "native_total_price_without_vat": "2000.0", "native_total_vat": "420.0", "inventory": { "item_id": 28, "sku": "KU994RUR8465", "article_number_type": "ian", "article_number": "32165478", "move_id": 52 } } ``` -------------------------------- ### Fakturoid API Expenses Index Request Source: https://www.fakturoid.cz/api/v3/expenses Example GET request to retrieve a list of expenses from a specific account. Supports filtering by date, update time, subject, custom ID, number, variable symbol, status, and document type. ```http GET https://app.fakturoid.cz/api/v3/accounts/{slug}/expenses.json ``` -------------------------------- ### Subject Detail Response Body Example Source: https://www.fakturoid.cz/api/v3/subjects Example of a successful response body when retrieving a single subject's details. It returns a JSON object representing the subject. ```JSON { "id": 16, "custom_id": null, "user_id": null, "type": "customer", "name": "Apple Czech s.r.o.", … // Other fields truncated for brevity } ``` -------------------------------- ### Subject Search Response Body Example Source: https://www.fakturoid.cz/api/v3/subjects Example of a successful response body when searching for subjects. It returns an array of subject objects, with some fields truncated for brevity. ```JSON [ { "id": 16, "custom_id": null, "user_id": null, "type": "customer", "name": "Apple Czech s.r.o.", … // Other fields truncated for brevity }, … ] ``` -------------------------------- ### Fakturoid API Invoices Index Request Source: https://www.fakturoid.cz/api/v3/invoices This is an example of a GET request to the Fakturoid API endpoint for retrieving a list of invoices. It includes the base URL and query parameters for filtering. ```http GET https://app.fakturoid.cz/api/v3/accounts/{slug}/invoices.json ``` -------------------------------- ### List Inventory Items Response Source: https://www.fakturoid.cz/api/v3/inventory-items Example JSON response body returned when listing inventory items. ```json [ { "id": 5, "name": "Kancelářské křeslo", "sku": "KU994RUR3897", "article_number_type": "ian", "article_number": null, "unit_name": null, "track_quantity": true, "quantity": "1998.0", "min_quantity": "538.0", "max_quantity": "2167.0", "allow_below_zero": false, "low_quantity_date": null, "native_purchase_price": "500.0", "native_retail_price": "1000.0", "vat_rate": "standard", "average_native_purchase_price": "500.0", "supply_type": "goods", "archived": false, "private_note": null, "suggest_for": "invoices", "created_at": "2023-11-03T13:24:03.046+01:00", "updated_at": "2023-11-03T13:24:03.049+01:00" }, … ] ``` -------------------------------- ### Retrieve Inventory Item Response Source: https://www.fakturoid.cz/api/v3/inventory-items Example JSON response body for a single inventory item detail request. ```json { "id": 11, "name": "Magic mouse", "sku": "KU994RUR9439", "article_number_type": "ian", "article_number": null, "unit_name": null, "track_quantity": true, "quantity": "1998.0", "min_quantity": "538.0", "max_quantity": "2167.0", "allow_below_zero": false, "low_quantity_date": null, "native_purchase_price": "500.0", "native_retail_price": "1000.0", "vat_rate": "standard", "average_native_purchase_price": "500.0", "supply_type": "goods", "archived": false, "private_note": null, "suggest_for": "invoices", "created_at": "2023-09-05T13:26:21.175+02:00", "updated_at": "2023-09-05T13:26:21.180+02:00" } ``` -------------------------------- ### Inventory Move Response Body Source: https://www.fakturoid.cz/api/v3/inventory-moves Example of a successful response body for an inventory move retrieval. ```json { "id": 12, "direction": "out", "moved_on": "2023-08-21", "quantity_change": "980.0", "purchase_price": "1273.474", "purchase_currency": "CZK", "native_purchase_price": "1273.474", "retail_price": "2528.0", "retail_currency": "CZK", "native_retail_price": "2528.0", "private_note": null, "inventory_item_id": 1, "document": { "id": 540, "type": "Invoice", "line_id": 1298 }, "created_at": "2023-09-05T13:26:20.968+02:00", "updated_at": "2023-09-05T13:26:20.968+02:00" } ``` -------------------------------- ### Response Example: Unit Price With VAT Source: https://www.fakturoid.cz/api/v3/generators Following a request with `vat_price_mode` set to 'from_total_with_vat', the response shows the `unit_price` as provided, along with calculated `unit_price_without_vat` and `unit_price_with_vat`. ```json { … "vat_price_mode": "from_total_with_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21", "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0" } ] } ``` -------------------------------- ### Expense Action Error Response Source: https://www.fakturoid.cz/api/v3/expenses Example JSON body returned when an expense action cannot be fired. ```json { "errors": { "event": [ "lock cannot be fired" ] } } ``` -------------------------------- ### List Generators Response Body Source: https://www.fakturoid.cz/api/v3/generators Example JSON response body returned when listing generators. ```json [ { "id": 10, "custom_id": null, "name": "Školení", "proforma": false, "paypal": false, "gopay": false, "tax_date_at_end_of_last_month": false, "due": 10, "subject_id": 32, "number_format_id": null, "note": "", "footer_note": "", "legacy_bank_details": null, "bank_account_id": null, "iban_visibility": "automatically", "tags": [], "order_number": "", "currency": "CZK", "payment_method": "bank", "custom_payment_method": null, "exchange_rate": "1.0", "language": "cz", "vat_price_mode": "without_vat", "transferred_tax_liability": false, "oss": "disabled", "supply_code": "", "subtotal": "28044.0", "total": "33933.24", "native_subtotal": "28044.0", "native_total": "33933.24", "lines": [ { "id": 1269, "name": "Školení personálu", "quantity": "4.0", "unit_name": "lidi", "unit_price": "7000.0", "vat_rate": 21, "unit_price_without_vat": "7000.0", "unit_price_with_vat": "8470.0", "inventory_item_id": null }, { "id": 1278, "name": "Občerstvení", "quantity": "1.0", "unit_name": "", "unit_price": "44.0", "vat_rate": 21, "unit_price_without_vat": "44.0", "unit_price_with_vat": "53.24", "inventory_item_id": null } ], "html_url": "https://app.fakturoid.cz/applecorp/generators/10", "url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/generators/10.json", "subject_url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/subjects/32.json", "created_at": "2023-09-05T13:26:20.806+02:00", "updated_at": "2023-09-26T12:00:21.083+02:00" }, … ] ``` -------------------------------- ### Fakturoid API Line Item with VAT Price Mode (From Total with VAT) Source: https://www.fakturoid.cz/api/v3/expenses Example of setting `vat_price_mode` to 'from_total_with_vat' for a line item. The `unit_price_without_vat` and `unit_price_with_vat` are calculated based on the provided `unit_price` and `vat_rate`. ```json { … "vat_price_mode": "from_total_with_vat", … "lines": [ { … "unit_price": "1210.0", "vat_rate": "21" } ] } ``` ```json { … "vat_price_mode": "from_total_with_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21", "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0" } ] } ``` -------------------------------- ### Failed Webhook Event Response Structure Source: https://www.fakturoid.cz/api/v3/webhooks Example JSON response showing the structure of failed webhook events, including the list of delivery attempts. ```json [ { "id": 1, "event_name": "invoice_created", "idempotency_key": "019505e0-85b3-7a4b-a163-740753e8e21a", "url": "https://www.example.com/webhook-endpoint", "body": { "body": { … }, "created_at": "2026-02-06T14:42:14.674+01:00", "event_name": "invoice_created", "webhook_id": 6 }, "created_at": "2026-02-06T14:42:14.678+01:00", "updated_at": "2026-02-06T14:55:10.794+01:00", "deliveries": [ { "id": 3, "request_id": "7a5d586d-76a2-4da7-9d34-0214cd098faf", "response_status": "ssl_error", "response_content_type": null, "response_body": null, "started_at": "2026-02-06T14:46:04.019+01:00", "finished_at": "2026-02-06T14:46:04.189+01:00", "created_at": "2026-02-06T14:46:04.190+01:00" }, { "id": 2, "request_id": "a14b20c8-e011-426d-aaf4-f0fe6bc5c63d", "response_status": "ssl_error", "response_content_type": null, "response_body": null, "started_at": "2026-02-06T14:43:34.081+01:00", "finished_at": "2026-02-06T14:43:34.193+01:00", "created_at": "2026-02-06T14:43:34.194+01:00" }, { "id": 1, "request_id": "b005af3d-81c9-4562-b9e8-d4b6ac31a55d", "response_status": "ssl_error", "response_content_type": null, "response_body": null, "started_at": "2026-02-06T14:43:11.727+01:00", "finished_at": "2026-02-06T14:43:11.916+01:00", "created_at": "2026-02-06T14:43:11.924+01:00" } ] }, … ] ``` -------------------------------- ### Response Example: Unit Price Without VAT Source: https://www.fakturoid.cz/api/v3/generators After a request with `vat_price_mode` set to 'without_vat', the response includes both `unit_price_without_vat` and `unit_price_with_vat` calculated by the API. ```json { … "vat_price_mode": "without_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21", "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0" } ] } ``` -------------------------------- ### Response for Missing Bank Account Setup Source: https://www.fakturoid.cz/api/v3/recurring-generators A `403 Forbidden` response may occur if a bank account is not configured in your Fakturoid settings. The error message provides a direct link to the relevant settings page. ```json { "errors": { "bank_account": [ "You have to setup bank account in your Fakturoid account https://app.fakturoid.cz/applecorp/settings/bank_accounts to create a generator.", ] } } ``` -------------------------------- ### Subject Response Structure Source: https://www.fakturoid.cz/api/v3/subjects This is an example of a successful response when retrieving a subject. It includes all available fields for a subject, such as contact information, identification numbers, and various settings. ```JSON [ { "id": 16, "custom_id": null, "user_id": null, "type": "customer", "name": "Apple Czech s.r.o.", "full_name": null, "email": "pokus@test.cz", "email_copy": null, "phone": null, "web": "https://www.apple.cz", "street": "Klimentská 1216/46", "city": "Praha", "zip": "11000", "country": "CZ", "has_delivery_address": false, "delivery_name": null, "delivery_street": null, "delivery_city": null, "delivery_zip": null, "delivery_country": null, "due": null, "currency": null, "language": null, "private_note": null, "registration_no": "28897501", "vat_no": "CZ28897501", "local_vat_no": null, "unreliable": null, "unreliable_checked_at": null, "legal_form": null, "vat_mode": null, "bank_account": null, "iban": null, "swift_bic": null, "variable_symbol": null, "setting_update_from_ares": "inherit", "ares_update": false, "setting_invoice_pdf_attachments": "inherit", "setting_estimate_pdf_attachments": "inherit", "setting_invoice_send_reminders": "inherit", "setting_invoice_send_due_date_reminders": "inherit", "suggestion_enabled": true, "invoice_reverse_charge": false, "invoice_supply_code": null, "custom_email_text": null, "overdue_email_text": null, "due_date_reminder_email_text": null, "invoice_from_proforma_email_text": null, "thank_you_email_text": null, "custom_estimate_email_text": null, "webinvoice_history": null, "html_url": "https://app.fakturoid.cz/applecorp/subjects/16", "url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/subjects/16.json", "created_at": "2023-08-22T10:59:00.330+02:00", "updated_at": "2023-08-22T10:59:00.330+02:00" }, ... ] ``` -------------------------------- ### GET /accounts/{slug}/inventory_items.json Source: https://www.fakturoid.cz/api/v3/inventory-items Retrieves a list of inventory items based on search queries and pagination. ```APIDOC ## GET /accounts/{slug}/inventory_items.json ### Description Retrieves a list of inventory items. Supports searching and pagination. ### Method GET ### Endpoint /accounts/{slug}/inventory_items.json ### Parameters #### Query Parameters - **query** (String) - Optional - Search query - **page** (Integer) - Optional - Page number (40 records per page) ### Response #### Success Response (200) - **Array** (Object) - List of inventory items ``` -------------------------------- ### Create Webhook with Invalid Data Source: https://www.fakturoid.cz/api/v3/webhooks Example of sending invalid data for webhook creation, resulting in a `422 Unprocessable Content` response with error details. ```json { "webhook_url": "https://example.com/webhook", "events": [] } ``` ```json { "errors": { "events": [ "can't be empty" ] } } ``` -------------------------------- ### Retrieve Generator Detail Response Body Source: https://www.fakturoid.cz/api/v3/generators Example JSON response body returned when retrieving a specific generator by ID. ```json { "id": 10, "custom_id": null, "name": "Školení", "proforma": false, "paypal": false, "gopay": false, "tax_date_at_end_of_last_month": false, "due": 10, "subject_id": 32, "number_format_id": null, "note": "", "footer_note": "", "legacy_bank_details": null, "bank_account_id": null, "iban_visibility": "automatically", "tags": [], "order_number": "", "currency": "CZK", "payment_method": "bank", "exchange_rate": "1.0", "language": "cz", "vat_price_mode": "without_vat", "transferred_tax_liability": false, "oss": "disabled", "supply_code": "", "subtotal": "28044.0", "total": "33933.24", "native_subtotal": "28044.0", "native_total": "33933.24", "lines": [ { "id": 1269, "name": "Školení personálu", "quantity": "4.0", "unit_name": "lidi", "unit_price": "7000.0", "vat_rate": 21, "unit_price_without_vat": "7000.0", "unit_price_with_vat": "8470.0", "inventory_item_id": null }, { "id": 1278, "name": "Pronájem prostor", "quantity": "1.0", "unit_name": "", "unit_price": "44.0", "vat_rate": 21, "unit_price_without_vat": "44.0", "unit_price_with_vat": "53.24", "inventory_item_id": null } ], "html_url": "https://app.fakturoid.cz/applecorp/generators/10", "url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/generators/10.json", "subject_url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/subjects/32.json", "created_at": "2023-09-05T13:26:20.806+02:00", "updated_at": "2023-09-26T12:00:21.083+02:00" } ``` -------------------------------- ### Fakturoid API Line Item with VAT Price Mode (Without VAT) Source: https://www.fakturoid.cz/api/v3/expenses Example of setting `vat_price_mode` to 'without_vat' for a line item. The `unit_price_without_vat` and `unit_price_with_vat` are calculated based on the provided `unit_price` and `vat_rate`. ```json { "vat_price_mode": "without_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21" } ] } ``` ```json { … "vat_price_mode": "without_vat", … "lines": [ { … "unit_price": "1000.0", "vat_rate": "21", "unit_price_without_vat": "1000.0", "unit_price_with_vat": "1210.0" } ] } ``` -------------------------------- ### Request Example: Unit Price With VAT Source: https://www.fakturoid.cz/api/v3/generators When `vat_price_mode` is 'from_total_with_vat', the `unit_price` attribute should be the total price including VAT. The API calculates the price without VAT. ```json { … "vat_price_mode": "from_total_with_vat", … "lines": [ { … "unit_price": "1210.0", "vat_rate": "21" } ] } ``` -------------------------------- ### Create Webhook Source: https://www.fakturoid.cz/api/v3/webhooks Create a new webhook for an account. A `201 Created` response is returned on success, with the new webhook's URL in the `Location` header. Invalid data results in a `422 Unprocessable Content` response. ```http POST https://app.fakturoid.cz/api/v3/accounts/{slug}/webhooks.json Headers: User-Agent: YourApp (yourname@example.com) Content-Type: application/json URL Parameters: slug: Account name (String, e.g., applecorp) Body: { "webhook_url": "https://example.com/webhook", "auth_header": "Bearer TOKEN", "events": [ "invoice_created", "invoice_updated", "invoice_paid" ] } ``` ```json { "id": 5, "failed_deliveries_uuid": "b3518e74-5c9f-4b26-a5e2-6a8021c94a77", "webhook_url": "https://example.com/webhook", "auth_header": "Bearer TOKEN", "active": true, "events": [ "invoice_created", "invoice_updated", "invoice_paid" ], "url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/webhooks/5.json", "created_at": "2024-06-12T13:29:23.568+02:00", "updated_at": "2024-06-12T13:29:23.568+02:00" } ``` -------------------------------- ### GET /accounts/{slug}/inventory_items/low_quantity.json Source: https://www.fakturoid.cz/api/v3/inventory-items Returns only items having quantity below the defined minimum. ```APIDOC ## GET /accounts/{slug}/inventory_items/low_quantity.json ### Description Returns only items having quantity below the defined minimum. ### Method GET ### Endpoint /accounts/{slug}/inventory_items/low_quantity.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name #### Query Parameters - **page** (Integer) - Optional - Page number (40 records per page) ### Response #### Success Response (200) - **Array** (Object) - List of low-quantity inventory items ``` -------------------------------- ### GET /accounts/{slug}/webhooks.json Source: https://www.fakturoid.cz/api/v3/webhooks Retrieves a list of all webhooks associated with the specified account. ```APIDOC ## GET /accounts/{slug}/webhooks.json ### Description Retrieves a list of webhooks for the given account slug. ### Method GET ### Endpoint /accounts/{slug}/webhooks.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name #### Query Parameters - **page** (Integer) - Optional - Page number (40 records per page) ### Response #### Success Response (200) - **Array** - List of webhook objects #### Response Example [ { "id": 5, "webhook_url": "https://example.com/webhook", "active": true, "events": ["invoice_created"] } ] ``` -------------------------------- ### GET /accounts/{slug}/generators.json Source: https://www.fakturoid.cz/api/v3/generators Retrieves a list of recurring generators for a specific account. ```APIDOC ## GET /accounts/{slug}/generators.json ### Description Retrieves a list of recurring generators for the specified account. If the query parameters 'since' or 'updated_since' are provided in an invalid ISO 8601 format, the server will return a 400 Bad Request error. ### Method GET ### Endpoint https://app.fakturoid.cz/api/v3/accounts/{slug}/generators.json ### Parameters #### Path Parameters - **slug** (String) - Required - The account name identifier. ``` -------------------------------- ### Invalid Expense Data Request Source: https://www.fakturoid.cz/api/v3/expenses Example of an invalid request body for expense creation or updates. ```json { "number": "invalid" } ``` -------------------------------- ### Webhook Events Overview Source: https://www.fakturoid.cz/api/v3/webhooks A comprehensive list of events triggered by resource modifications in the Fakturoid system. ```APIDOC ## Webhook Events ### Description Webhooks are triggered when resources are modified via user interaction, API calls, or automated system processes. Some events include an additional payload containing related resource data. ### Invoice Events - `invoice_created`: Invoice was created. - `invoice_updated`: Invoice was updated. - `invoice_removed`: Invoice was deleted. - `invoice_restored`: Invoice was restored. - `invoice_overdue`: Invoice marked as overdue. - `invoice_paid`: Invoice marked as paid (Payload: `payment: Payment`). - `invoice_payment_added`: Payment added (Payload: `payment: Payment`). - `invoice_payment_removed`: Invoice marked as unpaid (Payload: `payments: Array[Payment]`). - `invoice_sent`: Email sent. - `invoice_locked`: Invoice locked. - `invoice_unlocked`: Invoice unlocked. - `invoice_cancelled`: Invoice cancelled. - `invoice_cancellation_removed`: Cancellation removed. - `invoice_uncollectible`: Invoice marked as uncollectible. - `invoice_uncollectible_removed`: Uncollectibility removed. ### Generator Events - `generator_created`, `generator_updated`, `generator_removed`, `generator_restored` ### Recurring Generator Events - `recurring_generator_created`, `recurring_generator_updated`, `recurring_generator_removed`, `recurring_generator_restored` - `recurring_generator_invoice_created` (Payload: `invoice: Invoice`) - `recurring_generator_paused` ### Expense Events - `expense_created`, `expense_updated`, `expense_removed`, `expense_restored`, `expense_overdue`, `expense_locked`, `expense_unlocked` - `expense_paid` (Payload: `payment: Payment`) - `expense_payment_added` (Payload: `payment: Payment`) - `expense_payment_removed` (Payload: `payments: Array[Payment]`) ### Inbox File Events - `inbox_file_created`, `inbox_file_updated` - `inbox_file_removed` (Payload: `expense: Expense`) - `inbox_file_removed_all` (Payload: `count: Integer`) - `inbox_file_ocr_processing_failed`, `inbox_file_ocr_processing_rejected`, `inbox_file_ocr_processed` ### Inventory Events - `inventory_item_created`, `inventory_item_updated`, `inventory_item_removed`, `inventory_item_archived`, `inventory_item_unarchived` ``` -------------------------------- ### VAT Price Mode Source: https://www.fakturoid.cz/api/v3/recurring-generators Explains the `vat_price_mode` setting and its behavior, including conditions where it is ignored. It also details the possible values for `vat_price_mode`. ```APIDOC ## VAT Price Mode `vat_price_mode` settings is ignored in following cases: * Account is set as non VAT payer. * Reverse charge (`transferred_tax_liability`) is used. | Attribute | Description ---|--- `null` | Inherited automatically from the account settings `"without_vat"` | The price in the invoice line is entered without VAT and the VAT is calculated automatically as a percentage from the line `"from_total_with_vat"` | The price in the invoice line is inclusive of VAT and the VAT is calculated from it ``` -------------------------------- ### Invalid Inventory Move Request Source: https://www.fakturoid.cz/api/v3/inventory-moves Example payloads that trigger a 422 Unprocessable Content error. ```json { "direction": "in", "moved_on": "2023-11-10", "quantity_change": "35" } ``` ```json { "direction": "1" } ``` -------------------------------- ### GET /accounts/{slug}/webhooks/{id}.json Source: https://www.fakturoid.cz/api/v3/webhooks Retrieves the details of a specific webhook by its ID. ```APIDOC ## GET /accounts/{slug}/webhooks/{id}.json ### Description Retrieves detailed information about a specific webhook. ### Method GET ### Endpoint /accounts/{slug}/webhooks/{id}.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name - **id** (Integer) - Required - Webhook ID ### Response #### Success Response (200) - **Object** - Webhook details #### Response Example { "id": 5, "webhook_url": "https://example.com/webhook", "active": true } ``` -------------------------------- ### Download Expense File Source: https://www.fakturoid.cz/api/v3/expenses Downloads a specific expense file. The response is a binary PDF file. ```APIDOC ## GET /accounts/{slug}/expenses/{expense_id}/attachments/{id}.pdf ### Description Downloads a specific attachment for an expense. ### Method GET ### Endpoint `/accounts/{slug}/expenses/{expense_id}/attachments/{id}.pdf` ### Parameters #### Path Parameters - **slug** (String) - Required - Account name - **expense_id** (Integer) - Required - Expense ID - **id** (Integer) - Required - Attachment ID ### Response #### Success Response (200 OK) - **Content-Type** (String) - `application/pdf` - **Content-Transfer-Encoding** (String) - `binary` - **Content-Disposition** (String) - `attachment; filename=""; filename*=UTF-8''` - **Body** - Binary data of the PDF file. #### Response if file cannot be downloaded (204 No Content) - **Status** `204 No Content` ``` -------------------------------- ### Create Inventory Item Request and Response Source: https://www.fakturoid.cz/api/v3/inventory-items JSON request body for creating a new item and the corresponding successful response body. ```json { "name": "Keyboard 55F", "sku": "00TF6455F", "track_quantity": true, "quantity": 50, "native_purchase_price": 150, "native_retail_price": 250 } ``` ```json { "id": 34, "name": "Keyboard 55F", "sku": "00TF6455F", "article_number_type": "ian", "article_number": null, "unit_name": "", "track_quantity": true, "quantity": "50.0", "min_quantity": null, "max_quantity": null, "allow_below_zero": false, "low_quantity_date": null, "native_purchase_price": "150.0", "native_retail_price": "250.0", "vat_rate": null, "average_native_purchase_price": "150.0", "supply_type": "goods", "archived": false, "private_note": null, "suggest_for": "both", "created_at": "2023-11-28T15:51:05.598+01:00", "updated_at": "2023-11-28T15:51:05.607+01:00" } ``` -------------------------------- ### GET /accounts/{slug}/inventory_items/search.json Source: https://www.fakturoid.cz/api/v3/inventory-items Searches for inventory items by name, article number, or SKU. ```APIDOC ## GET /accounts/{slug}/inventory_items/search.json ### Description Searches for inventory items. The following fields are being searched: name, article_number and sku. ### Method GET ### Endpoint /accounts/{slug}/inventory_items/search.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name ``` -------------------------------- ### GET /accounts/{slug}/inventory_items/archived.json Source: https://www.fakturoid.cz/api/v3/inventory-items Retrieves a list of archived inventory items for a specific account. ```APIDOC ## GET /accounts/{slug}/inventory_items/archived.json ### Description Retrieves a list of archived inventory items for a specific account. ### Method GET ### Endpoint /accounts/{slug}/inventory_items/archived.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name #### Query Parameters - **since** (DateTime) - Optional - Items created after this date - **until** (DateTime) - Optional - Items created before this date - **updated_since** (DateTime) - Optional - Items created or updated after this date - **updated_until** (DateTime) - Optional - Items created or updated before this date - **page** (Integer) - Optional - Page number (40 records per page) - **article_number** (String) - Optional - Filter items by article number - **sku** (String) - Optional - Filter items by stock keeping unit (SKU) ### Response #### Success Response (200) - **Array** (Object) - List of archived inventory items ``` -------------------------------- ### GET /accounts/{slug}/webhooks/{failed_deliveries_uuid}/failed_deliveries.json Source: https://www.fakturoid.cz/api/v3/webhooks Retrieves a list of failed webhook delivery events. ```APIDOC ## GET /accounts/{slug}/webhooks/{failed_deliveries_uuid}/failed_deliveries.json ### Description Returns a list of webhook events that failed to be delivered after all retry attempts. ### Method GET ### Endpoint /accounts/{slug}/webhooks/{failed_deliveries_uuid}/failed_deliveries.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name - **failed_deliveries_uuid** (UUID) - Required - Webhook UUID ### Response #### Success Response (200) - Returns a list of failed delivery events. ``` -------------------------------- ### POST /accounts/{slug}/webhooks.json Source: https://www.fakturoid.cz/api/v3/webhooks Creates a new webhook for the specified account. ```APIDOC ## POST /accounts/{slug}/webhooks.json ### Description Creates a new webhook to receive event notifications. ### Method POST ### Endpoint /accounts/{slug}/webhooks.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name #### Request Body - **webhook_url** (String) - Required - Target URL - **auth_header** (String) - Optional - Authorization header - **events** (Array) - Required - List of events to subscribe to ### Response #### Success Response (201) - **Object** - Created webhook object #### Error Response (422) - **errors** (Object) - List of validation errors ``` -------------------------------- ### GET /accounts/{slug}/inventory_items/{id}.json Source: https://www.fakturoid.cz/api/v3/inventory-items Retrieves the details of a specific inventory item by its ID. ```APIDOC ## GET /accounts/{slug}/inventory_items/{id}.json ### Description Retrieves the full details of a specific inventory item. ### Method GET ### Endpoint /accounts/{slug}/inventory_items/{id}.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name - **id** (Integer) - Required - Item ID ### Response #### Success Response (200) - **item** (Object) - Inventory item details ``` -------------------------------- ### List Webhooks Source: https://www.fakturoid.cz/api/v3/webhooks Retrieve a list of all configured webhooks for an account. Pagination is supported with 40 records per page. ```http GET https://app.fakturoid.cz/api/v3/accounts/{slug}/webhooks.json Headers: User-Agent: YourApp (yourname@example.com) URL Parameters: slug: Account name (String, e.g., applecorp) Query Parameters: page: Page number (Integer, e.g., 2) ``` ```json [ { "id": 5, "failed_deliveries_uuid": "b3518e74-5c9f-4b26-a5e2-6a8021c94a77", "webhook_url": "https://example.com/webhook", "auth_header": "Bearer TOKEN", "active": true, "events": [ "invoice_created", "invoice_updated", "invoice_paid" ], "url": "https://app.fakturoid.cz/api/v3/accounts/applecorp/webhooks/5.json", "created_at": "2024-06-12T13:29:23.568+02:00", "updated_at": "2024-06-12T13:29:23.568+02:00" }, … ] ``` -------------------------------- ### VAT Rates Summary Source: https://www.fakturoid.cz/api/v3/expenses Provides a summary of VAT rates and associated totals. ```APIDOC ## VAT Rates Summary ### Description This section details the structure for summarizing VAT information. ### Attributes - `vat_rate` (Integer/Decimal): The VAT rate applied. - `base` (Decimal): The base amount to which the VAT rate is applied. - `vat` (Decimal): The calculated VAT amount. - `currency` (String): The currency of the base and VAT amounts. - `native_base` (Decimal): The base amount in the account's native currency. - `native_vat` (Decimal): The VAT amount in the account's native currency. - `native_currency` (String): The account's native currency. ``` -------------------------------- ### GET /accounts/{slug}/invoices.json Source: https://www.fakturoid.cz/api/v3/invoices Retrieves a list of all documents including invoices, proformas, corrections, and tax documents. ```APIDOC ## GET /accounts/{slug}/invoices.json ### Description Includes all documents like invoices, proformas, corrections and tax documents. ### Method GET ### Endpoint /accounts/{slug}/invoices.json ### Parameters #### Path Parameters - **slug** (String) - Required - Account name #### Query Parameters - **since** (DateTime) - Optional - Invoices created after this date - **until** (DateTime) - Optional - Invoices created before this date - **updated_since** (DateTime) - Optional - Invoices created or updated after this date - **updated_until** (DateTime) - Optional - Invoices created or updated before this date - **page** (Integer) - Optional - Page number (40 records per page) - **subject_id** (Number) - Optional - Filter by subject ID - **custom_id** (String) - Optional - Filter by your own ID - **number** (String) - Optional - Filter by document number - **status** (String) - Optional - Filter by document status - **document_type** (String) - Optional - Filter by document type (regular, proforma, invoice, correction, tax_document) ### Response #### Success Response (200) - **Status** (200 OK) ``` -------------------------------- ### Retrieve Events with Query Parameters Source: https://www.fakturoid.cz/api/v3/events Use this endpoint to fetch events. Ensure the `since` parameter is in ISO 8601 format to avoid a 400 Bad Request error. Other parameters like `page` and `subject_id` can be used for filtering and pagination. ```http GET https://app.fakturoid.cz/api/v3/accounts/{slug}/events.json?since=2023-08-25T10:55:14+02:00&page=2&subject_id=5 ```