Skip to main content

Downloading a Payment Order via the API

Example URL Address

Written by Petr Pech

The electronic payment order, which is otherwise saved from the application to a file for internet banking, can also be downloaded via the REST API.


Downloading the File

GET /c/{firma}/prikaz-k-uhrade/{id}/stazeni

Individual parts of the address:

Address part

Meaning

{firma}

Machine identifier of the company.

prikaz-k-uhrade

Name of the record type.

{id}

Identifier of the payment order — internal number, code, or external identifier.

stazeni

Endpoint that returns the actual file.

The response is a binary file (application/octet-stream) in the format set on the bank account — the E-banking format for orders field (elBanFormatPrikaz). The optional parameter ?dat-splat-z-hlavicky=true takes the due date from the order's header instead of from the individual items.

⚠️ Only an order in the Not sent state can be downloaded. Downloading switches the order to the Sent state, and any further attempt will result in a 400 error with the "Operation cannot be performed" page. To download the file again, first cancel the sending: PUT /c/{firma}/prikaz-k-uhrade/{id}/zrusit-odeslani.


Other Operations with the Order

Operation

Address

Creating an order

PUT /c/{firma}/prikaz-k-uhrade — header with the bank account and items; instead of an account number, an item can refer directly to the paid document via doklFak.

Sending to Fio bank

GET /c/{firma}/prikaz-k-uhrade/{id}/odeslani-fio — only for Fio bank with online connection.

Canceling the sent state

PUT /c/{firma}/prikaz-k-uhrade/{id}/zrusit-odeslani

💡 A payment order can also be created entirely via the API — in the items, it is enough to specify doklFak with a link to the invoice being paid, and Flexi will fill in the amount and account from the document itself.


Related

Did this answer your question?