Skip to main content

Posting Sales Receipts

How to Post Sales Records via REST API?

Written by Lenka Haringerová

The REST API allows you to execute the Post Sales Receipts service by calling PUT or POST on the URL "/c/{firma}/prodejka/zauctovat-prodejky".

Parameters:

  • datum - in the GUI field "Post sales receipts from date" (required) - format yyyy-mm-dd

  • kasa - in the GUI field "Sales receipts from cash register" (required) - ID from the typ-prodejky register

  • pokladna - in the GUI field "Cash desk" (required) - ID from the pokladna register

  • typPokDokl - in the GUI field "Cash document type" (required) - ID from the typ-pokladni-pohyb register

  • cisRada - optional parameter, required if no number series matching the cash desk and cash document type is found - ID from the rada-pokladni-pohyb register

  • genPoklNulCastka - optional parameter, default value is true - in the GUI field "Create cash document for zero amount"

  • dry-run - optional parameter, default value is false - allows you to check whether the conditions for successfully posting sales receipts are met. If they are, returns HTTP status 200; otherwise returns status 400 with a corresponding error message.

  • typPohledavky[forma-uhrady] - receivable type for posting non-cash payments - ID from the forma-uhrady and typ-pohledavky register, e.g.: typPohledavky[code:KARTA]=code:OST. POHLEDÁVKY

For all parameters identifying a record, in addition to the numeric ID you can also use other supported identifier types (e.g. &kasa=code:KASA).

The complete URL including parameters might look like this, for example:

/prodejka/zauctovat-prodejky.xml?datum=2023-10-06&kasa=37&pokladna=2&typPokDokl=5&typPohledavky[code:KARTA]=code:OST. POHLEDÁVKY

For all parameters identifying a record, in addition to the numeric ID you can also use other supported identifier types (e.g. &kasa=code:KASA).

Did this answer your question?