openapi: 3.0.1 info: title: UOL Accounting REST API version: 1.0.5 contact: name: UOL API Support email: api@uol.cz description: | # Authentication Only authenticated user is permitted to use this API. You can login via **Basic Auth** ([`RFC 7617`](https://en.wikipedia.org/wiki/Basic_access_authentication)) using user **email** as `Username` and **token** as `Password`. To get your API **token** you should visit *path* `/api_tokens` in UOL settings page. User using API have to **REST API** permission set. You can test authorized API call via `/v1/ping` endpoint. Contact [*UOL API Support*](mailto:api@uol.cz) if you need any assistance or help. # Test and development You can test the API on **DEMO** server using - email: `demo@ucetnictvi-on-line.cz` - token: `3R1Cc_wzcSuq02Wsh1-uww` A dedicated **SANDBOX** environment is also available for integration testing. If you need a special sandbox tenant provisioned for your integration, contact [*UOL API Support*](mailto:api@uol.cz). # Encoding and format All API calls should be **UTF-8** encoded and using `Accept: application/json` header All `boolean` attributes in `POST` have to be sent as `string` # Errors ## Error codes - **0001** - missing `Authorization` *HTTP* header - **0002** - unable to authenticate user, check **email**, **token** and propper permission setting for user - **0003** - invalid *Customer ID* in URL hostname - **0004** - entity does not exist - **0005** - unable to delete this entity (becuase of data integrity) - **0010** - internal error, please contact *UOL API support* # Rate limit API has a rate limit; when exceeded, it returns an HTTP error **429** for 30 seconds. Limits are as follows: - `/api/v1/receivables` → max 10 requests in 10 seconds. - `/api/v1/*` (all others) → max 30 requests in 10 seconds. # Where to start 1. Test your **authentication** using `/v1/ping` endpoint 2. Try to **create** new **contact** (invoice counterparty) with examples in **POST** `/v1/contacts` section 3. Now you can **create** sales **invoice** using examples described in **POST** `/v1/sales_invoices` servers: - url: 'https://test.demo.uol.cz/api' description: DEMO server - url: 'https://{customerId}.sandbox.uol.cz/api' description: Sandbox server variables: customerId: default: test description: Customer ID assigned by UOL - url: 'https://{customerId}.ucetnictvi.uol.cz/api' description: Production server variables: customerId: default: test description: Customer ID assigned by UOL tags: - name: sales description: Operations about sales - name: purchases description: Operations about purchases - name: cashes - name: banks - name: warehouse - name: contacts description: Operation about contacts and contact's bank accounts - name: products description: Operations about products and price lists - name: documents description: Uploaded PDF documents - name: accounting - name: my_company description: 'Operations about my company, departments and contracts' - name: system description: Operations about system and internal references paths: /v1/contacts: get: tags: - contacts description: Returns contacts (100 per page) operationId: getV1Contacts parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: 'Contact name, contact code, note' schema: type: string - name: external_id in: query description: External code schema: type: string - name: name in: query description: Contact name schema: type: string - name: company_number in: query description: Company number schema: type: string - name: vatin in: query description: VATIN schema: type: string - name: hidden in: query description: Hidden contact schema: type: string default: all enum: - all - 'yes' - 'no' - name: country in: query description: Country code schema: type: string - name: vat_payer in: query description: VAT payer schema: type: string default: all enum: - all - 'yes' - 'no' - name: taxable_person in: query description: Taxable person (business) schema: type: string default: all enum: - all - 'yes' - 'no' - name: business_entity in: query description: Deprecated, use taxable_person deprecated: true schema: type: string enum: - all - 'yes' - 'no' - name: received_invoice_public_id_setting in: query description: Issues invoices with numbers schema: type: string - name: received_invoice_variable_symbol_setting in: query description: Issues invoices with VS schema: type: string - name: percent_discount_min in: query description: Discount from schema: type: string - name: percent_discount_max in: query description: Discount to schema: type: string - name: consumption_country in: query description: Consumption country schema: type: string - name: acquisition_country in: query description: Acquisition country schema: type: string - name: department in: query description: Department schema: type: string - name: contract in: query description: Contract schema: type: string - name: price_list in: query description: Pricelist schema: type: string - name: days_till_due_date_min in: query description: Days till due date from schema: type: string - name: days_till_due_date_max in: query description: Days till due date to schema: type: string responses: '200': $ref: '#/components/responses/ContactsResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' post: tags: - contacts summary: Creates new contact operationId: postV1Contacts requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/Contact' - type: object properties: contract_id: type: string - type: object properties: addresses: type: array items: $ref: '#/components/schemas/ContactAddress' examples: basic: summary: basic contact value: name: Jan Novák extended: summary: contact with address value: name: Anna Nová addresses: - name: Anna Nová country_id: CZ advanced: summary: contact with multiple addresses value: name: 'U. S. Steel Košice, s.r.o.' company_number: 36199222 tin: 2020052837 vatin: SK7020000119 vat_payer: 'true' taxable_person: 'true' external_id: firma_1027 country_id: SK addresses: - name: 'U. S. Steel Košice, s.r.o.' street: Vstupný areál U. S. Steel city: Košice postal_code: 044 54 country_id: SK email: example@steel.us phone: +421 55 673 1111 address_types: - accounting - name: United States Steel Corporation city: Pittsburgh country_id: US responses: '201': $ref: '#/components/responses/ContactResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' '422': $ref: '#/components/responses/422ValidationError' '500': $ref: '#/components/responses/500InternalServerError' '/v1/contacts/{contact_id}': get: tags: - contacts description: 'Returns single contact by :id' operationId: getV1ContactsContactId parameters: - name: contact_id in: path description: Contact code required: true schema: type: string example: alzacz_as responses: '200': $ref: '#/components/responses/ContactResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404RecordDoesntExist' patch: tags: - contacts summary: 'Updates existing contact by :id' operationId: patchV1ContactsContactId parameters: - name: contact_id in: path description: Contact code required: true example: alzacz_as schema: type: string requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/Contact' - type: object properties: contract_id: type: string - type: object properties: addresses: type: array items: allOf: - $ref: '#/components/schemas/ContactAddress' - type: object properties: _destroy: type: string description: Send 1 for delete the address example: 1 examples: basic: summary: update contact name value: name: Karolína Nenasytná extended: summary: update contact address value: addresses: - address_id: jatecni_1530-33-praha url: www.alza.cz advanced: summary: delete contact address value: addresses: - address_id: pittsburgh-united_stat _destroy: 1 responses: '200': $ref: '#/components/responses/ContactResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' '422': $ref: '#/components/responses/422PatchValidationError' '500': $ref: '#/components/responses/500InternalServerError' /v1/sales_invoices: get: tags: - sales description: Returns all sales invoices (100 per page) operationId: getV1SalesInvoices parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: 'Invoice number, buyer name or part of the text' schema: type: string - name: buyer_id in: query description: Contact ID of buyer schema: type: string - name: public_id in: query description: Partial match of evidence number schema: type: string - name: public_id_eq in: query description: Exact match of evidence number schema: type: string - name: tax_payment_date_from in: query description: Tax point date from schema: type: string - name: tax_payment_date_till in: query description: Tax point date to schema: type: string - name: issue_date_from in: query description: Issue date from schema: type: string - name: issue_date_till in: query description: Issue date till schema: type: string - name: total_min in: query description: Amount from schema: type: string - name: total_max in: query description: Amount till schema: type: string - name: payment_method in: query description: Payment method schema: type: string enum: - bank_transfer - proforma - cash - credit_card - offseting - cash_on_delivery - collection - cheque - installment - postal_order_to_cash - postal_order_to_bank - sipo - name: constant_symbol in: query description: Constant symbol schema: type: string - name: specific_symbol in: query description: Specific symbol schema: type: string - name: variable_symbol in: query description: Variable symbol schema: type: string - name: my_bank_account in: query description: My bank account schema: type: string - name: due_date_from in: query description: Due date from schema: type: string - name: due_date_till in: query description: Due date till schema: type: string - name: type in: query description: Type schema: type: string enum: - standard - corrective - proforma - penalty - name: department in: query description: Department schema: type: string - name: contract in: query description: Contract schema: type: string - name: shipping_method in: query description: Shipping method schema: type: string enum: - seller - buyer - shipper - name: consumption_country in: query description: Consumption country schema: type: string - name: creator in: query description: Created by schema: type: string - name: external_id in: query description: External ID from your system schema: type: string - name: idempotency_key in: query description: Idempotency key the invoice was created with schema: type: string responses: '200': $ref: '#/components/responses/SalesInvoicesResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404RecordDoesntExist' post: tags: - sales summary: Creates new sales invoice operationId: postV1SalesInvoices requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/SalesInvoice' - type: object properties: idempotency_key: type: string maxLength: 255 description: >- Your unique key of this create. Retrying a create with the same key is rejected with a validation error on idempotency_key instead of creating a second invoice; look the existing invoice up with the idempotency_key filter. Accepted only on create, it cannot be changed afterwards. example: 8a3c1f0e-4b7d-4e2a-9c51-0d6f2b9e7a14 items: type: array items: $ref: '#/components/schemas/SalesInvoiceItem' examples: basic: summary: basic sales invoice value: buyer_id: alzacz_as foreign_currency: summary: invoice with foreign currency value: buyer_id: alzacz_as currency_id: EUR bank_account_id: cs_eur items: - product_id: marketing unit_price: 100 advanced: summary: confirmed sales invoice with multiple items value: buyer_id: alzacz_as status: confirmed text: Summer campaign items: - product_id: marketing description: billboards quantity: 2 total_price_vat_inclusive: 10000 vat_calculation_method: from_above - product_id: marketing description: colsulting quantity: 3 unit_price_vat_inclusive: 1000 vat_calculation_method: from_above proforma: summary: proforma value: buyer_id: alzacz_as type: proforma status: confirmed text: Proforma invoice items: - product_id: marketing description: Deposit for service delivery unit_price: 1000000 reconciliation_invoice: summary: reconciliation invoice value: buyer_id: alzacz_as status: confirmed items: - product_id: marketing description: Campaign unit_price_vat_inclusive: 1000000 vat_calculation_method: from_above - product_id: zaloha_fo description: deposit quantity: -1 unit_price: 1000000 responses: '201': $ref: '#/components/responses/SalesInvoiceResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404RecordDoesntExist' '422': $ref: '#/components/responses/422ValidationError' '500': $ref: '#/components/responses/500InternalServerError' '/v1/sales_invoices/{invoice_id}': get: tags: - sales description: | Returns a single sales invoice by `invoice_id`. The response format is selected via the `Accept` header: - `application/json` (default) — JSON representation - `application/pdf` — rendered PDF document - `text/isdoc` — ISDOC (XML e-invoice); only available for valid and confirmed invoices operationId: getV1SalesInvoicesNumber parameters: - name: invoice_id in: path description: Invoice ID required: true schema: type: string - in: query name: template_id schema: type: integer description: Numeric ID of template (only applies when the requested response is PDF) responses: '200': $ref: '#/components/responses/SalesInvoiceExtendedResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404RecordDoesntExist' '422': description: The invoice is not in a state that can be exported to the requested format (e.g. requesting ISDOC for an unconfirmed invoice). content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - sales summary: 'Deletes existing sales invoice by :invoice_id' description: only last and unconfirmed (valid) invoice could be deleted operationId: deleteV1SalesInvoicesInvoiceId parameters: - name: invoice_id in: path description: Invoice number required: true schema: type: string responses: '204': description: Deletes existing sales invoice by invoice_id content: application/json: {} '401': $ref: '#/components/responses/401UnauthorizedError' '403': $ref: '#/components/responses/403CantDelete' '404': $ref: '#/components/responses/404RecordDoesntExist' '500': $ref: '#/components/responses/500InternalServerError' patch: tags: - sales summary: 'Updates existing sales invoice by :invoice_id' description: 'Only unconfirmed invoices can be updated; a confirmed one answers `403`. To edit a confirmed invoice, disconfirm it first with `POST /v1/repairs` (`document_type: FO`, `method: disconfirm`), update it and confirm it again with `status: confirmed`.' operationId: patchV1SalesInvoicesInvoiceId parameters: - name: invoice_id in: path description: Invoice number required: true schema: type: string requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/SalesInvoice' - type: object properties: items: type: array items: allOf: - $ref: '#/components/schemas/SalesInvoiceItem' - type: object properties: _destroy: type: string description: Send 1 for delete the address example: 1 examples: basic: summary: update invoice note value: note: my new invoice note confirmation: summary: confirm invoice (issue invoice from concept) value: status: confirmed extended: summary: add new item to invoice value: items: - product_id: marketing unit_price: 1000 quantity: 7 advanced: summary: delete item from invoice value: items: - id: 77259 _destroy: 1 responses: '200': $ref: '#/components/responses/SalesInvoiceResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404RecordDoesntExist' '422': $ref: '#/components/responses/422PatchValidationError' '500': $ref: '#/components/responses/500InternalServerError' /v1/purchase_invoices: get: tags: - purchases description: Returns all purchase invoices (100 per page) operationId: getV1PurchaseInvoices parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: 'Invoice number, buyer name or part of the text' schema: type: string - name: public_id in: query description: Partial match of evidence number schema: type: string - name: public_id_eq in: query description: Exact match of evidence number schema: type: string - name: seller_id in: query description: Contact ID of seller schema: type: string - name: type in: query description: Type schema: type: string enum: - standard - corrective - proforma - penalty - name: department in: query description: Department schema: type: string - name: contract in: query description: Contract schema: type: string - name: shipping_method in: query description: Shipping method schema: type: string enum: - seller - buyer - shipper - name: tax_payment_date_from in: query description: Tax point date from schema: type: string - name: tax_payment_date_till in: query description: Tax point date till schema: type: string - name: due_date_from in: query description: Due date from schema: type: string - name: due_date_till in: query description: Due date till schema: type: string - name: received_date_from in: query description: Received date from schema: type: string - name: received_date_till in: query description: Received date till schema: type: string - name: payment_method in: query description: Payment method schema: type: string enum: - bank_transfer - proforma - cash - credit_card - offseting - cash_on_delivery - collection - cheque - installment - postal_order_to_cash - postal_order_to_bank - sipo - name: constant_symbol in: query description: Constant symbol schema: type: string - name: specific_symbol in: query description: Specific symbol schema: type: string - name: variable_symbol in: query description: Variable symbol schema: type: string - name: total_min in: query description: Amount from schema: type: string - name: total_max in: query description: Amount to schema: type: string - name: currency in: query description: Currency schema: type: string - name: acquisition_country in: query description: Acquisition country schema: type: string - name: creator in: query description: Created by schema: type: string - name: external_id in: query description: External ID from your system schema: type: string - name: idempotency_key in: query description: Idempotency key the invoice was created with schema: type: string responses: '200': description: Returns all purchase invoices (100 per page) content: application/json: {} post: tags: - purchases summary: Creates single purchase invoice operationId: postV1PurchaseInvoices requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/PurchaseInvoice' - type: object properties: idempotency_key: type: string maxLength: 255 description: >- Your unique key of this create. Retrying a create with the same key is rejected with a validation error on idempotency_key instead of creating a second invoice; look the existing invoice up with the idempotency_key filter. Accepted only on create, it cannot be changed afterwards. example: 8a3c1f0e-4b7d-4e2a-9c51-0d6f2b9e7a14 items: type: array items: $ref: '#/components/schemas/PurchaseInvoiceItem' examples: basic: summary: confirmed invoice value: seller_id: alzacz_as public_id: X00124 payment_method: credit_card status: confirmed total_amount: 1210 vat1_amount: 210 items: - product_id: drmaj total_price: 1000 vat_rate: 21 multiple_items: summary: invoice with multiple items value: seller_id: alzacz_as public_id: X00125 payment_method: bank_transfer items: - product_id: drmaj description: office supplies quantity: 2 total_price: 1000 vat_rate: 21 - product_id: drmaj description: consulting quantity: 1 total_price_vat_inclusive: 2420 vat_calculation_method: from_above vat_rate: 21 responses: '201': description: Creates single purchase invoice content: application/json: {} '/v1/purchase_invoices/{invoice_id}': get: tags: - purchases description: 'Returns single purchase invoice by :number' operationId: getV1PurchaseInvoicesNumber parameters: - name: invoice_id in: path description: Invoice number required: true schema: type: string responses: '200': description: 'Returns single purchase invoice by :number' content: application/json: {} patch: tags: - purchases summary: 'Updates existing purchase invoice by :invoice_id' description: 'Detailed information about current endpoint' operationId: patchV1PurchaseInvoicesInvoiceId parameters: - name: invoice_id in: path description: Invoice number required: true schema: type: string requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/PurchaseInvoice' - type: object properties: items: type: array items: allOf: - $ref: '#/components/schemas/PurchaseInvoiceItem' - type: object properties: id: type: string description: existing item code (required when updating an item) _destroy: type: string description: set to a truthy value to delete an existing item responses: '200': description: 'Updates existing purchase invoice by :invoice_id' content: application/json: {} /v1/purchase_orders: get: tags: - purchases description: Returns purchase order (100 per page) operationId: getV1PurchaseOrders parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns purchase order (100 per page) content: application/json: {} '/v1/purchase_orders/{order_id}': get: tags: - purchases description: 'Returns single purchase order by :id' operationId: getV1PurchaseOrdersOrderId parameters: - name: order_id in: path description: Order identifier required: true schema: type: string responses: '200': description: 'Returns single purchase order by :id' content: application/json: {} /v1/retails: get: tags: - sales description: Returns retails (100 per page) operationId: getV1Retails parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns retails (100 per page) content: application/json: {} '/v1/retails/{gid}': get: tags: - sales description: 'Returns single retail by :gid' operationId: getV1RetailsGid parameters: - name: gid in: path description: Retail identifier required: true schema: type: string responses: '200': description: 'Returns single retail by :gid' content: application/json: {} /v1/sales_orders: get: tags: - sales description: Returns sales order (100 per page) operationId: getV1SalesOrders parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: 'Invoice number, buyer name or part of the text' schema: type: string - name: contact_id in: query description: Contact id schema: type: string - name: created_at_from in: query description: created_at from schema: type: string - name: created_at_until in: query description: created_at until schema: type: string - name: updated_at_from in: query description: updated_at from schema: type: string - name: updated_at_until in: query description: updated_at until schema: type: string - name: fullfilled_on_from in: query description: fullfilled_on from schema: type: string - name: fullfilled_on_until in: query description: fullfilled_on until schema: type: string - name: status in: query description: 'Status: "valid", "invalid" or "locked"' schema: type: string responses: '200': description: Returns sales order (100 per page) content: application/json: {} '/v1/sales_orders/{order_id}': get: tags: - sales description: 'Returns single sales order by :id' operationId: getV1SalesOrdersOrderId parameters: - name: order_id in: path description: Order identifier required: true schema: type: string responses: '200': description: 'Returns single sales order by :id' content: application/json: {} /v1/products: get: tags: - products description: Returns products (100 per page) operationId: getV1Products parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: Accounting record schema: type: string - name: barcode in: query description: barcode of product (e.g. EAN) schema: type: string - name: hidden in: query description: Hidden product schema: type: string default: all enum: - all - 'yes' - 'no' responses: '200': description: Returns products (100 per page) content: application/json: {} post: tags: - products summary: Creates new product description: 'Detailed information about current endpoint' operationId: postV1Products requestBody: content: application/json: schema: properties: name: type: string description: Product title product_id: type: string description: Product id(code) category_id: type: string description: Product category code group_id: type: string description: Product group code unit_id: type: string description: Measurement unit code vat_code: type: string description: Vat rate code responses: '201': description: Creates new product content: application/json: {} '/v1/products/{product_id}': get: tags: - products description: 'Returns single product by :id' operationId: getV1ProductsProductId parameters: - name: product_id in: path description: Product code required: true schema: type: string responses: '200': description: 'Returns single product by :id' content: application/json: {} patch: tags: - products summary: 'Updates existing product by :product_id' description: 'Detailed information about current endpoint' operationId: patchV1ProductsProductId parameters: - name: product_id in: path description: Product code required: true schema: type: string requestBody: content: application/json: schema: properties: name: type: string description: '' group_id: type: string description: '' unit_id: type: string description: '' responses: '200': description: 'Updates existing product by :product_id' content: application/json: {} /v1/currencies: get: tags: - system description: Returns currencies (100 per page) operationId: getV1Currencies parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns currencies (100 per page) content: application/json: {} '/v1/currencies/{currency_id}': get: tags: - system description: 'Returns single currency by :id' operationId: getV1CurrenciesCurrencyId parameters: - name: currency_id in: path description: currency code required: true schema: type: string responses: '200': description: 'Returns single currency by :id' content: application/json: {} /v1/countries: get: tags: - system description: Returns countries (100 per page) operationId: getV1Countries parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns countries (100 per page) content: application/json: {} '/v1/countries/{country_id}': get: tags: - system description: 'Returns single country by :id' operationId: getV1CountriesCountryId parameters: - name: country_id in: path description: Country identifier required: true schema: type: string responses: '200': description: 'Returns single country by :id' content: application/json: {} /v1/contracts: get: tags: - my_company description: Returns contracts (100 per page) operationId: getV1Contracts parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: Contract name or code schema: type: string - name: name in: query description: Contract name schema: type: string - name: external_id in: query description: External code schema: type: string - name: hidden in: query description: Hidden contract schema: type: string default: all enum: - all - 'yes' - 'no' responses: '200': description: Returns contracts (100 per page) content: application/json: {} post: tags: - my_company summary: Creates new contract description: 'Detailed information about current endpoint' operationId: postV1Contracts requestBody: content: application/json: schema: properties: name: type: string description: type: string issued_date: type: string completion_date: type: string external_id: type: string hidden: type: string terminated: type: string responses: '201': description: Creates new contract content: application/json: {} '/v1/contracts/{contract_id}': get: tags: - my_company description: 'Returns single contract by :id' operationId: getV1ContractsContractId parameters: - name: contract_id in: path description: Contract code required: true schema: type: string responses: '200': description: 'Returns single contract by :id' content: application/json: {} patch: tags: - my_company summary: 'Updates contract by :id' description: 'Detailed information about current endpoint' operationId: patchV1ContractsContractId parameters: - name: contract_id in: path description: Contract code required: true schema: type: string requestBody: content: application/json: schema: properties: name: type: string description: type: string issued_date: type: string completion_date: type: string external_id: type: string hidden: type: string terminated: type: string responses: '200': description: 'Updates contract by :id' content: application/json: {} /v1/contact_bank_accounts: get: tags: - contacts description: Returns contact_bank_accounts (100 per page) operationId: getV1ContactBankAccounts parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: 'Contact, bank account number, IBAN' schema: type: string - name: bank_account in: query description: Bank account number schema: type: string - name: bank_country in: query description: Bank country code schema: type: string - name: contact in: query description: Contact schema: type: string - name: iban in: query description: IBAN schema: type: string - name: iban_or_bank_account in: query description: IBAN or bank account number schema: type: string responses: '200': $ref: '#/components/responses/ContactBankAccountsResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' '500': $ref: '#/components/responses/500InternalServerError' post: tags: - contacts description: Creates new contact bank account operationId: postV1ContactBankAccounts requestBody: content: application/json: schema: properties: bank_account_id: type: string description: Bank account code bank_code: type: string description: Bank code contact_id: type: string description: Contact currency_id: type: string description: Currency mode name: type: string description: Name bank_country_id: type: string description: Country code responses: '201': $ref: '#/components/responses/ContactBankAccountResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' '500': $ref: '#/components/responses/500InternalServerError' '/v1/contact_bank_accounts/{bank_account_id}': get: tags: - contacts description: 'Returns single contact_bank_account by :bank_account_id' operationId: getV1ContactBankAccountsBankAccountId parameters: - name: bank_account_id in: path description: ContactBankAccount bank_account_id required: true schema: type: string responses: '200': $ref: '#/components/responses/ContactBankAccountResponse' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' '500': $ref: '#/components/responses/500InternalServerError' /v1/my_bank_accounts: get: tags: - banks description: Returns my_bank_accounts (100 per page) operationId: getV1MyBankAccounts parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns my_bank_accounts (100 per page) content: application/json: {} '/v1/my_bank_accounts/{bank_account_id}': get: tags: - banks description: 'Returns single my_bank_account by :id' operationId: getV1MyBankAccountsBankAccountId parameters: - name: bank_account_id in: path description: MyBankAccount id required: true schema: type: string responses: '200': description: 'Returns single my_bank_account by :id' content: application/json: {} /v1/bank_balances: get: tags: - banks description: >- Returns bank account balance snapshots (100 per page), newest first. Note: these are the periodic snapshot values from banks.balances, not the live reconciled balance including unposted movements. To get the latest snapshot for an account, combine bank_account_id with per_page=1. operationId: getV1BankBalances parameters: - name: bank_account_id in: query description: Filter by bank account code (b_ucet) schema: type: string - name: date_from in: query description: Lower date boundary (inclusive), YYYY-MM-DD schema: type: string format: date - name: date_to in: query description: Upper date boundary (inclusive), YYYY-MM-DD schema: type: string format: date - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns bank balance snapshots (100 per page), newest first content: application/json: {} /v1/departments: get: tags: - my_company description: Returns departments (100 per page) operationId: getV1Departments parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns departments (100 per page) content: application/json: {} '/v1/departments/{department_id}': get: tags: - my_company description: 'Returns single department by :id' operationId: getV1DepartmentsDepartmentId parameters: - name: department_id in: path description: Department code required: true schema: type: string responses: '200': description: 'Returns single department by :id' content: application/json: {} /v1/predefined_texts: get: tags: - system description: Returns predefined texts (100 per page) operationId: getV1PredefinedTexts parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns predefined texts (100 per page) content: application/json: {} '/v1/predefined_texts/{id}': get: tags: - system description: 'Returns single predefined text by :id' operationId: getV1PredefinedTextsId parameters: - name: id in: path description: Predefined text id required: true schema: type: string responses: '200': description: 'Returns single predefined text by :id' content: application/json: {} /v1/my_companies: get: tags: - my_company description: Returns my_companies (100 per page) operationId: getV1MyCompanies parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns my_companies (100 per page) content: application/json: {} '/v1/my_companies/{my_company_id}': get: tags: - my_company description: 'Returns single my_company by :id' operationId: getV1MyCompaniesMyCompanyId parameters: - name: my_company_id in: path description: my_company code required: true schema: type: string responses: '200': description: 'Returns single my_company by :id' content: application/json: {} /v1/product_categories: get: tags: - products description: Returns product categories (100 per page) operationId: getV1ProductCategories parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns product categories (100 per page) content: application/json: {} '/v1/product_categories/{type_id}': get: tags: - products description: 'Returns single product category by :id' operationId: getV1ProductCategoriesTypeId parameters: - name: type_id in: path description: product category code required: true schema: type: string responses: '200': description: 'Returns single product category by :id' content: application/json: {} /v1/accounting_records: get: tags: - accounting description: Returns accounting records (100 per page) operationId: getV1AccountingRecords parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: Accounting record schema: type: string - name: date_from in: query description: Date from schema: type: string - name: date_till in: query description: Date till schema: type: string - name: credit_account in: query description: Starting with schema: type: string - name: debit_account in: query description: Starting with schema: type: string - name: linked_doc_type in: query description: Linked document type schema: type: string - name: linked_doc_code in: query description: Linked document code schema: type: string - name: linked_doc_number in: query description: Linked document number schema: type: string responses: '200': description: Returns accounting records (100 per page) content: application/json: {} '/v1/accounting_records/{id}': get: tags: - accounting description: 'Returns single accounting record by :id' operationId: getV1AccountingRecordsId parameters: - name: id in: path description: Accounting record code required: true schema: type: string responses: '200': description: 'Returns single accounting record by :id' content: application/json: {} /v1/petty_cashes: get: tags: - cashes description: Returns petty cashes (100 per page) operationId: getV1PettyCashes parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns petty cashes (100 per page) content: application/json: {} '/v1/petty_cashes/{petty_cash_id}': get: tags: - cashes description: 'Returns single petty cash by :id' operationId: getV1PettyCashesPettyCashId parameters: - name: petty_cash_id in: path description: petty cash code required: true schema: type: string responses: '200': description: 'Returns single petty cash by :id' content: application/json: {} /v1/demands_for_payment: get: tags: - banks description: Returns demands for payment (100 per page) operationId: getV1DemandsForPayment parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns demands for payment (100 per page) content: application/json: {} post: tags: - banks summary: Creates new demand for payment description: 'Detailed information about current endpoint' operationId: postV1DemandsForPayment requestBody: content: application/json: schema: properties: reminder_id: type: string description: Demand for payment id accounting_address_id: type: string description: Accounting address code address_id: type: string description: Address code buyer_address_id: type: string description: Buyer address code contract_id: type: string description: Contract code delivery_address_id: type: string description: Delivery address code date: type: string description: Date external_id: type: string description: External code note: type: string description: Note send_by_email: type: string description: Send by email send_by_mail: type: string description: Send by mail status: type: string description: Status enum: - valid - confirmed 'items[_destroy]': type: array description: Delete item items: type: string 'items[debt]': type: array description: '' items: type: string 'items[external_id]': type: array description: External code items: type: string 'items[invoice_id]': type: array description: Invoice items: type: string 'items[status]': type: array description: Status items: type: string enum: - valid - confirmed responses: '201': description: Creates new demand for payment content: application/json: {} '/v1/demands_for_payment/{id}': get: tags: - banks description: 'Returns single demand for payment by :id' operationId: getV1DemandsForPaymentId parameters: - name: id in: path description: Reminder id required: true schema: type: string responses: '200': description: 'Returns single demand for payment by :id' content: application/json: {} '/v1/demands_for_payment/{reminder_id}': patch: tags: - banks summary: 'Updates existing demand for payment by :reminder_id' description: 'Detailed information about current endpoint' operationId: patchV1DemandsForPaymentReminderId parameters: - name: reminder_id in: path description: Demand for payment number required: true schema: type: string requestBody: content: application/json: schema: properties: accounting_address_id: type: string description: Accounting address code address_id: type: string description: Address code buyer_address_id: type: string description: Buyer address code contract_id: type: string description: Contract code delivery_address_id: type: string description: Delivery address code date: type: string description: Date external_id: type: string description: External code note: type: string description: Note send_by_email: type: string description: Send by email send_by_mail: type: string description: Send by mail status: type: string description: Status enum: - valid - confirmed 'items[_destroy]': type: array description: Delete item items: type: string 'items[debt]': type: array description: '' items: type: string 'items[external_id]': type: array description: External code items: type: string 'items[invoice_id]': type: array description: Invoice items: type: string 'items[status]': type: array description: Status items: type: string enum: - valid - confirmed responses: '200': description: 'Updates existing demand for payment by :reminder_id' content: application/json: {} /v1/receivables: get: tags: - accounting description: Returns receivables operationId: getV1Receivables parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: date_to in: query description: Upper date boundary schema: type: string - name: invoice_id in: query description: Internal invoice number schema: type: integer - name: contact_id in: query description: Contact code schema: type: string - name: state in: query description: 'State of receivable: paid, unpaid, all' schema: type: string - name: last_payment_time_from in: query description: Last payment time greater than schema: type: string - name: last_payment_time_to in: query description: Last payment time smaller than schema: type: string - name: invoice_issue_date_from in: query description: Issue date is greater than schema: type: string - name: invoice_issue_date_to in: query description: Issue date is smaller than schema: type: string - name: due_date_from in: query description: Due date is greater than schema: type: string - name: due_date_to in: query description: Due date is smaller than schema: type: string - name: tax_payment_date_from in: query description: Tax payment date is greater than schema: type: string - name: tax_payment_date_to in: query description: Tax payment date is smaller than schema: type: string responses: '200': description: Returns receivables content: application/json: {} '/v1/receivables/{invoice_id}': get: tags: - accounting description: Returns single receivable by invoice_id operationId: getV1ReceivablesInvoiceId parameters: - name: invoice_id in: path description: Internal invoice number required: true schema: type: integer responses: '200': description: Returns single receivable by invoice_id content: application/json: {} /v1/price_lists: get: tags: - products description: Returns price_lists (100 per page) operationId: getV1PriceLists parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns price_lists (100 per page) content: application/json: {} '/v1/price_lists/{price_list_id}': get: tags: - products description: 'Returns single price_list by :id' operationId: getV1PriceListsPriceListId parameters: - name: price_list_id in: path description: Price list code required: true schema: type: string responses: '200': description: 'Returns single price_list by :id' content: application/json: {} /v1/repairs: post: tags: - system description: | Repairs a confirmed document. Two repair methods are available: - `cancel` (default) — storno: the document is cancelled and stays confirmed - `disconfirm` — the document is unconfirmed (its accounting records and VAT entries are removed) and can be edited again via `PATCH`, then re-confirmed with `status: confirmed` Both methods need the `cancel` flag on the user's `prodej` membership and fail with `422` when the document is not confirmed, has bound documents (e.g. payments) that cannot be repaired automatically, or its tax point date falls into a locked accounting period. operationId: postV1Repairs requestBody: content: application/json: schema: required: - document_id - document_type properties: document_type: type: string description: Type of document for repair enum: - FO - MP document_id: type: string method: type: string description: Repair method enum: - cancel - disconfirm default: cancel reason: type: string description: Reason for repair - "Storno by user" is used when empty date: type: string description: Date of repair bound_entity: type: string description: department id of retail (not needed for invoice) examples: cancel: summary: cancel (storno) a sales invoice value: document_type: FO document_id: '2020000010' reason: Cancelled on customer request disconfirm: summary: disconfirm a sales invoice so it can be edited again value: document_type: FO document_id: '2020000010' method: disconfirm reason: Wrong due date required: true responses: '201': description: Repair document content: application/json: {} '401': $ref: '#/components/responses/401UnauthorizedError' '422': $ref: '#/components/responses/422ValidationError' /v1/uploaded_documents: get: tags: - documents summary: Returns uploaded documents (100 per page) description: 'Each document includes an `uploaded_client` field with the upload origin: `web`, `api`, the OIDC client id (`azp` claim) for documents uploaded with an OIDC token, or the sender''s e-mail address for documents uploaded by e-mail. Detailed information about current endpoint' operationId: getV1UploadedDocuments parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: state in: query description: Uploaded document state schema: type: string - name: created_at_from in: query description: >- Created at bigger than. RFC 3339 date-time with an offset (the "+" of the offset must be percent-encoded as %2B), or a date, which means the start of that day in Prague (Europe/Prague). Any other value is rejected with 400. schema: oneOf: - type: string format: date-time - type: string format: date example: '2025-09-01T10:00:00+02:00' - name: created_at_to in: query description: >- Created at smaller than. RFC 3339 date-time with an offset (the "+" of the offset must be percent-encoded as %2B), or a date, which means the start of that day in Prague (Europe/Prague). Any other value is rejected with 400. schema: oneOf: - type: string format: date-time - type: string format: date example: '2025-09-01T10:00:00+02:00' responses: '200': description: Returns uploaded documents (100 per page) content: application/json: {} post: tags: - documents summary: Uploads new document operationId: postV1UploadedDocuments requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: base64 description: 'PDF file' note: type: string nullable: false description: 'Special note for accountants (e.g., for allocation to a specific department). Do not use unless absolutely necessary.' required: - file encoding: file: contentType: application/pdf note: contentType: text/plain responses: '201': description: Uploads new document content: application/json: {} '/v1/uploaded_documents/{id}': get: tags: - documents summary: 'Returns single uploaded document by :id' description: 'The document includes an `uploaded_client` field with the upload origin: `web`, `api`, the OIDC client id (`azp` claim) for documents uploaded with an OIDC token, or the sender''s e-mail address for documents uploaded by e-mail.' operationId: getV1UploadedDocumentsId parameters: - name: id in: path description: Uploaded document ID required: true schema: type: string responses: '200': description: 'Returns single uploaded document by :id' content: application/json: {} patch: tags: - documents summary: 'Update uploaded document by :id' description: 'Sets the uploaded PDF document as processed. **Do not use** unless explicitly agreed upon with UOL.' operationId: patchV1UploadedDocumentsId parameters: - name: id in: path description: Uploaded document ID required: true schema: type: string requestBody: content: application/json: schema: required: - state properties: state: type: string description: Document state enum: - processed required: true responses: '200': description: 'Returns single uploaded document by :id' content: application/json: {} '/v1/uploaded_documents/{uploaded_document_id}/pairings': get: tags: - documents summary: Returns documents paired with uploaded document description: 'Detailed information about current endpoint' operationId: getV1UploadedDocumentsUploadedDocumentIdPairings parameters: - name: uploaded_document_id in: path description: Uploaded document ID required: true schema: type: string responses: '200': description: Returns documents paired with uploaded document content: application/json: {} post: tags: - documents summary: Pairs uploaded document with bookkeeping documents operationId: postV1UploadedDocumentsUploadedDocumentIdPairings parameters: - name: uploaded_document_id in: path description: Uploaded document ID required: true schema: type: string requestBody: content: application/json: schema: required: - document_pairable_id - document_pairable_type properties: document_pairable_type: type: string description: Paired document type enum: - purchase_invoice - sales_invoice - petty_cash_disburstment - petty_cash_income document_pairable_id: type: string description: Paired document ID, `gid` of document (e.g., from `GET /v1/purchase_invoices`) required: true responses: '201': description: Pairs uploaded document with bookkeeping documents content: application/json: {} /v1/document_templates: get: tags: - system operationId: getV1DocumentTemplates parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: get DocumentTemplate(s) content: application/json: schema: description: Template for document (eg. invoice) type: object properties: items: type: array items: $ref: '#/components/schemas/DocumentTemplate' _meta: type: object properties: href: type: string description: URL of current API endpoint example: 'http://test.ucetnictvi.uol.cz/api/v1/document_templates' pagination: type: object properties: first: type: string description: URL of first page example: 'http://test.ucetnictvi.uol.cz/api/v1/document_templates?page=1&per_page=1' previous: type: string description: URL of previous page example: 'http://test.ucetnictvi.uol.cz/api/v1/document_templates?page=5&per_page=1' last: type: string description: URL of last page example: 'http://test.ucetnictvi.uol.cz/api/v1/document_templates?page=67&per_page=1' next: type: string description: URL of next page example: 'http://test.ucetnictvi.uol.cz/api/v1/document_templates?page=7&per_page=1' /v1/bank_movements: get: tags: - banks description: Returns bank movements (100 per page) operationId: getV1BankMovements parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns bank movements (100 per page) content: application/json: {} post: tags: - banks description: Create new bank movement operationId: postV1BankMovements requestBody: content: application/json: schema: properties: bank_account_id: type: string description: Bank account code date: type: string description: Bank movement date iban: type: string description: Counterparty IBAN variable_symbol: type: string description: Variable symbol constant_symbol: type: string description: Constant symbol specific_symbol: type: string description: Specific symbol contact_bank_account: type: string description: Counterparty bank account amount: type: string description: Amount note: type: string description: Note external_id: type: string description: External code 'items[contact_id]': type: array description: Contact code items: type: string 'items[amount]': type: array description: Amount items: type: string 'items[note]': type: array description: Note items: type: string 'items[payment_rule_id]': type: array description: Payment rule code items: type: string 'items[department_id]': type: array description: Department code items: type: string 'items[contract_id]': type: array description: Contract code items: type: string 'items[linked_doc_number]': type: array description: Linked document number items: type: string 'items[linked_doc_code]': type: array description: Linked document code items: type: string 'items[status]': type: array description: Status items: type: string enum: - valid - confirmed 'items[external_id]': type: array description: External code items: type: string responses: '201': description: Create new bank movement content: application/json: {} '/v1/bank_movements/{gid}': get: tags: - banks description: Show single bank movement operationId: getV1BankMovementsGid parameters: - name: gid in: path description: Bank movement number required: true schema: type: string responses: '200': description: Show single bank movement content: application/json: {} patch: tags: - banks description: Update bank movement operationId: patchV1BankMovementsGid parameters: - name: gid in: path description: Bank movement number required: true schema: type: string requestBody: content: application/json: schema: properties: bank_account_id: type: string description: Bank account code date: type: string description: Bank movement date iban: type: string description: Counterparty IBAN variable_symbol: type: string description: Variable symbol constant_symbol: type: string description: Constant symbol specific_symbol: type: string description: Specific symbol contact_bank_account: type: string description: Counterparty bank account amount: type: string description: Amount note: type: string description: Note external_id: type: string description: External code 'items[contact_id]': type: array description: Contact code items: type: string 'items[amount]': type: array description: Amount items: type: string 'items[note]': type: array description: Note items: type: string 'items[payment_rule_id]': type: array description: Payment rule code items: type: string 'items[department_id]': type: array description: Department code items: type: string 'items[contract_id]': type: array description: Contract code items: type: string 'items[linked_doc_number]': type: array description: Linked document number items: type: string 'items[linked_doc_code]': type: array description: Linked document code items: type: string 'items[status]': type: array description: Status items: type: string enum: - valid - confirmed 'items[external_id]': type: array description: External code items: type: string responses: '200': description: Update bank movement content: application/json: {} /v1/bank_movement_items: get: tags: - banks description: Returns bank movement items (100 per page) operationId: getV1BankMovementItems parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns bank movement items (100 per page) content: application/json: {} /v1/payment_rules: get: tags: - system description: Returns payment rules (100 per page) operationId: getV1PaymentRules parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: q in: query description: 'Payment rule, description' schema: type: string - name: rule in: query description: Payment rule schema: type: string - name: doc_type in: query description: Document type schema: type: string responses: '200': description: Returns payment rules (100 per page) content: application/json: {} '/v1/payment_rules/{gid}': get: tags: - system description: 'Returns single payment rule by :gid' operationId: getV1PaymentRulesGid parameters: - name: gid in: path description: Payment rule identifier required: true schema: type: string responses: '200': description: 'Returns single payment rule by :gid' content: application/json: {} /v1/petty_cash_incomes: get: tags: - cashes description: Returns petty cash incomes (100 per page) operationId: getV1PettyCashIncomes parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns petty cash incomes (100 per page) content: application/json: {} post: tags: - cashes description: Creates new petty cash income operationId: postV1PettyCashIncomes requestBody: content: application/json: schema: properties: number: type: string petty_cash_id: type: string department_id: type: string contact_id: type: string contract_id: type: string issue_date: type: string vat_document: type: string note: type: string 'items[rule_id]': type: array items: type: string 'items[price]': type: array items: type: string 'items[description]': type: array items: type: string 'items[linked_doc_number]': type: array items: type: string responses: '201': description: Creates new petty cash income content: application/json: {} '/v1/petty_cash_incomes/{gid}': get: tags: - cashes description: 'Returns single petty_cash_income by :gid' operationId: getV1PettyCashIncomesGid parameters: - name: gid in: path description: Petty Cash Income identifier required: true schema: type: string responses: '200': description: 'Returns single petty_cash_income by :gid' content: application/json: {} /v1/petty_cash_disburstments: get: tags: - cashes description: Returns petty cash incomes (100 per page) operationId: getV1PettyCashDisburstments parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns petty cash incomes (100 per page) content: application/json: {} post: tags: - cashes description: Creates new petty cash disburstment operationId: postV1PettyCashDisburstments requestBody: content: application/json: schema: properties: number: type: string petty_cash_id: type: string department_id: type: string contact_id: type: string contract_id: type: string issue_date: type: string receipt_date: type: string vat_document: type: string note: type: string total: type: string 'items[rule_id]': type: array items: type: string 'items[price]': type: array items: type: string 'items[description]': type: array items: type: string 'items[linked_doc_number]': type: array items: type: string responses: '201': description: Creates new petty cash disburstment content: application/json: {} '/v1/petty_cash_disburstments/{gid}': get: tags: - cashes description: 'Returns single petty_cash_disburstment by :gid' operationId: getV1PettyCashDisburstmentsGid parameters: - name: gid in: path description: Petty Cash Income identifier required: true schema: type: string responses: '200': description: 'Returns single petty_cash_disburstment by :gid' content: application/json: {} /v1/internal_documents: get: tags: - accounting description: Returns all internal documents (100 per page) operationId: getV1InternalDocuments parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: Returns all internal documents (100 per page) content: application/json: {} post: tags: - accounting summary: Creates new internal document description: 'Detailed information about current endpoint' operationId: postV1InternalDocuments requestBody: content: application/json: schema: properties: date: type: string description: Accounting date note: type: string description: Note department_id: type: string description: Department contract_id: type: string description: Contract vat_document: type: string description: VAT document coefficient: type: string description: Coefficient status: type: string description: Status 'items[credit_account_id]': type: array items: type: string 'items[debit_account_id]': type: array items: type: string 'items[amount]': type: array items: type: string 'items[currency_id]': type: array items: type: string 'items[accounting_amount]': type: array items: type: string 'items[description]': type: array items: type: string 'items[company]': type: array items: type: string 'items[linked_doc_type]': type: array items: type: string 'items[linked_doc_number]': type: array items: type: string 'items[product]': type: array items: type: string 'items[quantity]': type: array items: type: string 'items[batch]': type: array items: type: string 'items[warranty]': type: array items: type: string 'items[serial_numbers]': type: array items: type: string 'items[warehouse_changed]': type: array items: type: string 'items[department_id]': type: array items: type: string 'items[address]': type: array items: type: string responses: '201': description: Creates new internal document content: application/json: {} '/v1/internal_documents/{id}': get: tags: - accounting description: 'Returns single internal document by :id' operationId: getV1InternalDocumentsId parameters: - name: id in: path description: Internal document id required: true schema: type: string responses: '200': description: 'Returns single internal document by :id' content: application/json: {} patch: tags: - accounting summary: 'Updates existing sales invoice by :invoice_id' description: 'Detailed information about current endpoint' operationId: patchV1InternalDocumentsId parameters: - name: id in: path description: Internal document number required: true schema: type: string requestBody: content: application/json: schema: properties: date: type: string description: Accounting date note: type: string description: Note department_id: type: string description: Department contract_id: type: string description: Contract vat_document: type: string description: VAT document coefficient: type: string description: Coefficient status: type: string description: Status 'items[credit_account_id]': type: array items: type: string 'items[debit_account_id]': type: array items: type: string 'items[amount]': type: array items: type: string 'items[currency_id]': type: array items: type: string 'items[accounting_amount]': type: array items: type: string 'items[description]': type: array items: type: string 'items[company]': type: array items: type: string 'items[linked_doc_type]': type: array items: type: string 'items[linked_doc_number]': type: array items: type: string 'items[product]': type: array items: type: string 'items[quantity]': type: array items: type: string 'items[batch]': type: array items: type: string 'items[warranty]': type: array items: type: string 'items[serial_numbers]': type: array items: type: string 'items[warehouse_changed]': type: array items: type: string 'items[department_id]': type: array items: type: string 'items[address]': type: array items: type: string responses: '200': description: 'Updates existing sales invoice by :invoice_id' content: application/json: {} /v1/document_pairings: get: tags: - documents operationId: getV1DocumentPairings parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 responses: '200': description: get DocumentPairing(s) content: application/json: {} /v1/uploaded_document_tags: get: tags: - documents operationId: getV1DocumentTags description: Returns paginated list of all tags responses: 200: description: Paginated list of tags content: application/json: {} '/v1/uploaded_documents/{uploaded_document_id}/tags': get: tags: - documents operationId: getV1DocumentTagsOfDocument description: Returns paginated list of tags for document parameters: - name: uploaded_document_id in: path description: Uploaded document ID required: true schema: type: integer responses: 200: description: Paginated list of tags content: application/json: {} post: tags: - documents operationId: postV1DocumentTagsOfDocument description: Creates tag for document parameters: - name: uploaded_document_id in: path description: Uploaded document ID required: true schema: type: integer requestBody: content: application/json: schema: properties: tag_type: type: string enum: [ "annual_tax_settlement_request", "assessment", "attendance_records", "bank_statement", "birth_certificate", "contract", "court_ruling", "customs_documents", "delivery_note", "demands_for_payment", "employee_leaving_work_details", "employee_registration_form", "employment_contract_addendum", "employment_contract", "employment_termination_letter", "execution_employee_warrant", "foreclosure_notice", "generic", "income_proof", "marriage_certificate", "maternity_announcement", "order", "overview_of_income_and_expenses", "payroll_summary_statement", "pension_insurance_record", "petty_cash_disburstment", "petty_cash_income", "power_of_attorney", "purchase_invoice", "prescription_of_advances", "receipt", "salary_agreement", "salary_certificate_request", "salary_change_request", "sales_invoice", "sales_summary_statement", "set_off_agreement", "sick_leave_letter", "spot_trade", "tax_credit_request", "transactions_summary", "travelling_expenses_claim", "vacation_request"] date: type: string title: type: string number: type: string description: The issuer's own number of the document, e.g. "6/2026" for a bank statement counterpart_ids: type: array items: type: integer account_id: type: integer responses: 201: description: Created tag content: application/json: {} '/v1/uploaded_documents/{uploaded_document_id}/tags/{id}': get: tags: - documents operationId: getV1DocumentTag description: Returns tag parameters: - name: uploaded_document_id in: path description: Uploaded document ID required: true schema: type: integer - name: id in: path description: Tag ID required: true schema: type: integer responses: 200: description: Tag content: application/json: {} delete: tags: - documents operationId: deleteV1DocumentTag description: Removes tag parameters: - name: uploaded_document_id in: path description: Uploaded document ID required: true schema: type: integer - name: id in: path description: Tag ID required: true schema: type: integer responses: 204: description: Success content: application/json: {} /v1/warehouse/statuses: get: tags: - warehouse description: Returns all warehouse statuses operationId: getV1WarehouseStatuses parameters: - name: page in: query description: Page of results to fetch. schema: type: integer format: int32 default: 1 - name: per_page in: query description: Number of results to return per page. schema: maximum: 250 minimum: 0 type: integer format: int32 default: 100 - name: product_id in: query description: Product id schema: type: string - name: expiration_from in: query description: Expiration from schema: type: string - name: expiration_to in: query description: Expiration to schema: type: string - name: quantity_more_than in: query description: Quantity more than schema: type: string - name: quantity_less_than in: query description: Quantity less than schema: type: string - name: department_id in: query description: Department id schema: type: string responses: '200': description: Returns all warehouse statuses content: application/json: {} /v1/ping: get: tags: - system description: Returns pong operationId: getV1Ping responses: '200': description: Returns pong content: application/json: example: ping: pong _meta: href: 'https://test.ucetnictvi.uol.cz/api/v1/ping' '401': $ref: '#/components/responses/401UnauthorizedError' '404': $ref: '#/components/responses/404UnknownTenantError' '503': $ref: '#/components/responses/503ServiceUnavailable' components: securitySchemes: basicAuth: type: http scheme: basic schemas: Error: type: object description: Error response properties: status: type: string description: HTTP response code code: type: string description: Internal error code message: type: string description: User error message developerMessage: type: string description: Developer error message ValidationError: description: 422 validation error response type: object properties: message: type: string example: Validation failed errors: type: array items: type: object properties: resource: type: string example: Contact field: type: string example: external_id code: type: string example: has already been taken documentation_url: type: string example: 'https://api.uol.cz' Contact: description: Contact (counterparty in business) allOf: - type: object properties: contact_id: type: string description: unique contact ID example: alzacz_as external_id: type: string description: your unique contact ID example: id123 name: type: string example: Alza.cz a.s. vatin: type: string description: VAT ID (EU VAT identification code) example: CZ27082440 vat_payer: type: boolean description: true when contact is VAT payer example: true tin: type: string description: unique country tax identification code (not VAT ID) example: CZ27082440 taxable_person: type: boolean description: true for a taxable person (entrepreneur or legal business, "osoba povinná k dani"); decides the EU B2B/B2C VAT treatment example: true business_entity: type: boolean deprecated: true description: deprecated alias of taxable_person example: true company_number: type: string description: company ID (eg. ICO for Czech/Slovak company) example: 27082440 country_id: type: string description: county of contact example: CZ acquisition_country_id: type: string example: CZ consumption_country_id: type: string example: CZ days_till_due_date: type: string description: default days till due date for sales invoices example: 14 department_id: type: string description: default department for contact example: sidlo duplicate_variable_symbol: type: boolean description: allow duplicate variable symbol for sales invoices import_received_documents: type: string description: internal setting example: P hidden: type: boolean description: hide in user interface language_id: type: string example: cs-CZ note: type: string percent_discount: type: integer description: default percet discount for sales invoices example: 10 minimum: 0 maximum: 100 received_invoice_public_id_setting: type: string description: internal setting example: unique received_invoice_variable_symbol_setting: type: string description: internal setting example: same_as_no status: type: string example: valid sipo_number: type: string description: contact SIPO number example: 1 specific_symbol: type: integer description: default specific symbol for sales invoice example: 27082440 unreliable_payer: type: boolean description: announced VAR unreliable payer ContactAddress: type: object properties: address_id: type: string example: jatecni_1530-33-praha address_types: type: array description: array of of address types (one address type is allowed only once per contact) items: type: string enum: - accounting - buyer - delivery - document_recipient example: - accounting - buyer uniqueItems: true building_number: type: string example: 7 city: type: string example: Praha 7 country_id: type: string example: CZ email: type: string example: kontakt@alza.cz external_id: type: string description: your unique address ID example: ad987 hidden: type: boolean description: hide in user interface example: false mobile_phone: type: string example: 602345678 name: type: string example: Alza.cz a.s. phone: type: string example: 234567890 postal_code: type: string description: postal code (PSC) example: 170 00 status: type: string example: valid street: type: string example: Jateční 1530/33 url: type: string description: WWW page of contact address example: www.alza.cz ContactBankAccount: type: object properties: bank_account_id: type: integer example: 77100 bank_account: type: string example: 2171532/0800 bank_code: type: string example: 0800 contact: type: object properties: contact_id: type: string example: alzacz_as country: type: object properties: country_id: type: string example: CZ currency: type: object properties: currency_id: type: string example: CZK external_id: type: string description: Your ID of contact bank account iban: type: string description: IBAN example: CZ5608000000000002171532 default: type: boolean description: true if bank account is default for contact example: true status: type: string example: valid name: type: string published: type: boolean description: published by goverment for VAT purposes example: true SalesInvoice: description: Sales invoice object type: object properties: accounting_address_id: type: string example: videnska_19-vestec buyer_address_id: type: string example: videnska_19-vestec delivery_address_id: type: string example: videnska_19-vestec document_recipient_address_id: type: string example: videnska_19-vestec bank_account_id: type: string example: cs_czk currency_id: type: string example: CZK department_id: type: string example: sidlo linked_doc_number: type: string description: >- internal ID (or evidence number) of the linked sales invoice, e.g. the original invoice of a corrective invoice; the linked invoice has to be confirmed and issued to the same buyer example: 2020000001 order_id: type: string contract_id: type: string example: contract22 buyer_id: type: string example: alzacz_as constant_symbol: type: integer consumption_country_id: type: string example: CZ delivery_note: type: boolean example: false delivery_note_note: type: string delivery_note_text: type: string due_date: type: string example: 2020-01-15T00:00:00.000Z exchange_rate: type: number external_id: type: string description: your unique invoice ID example: INV20123 issue_date: type: string example: 2020-01-15T00:00:00.000Z note: type: string description: note which is printed on invoice payment_method: type: string enum: - bank_transfer - proforma - cash - credit_card - offseting - cash_on_delivery - collection - cheque - installment - postal_order_to_cash - postal_order_to_bank - sipo example: bank_transfer percent_discount: type: integer example: 0 public_id: type: string description: Invoice number (printed on the invoice) example: 2020000003 rounding: type: string example: 0 send_by_email: type: boolean description: invoice is sent by email when confirmed example: false shipping_method: type: string enum: - seller - buyer - shipper example: seller specific_symbol: type: integer description: bank specific symbol example: 0012345678 tax_payment_date: type: string example: 2020-01-15T00:00:00.000Z text: type: string description: text printed on the invoice type: type: string enum: - standard - corrective - proforma - penalty description: type of the invoice example: standard variable_symbol: type: integer description: bank variable symbol example: 2020000003 SalesInvoiceResonse: description: Sales invoice object type: object properties: accounting_address: type: object properties: address_id: type: string example: videnska_19-vestec buyer_address: type: object properties: address_id: type: string example: videnska_19-vestec delivery_address: type: object properties: address_id: type: string example: videnska_19-vestec document_recipient_address: type: object properties: address_id: type: string example: videnska_19-vestec bank_account: type: object properties: bank_account_id: type: string example: cs_czk currency: type: object properties: currency_id: type: string example: CZK department: type: object properties: department_id: type: string example: sidlo linked_doc: type: object nullable: true description: link to the linked sales invoice (null when the invoice has no linked document) properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/sales_invoices/2020000001' logo: type: object properties: url: type: string order: type: object properties: order_id: type: string contract: type: object properties: contract_id: type: string example: contract22 shipper: type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/contacts/bychl_auto_as' buyer: type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/contacts/bychl_auto_as' cancellation_date: type: string constant_symbol: type: integer consumption_country_id: type: string example: CZ delivery_note: type: boolean example: false delivery_note_note: type: string delivery_note_text: type: string due_date: type: string example: 2020-01-15T00:00:00.000Z exchange_rate: type: number external_id: type: string description: your unique invoice ID example: INV20123 invoice_id: type: integer description: internal invoice ID example: 2020000003 gid: type: integer description: internal global ID example: 75465 issue_date: type: string example: 2020-01-15T00:00:00.000Z note: type: string description: note which is printed on invoice payment_method: type: string enum: - bank_transfer - proforma - cash - credit_card - offseting - cash_on_delivery - collection - cheque - installment - postal_order_to_cash - postal_order_to_bank - sipo example: bank_transfer percent_discount: type: integer example: 0 public_id: type: string description: Invoice number (printed on the invoice) example: 2020000003 rounding: type: string example: 0 status: type: string enum: - confirmed - valid description: 'valid for concept, confirmed is issued invoice' example: valid send_by_email: type: boolean description: invoice is sent by email when confirmed example: false send_by_mail: type: boolean example: false shipping_method: type: string enum: - seller - buyer - shipper example: seller specific_symbol: type: integer description: bank specific symbol example: 0012345678 tax_payment_date: type: string example: 2020-01-15T00:00:00.000Z text: type: string description: text printed on the invoice total_amount: type: string description: total sum amount of invoice in invoice currency type: type: string enum: - standard - corrective - proforma - penalty description: type of the invoice example: standard variable_symbol: type: integer description: bank variable symbol example: 2020000003 vat1_amount: type: string description: amount of first VAT rate example: 1470 vat2_amount: type: string description: amount of second VAT rate example: 0 vat3_amount: type: string description: amount of third VAT rate example: 0 vat_document: type: boolean description: true if invoice is VAT document example: true SalesInvoiceItem: description: Sales invoice object type: object properties: department_id: type: string description: specific department for invoice item example: sidlo product_id: type: string description: product ID example: marketing contract_id: type: string description: specific contract for invoice item example: zakazka22 description: type: string description: invoice item specific product description external_id: type: string percent_discount: type: number description: percent discount for invoice item example: 0 quantity: type: number description: quantity of product example: 1 unit_price: type: number description: unit price of product item example: 7000 unit_price_vat_inclusive: type: number description: unit price with VAT of product item example: 8470 vat_rate: type: number description: VAT rate used in item example: 21 vat_calculation_method: type: string enum: - from_below - from_above description: switch to how VAT is calculated (when 'from above' you have to send 'total_price' etc.) example: from_below SalesInvoiceItemResponse: description: Sales invoice object type: object properties: delivery: type: object properties: delivery_id: type: string department: type: object properties: department_id: type: string description: specific department for invoice item example: sidlo product: type: object properties: product_id: type: string description: product ID example: marketing contract: type: object properties: contract_id: type: string description: specific contract for invoice item example: zakazka22 batch: type: string description: type: string description: invoice item specific product description expiration_date: type: string external_id: type: string id: type: number example: 75466 percent_discount: type: number description: percent discount for invoice item example: 0 quantity: type: number description: quantity of product example: 1 status: type: string enum: - valid example: valid serial_numbers: type: string supplier_code: type: string unit_price: type: number description: unit price of product item example: 7000 unit_price_vat_inclusive: type: number description: unit price with VAT of product item example: 8470 vat_rate: type: number description: VAT rate used in item example: 21 vat_calculation_method: type: string enum: - from_below - from_above description: switch to how VAT is calculated (when 'from above' you have to send 'total_price' etc.) example: from_below PurchaseInvoice: description: Purchase invoice object type: object properties: public_id: type: string description: Invoice number (printed on the invoice) example: X00124 type: type: string enum: - standard - corrective - proforma - penalty description: type of the invoice example: standard department_id: type: string description: specific department for invoice example: sidlo contract_id: type: string description: specific contract for invoice example: zakazka22 shipping_method: type: string enum: - seller - buyer - shipper example: seller shipper_id: type: string description: Shipper code tax_payment_date: type: string example: 2020-01-15T00:00:00.000Z date_of_receipt: type: string example: 2020-01-15T00:00:00.000Z due_date: type: string example: 2020-01-15T00:00:00.000Z currency_id: type: string example: CZK exchange_rate: type: number payment_method: type: string enum: - bank_transfer - proforma - cash - credit_card - offseting - cash_on_delivery - collection - cheque - installment - postal_order_to_cash - postal_order_to_bank - sipo example: bank_transfer bank_country_id: type: string example: CZ iban_or_account: type: string constant_symbol: type: integer specific_symbol: type: integer variable_symbol: type: integer seller_id: type: string description: Contact ID of seller example: alzacz_as acquisition_country_id: type: string example: CZ note: type: string description: note which is printed on invoice rounding: type: string example: '0' external_id: type: string description: your unique invoice ID example: INV20123 percent_discount: type: number example: 0 confirmed: type: string description: set to a truthy value to confirm the invoice after create linked_doc_number: type: string description: internal purchase invoice ID of linked document total_amount: type: number description: total amount including VAT example: 1210 vat1_amount: type: number description: VAT amount for the 1st (basic) VAT rate example: 210 vat2_amount: type: number description: VAT amount for the 2nd (reduced) VAT rate vat3_amount: type: number description: VAT amount for the 3rd (secondary reduced) VAT rate PurchaseInvoiceItem: description: Purchase invoice item type: object properties: product_id: type: string description: product ID example: drmaj description: type: string description: invoice item specific product description quantity: type: number description: quantity of product example: 1 total_price: type: number description: total price of item without VAT example: 1000 total_price_vat_inclusive: type: number description: total price of item including VAT (send with vat_calculation_method=from_above) vat_rate: type: number description: VAT rate used in item example: 21 vat_calculation_method: type: string enum: - from_below - from_above description: switch to how VAT is calculated (when 'from above' you have to send 'total_price_vat_inclusive') example: from_below percent_discount: type: number description: percent discount for invoice item example: 0 batch: type: string description: product batch expiration_date: type: string description: product expiration date serial_numbers: type: string description: serial numbers of delivered products contract_id: type: string description: specific contract for invoice item example: zakazka22 department_id: type: string description: specific department for invoice item example: sidlo external_id: type: string DocumentTemplate: description: Template for document (eg. invoice) allOf: - type: object properties: id: type: integer example: 1 name: type: string example: sales_order title: type: string example: Order - english default: type: boolean example: true language: type: object properties: language_id: type: string example: en-US - $ref: '#/components/schemas/.base' .base: type: object properties: created_at: type: string example: '2017-05-03T17:56:55+02:00' updated_at: type: string example: '2019-01-31T14:50:48+01:00' creator: type: object properties: user_id: type: string example: uoladm modifier: type: object properties: user_id: type: string example: uoladm responses: ContactResponse: description: Contact object content: application/json: schema: allOf: - $ref: '#/components/schemas/Contact' - type: object properties: contract: type: object properties: contract_id: type: string example: contract1 - type: object properties: bank_accounts: type: array items: allOf: - $ref: '#/components/schemas/ContactBankAccount' - $ref: '#/components/schemas/.base' - type: object properties: _meta: type: object properties: href: type: string description: URL of curent object example: 'https://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts/77100' - type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/contacts/alzacz_as' - $ref: '#/components/schemas/.base' - type: object properties: addresses: type: array items: allOf: - $ref: '#/components/schemas/ContactAddress' - $ref: '#/components/schemas/.base' ContactsResponse: description: Array of contact objects content: application/json: schema: properties: items: type: array items: allOf: - $ref: '#/components/schemas/Contact' - type: object properties: contract: type: object properties: contract_id: type: string example: contract1 - type: object properties: bank_accounts: type: array items: allOf: - $ref: '#/components/schemas/ContactBankAccount' - $ref: '#/components/schemas/.base' - type: object properties: _meta: type: object properties: href: type: string description: URL of curent object example: 'https://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts/77100' - type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/contacts/alzacz_as' - $ref: '#/components/schemas/.base' - type: object properties: addresses: type: array items: allOf: - $ref: '#/components/schemas/ContactAddress' - $ref: '#/components/schemas/.base' _meta: type: object properties: href: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contacts' pagination: type: object properties: first: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contacts?page=1&per_page=2' previous: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contacts?page=1&per_page=2' last: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contacts?page=27&per_page=2' next: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contacts?page=3&per_page=2' ContactBankAccountResponse: description: Contact bank account object content: application/json: schema: allOf: - $ref: '#/components/schemas/ContactBankAccount' - type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts/77100' - $ref: '#/components/schemas/.base' ContactBankAccountsResponse: description: Array of contact bank account objects content: application/json: schema: type: object properties: items: type: array items: allOf: - $ref: '#/components/schemas/ContactBankAccount' - type: object properties: _meta: type: object properties: href: type: string description: URL of curent object example: 'https://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts/77100' - $ref: '#/components/schemas/.base' _meta: type: object properties: href: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts' pagination: type: object properties: first: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts?page=1&per_page=2' previous: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts?page=1&per_page=2' last: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts?page=27&per_page=2' next: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/contact_bank_accounts?page=3&per_page=2' SalesInvoiceResponse: description: Sales invoice object content: application/json: schema: allOf: - $ref: '#/components/schemas/SalesInvoiceResonse' - type: object properties: items: type: array items: allOf: - $ref: '#/components/schemas/SalesInvoiceItem' - $ref: '#/components/schemas/.base' - type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/sales_invoices/2020000010' - $ref: '#/components/schemas/.base' SalesInvoiceExtendedResponse: description: Returns single sales invoice by 'invoice_id' content: application/json: schema: allOf: - $ref: '#/components/schemas/SalesInvoiceResonse' - type: object properties: items: type: array items: allOf: - $ref: '#/components/schemas/SalesInvoiceItemResponse' - $ref: '#/components/schemas/.base' - type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/sales_invoices/2020000010' - $ref: '#/components/schemas/.base' application/pdf: schema: type: string format: binary text/isdoc: schema: type: string format: binary description: ISDOC (XML e-invoice) document. Only returned for valid and confirmed invoices. SalesInvoicesResponse: description: Array of sales invoice objects content: application/json: schema: properties: items: type: array items: allOf: - $ref: '#/components/schemas/SalesInvoice' - $ref: '#/components/schemas/.base' - type: object properties: items: type: array items: allOf: - $ref: '#/components/schemas/SalesInvoiceItemResponse' - $ref: '#/components/schemas/.base' - type: object properties: _meta: type: object properties: href: type: string example: 'https://test.ucetnictvi.uol.cz/api/v1/sales_invoices/2020000010' _meta: type: object properties: href: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/sales_invoices' pagination: type: object properties: first: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/sales_invoices?page=1&per_page=2' previous: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/sales_invoices?page=1&per_page=2' last: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/sales_invoices?page=27&per_page=2' next: type: string example: 'http://test.ucetnictvi.uol.cz/api/v1/sales_invoices?page=3&per_page=2' 422ValidationError: description: Validation errror content: application/json: schema: $ref: '#/components/schemas/ValidationError' 422PatchValidationError: description: Validation errror content: application/json: schema: allOf: - $ref: '#/components/schemas/ValidationError' - type: object properties: _meta: type: object properties: href: type: string description: URL of current entity example: 'https://test.ucetnictvi.uol.cz/api/v1/contacts/alzacz_as' example: error: - field: addresses.url resource: Contact code: is too long (maximum is 70 characters) - field: addresses resource: Contact code: contains invalid values. message: Validation failed _meta: href: 'https://test.ucetnictvi.uol.cz/api/v1/contacts/alzacz_as' documentation_url: https//api.uol.cz 403CantDelete: description: Can not delete the entity content: application/json: schema: allOf: - $ref: '#/components/schemas/ValidationError' - type: object properties: _meta: type: object properties: href: type: string description: URL of current entity example: _meta: href: 'https://test.ucetnictvi.uol.cz/api/v1/sales_invoices/2020000010' error: - field: base resource: SalesInvoice code: Invoice can't be deleted because it's not last in it's accounting period. message: Validation failed documentation_url: https//api.uol.cz 401UnauthorizedError: description: Authentication information is missing or invalid content: application/json: schema: $ref: '#/components/schemas/Error' example: status: '401' code: '0002' message: Authentication failed. Please provide valid identification and token. developerMessage: User authentication failed. Check that proper authentication header is present and that authenticating user has api access allowed. 404UnknownTenantError: description: Invalid customer ID content: application/json: schema: $ref: '#/components/schemas/Error' example: status: '404' code: '0003' message: The database you are trying to connect to isnt accessible through API. developerMessage: Check that you provide valid database code as last URL subdomain of this request. 404RecordDoesntExist: description: Record doesn't exist. content: application/json: schema: $ref: '#/components/schemas/Error' example: status: '404' code: '0004' message: Record doesn't exist. developerMessage: 'Record doesn''t exist, make sure that you''re requesting correct object' 500InternalServerError: description: 'Internal Server Error, contact API support' content: application/json: schema: $ref: '#/components/schemas/Error' example: status: '500' code: '0010' message: Internal Server Error developerMessage: Unspecified internal server error 503ServiceUnavailable: description: 'Service Unavailable, rate limitting' content: application/json: schema: $ref: '#/components/schemas/Error' example: status: '503' code: '0002' message: Service Unavailable developerMessage: Service Unavailable. Too Many Requests. security: - basicAuth: []