The REST API allows you to fulfill a received order, i.e., create a follow-up document from it. This is done using the realizaceObj element, whose type attribute determines what type of document should be created.
Target document | Value of the |
Issued invoice |
|
Received invoice |
|
Stock movement |
|
Sales receipt |
|
An order can be fulfilled in multiple stages, for example depending on the availability of goods. Information about the fulfillment status can then be obtained from the order items.
Fulfillment parameters
Properties are specified inside the realizaceObj element:
Property | Meaning |
| Optional identifier of the document being created. You can also use an external identifier, which allows you to modify the document later within the same import. |
| Type of the document being created. If not specified, the default document type from the order is used. |
| Type of the stock document, for example |
| The warehouse from which goods should be issued. |
| Variable symbol of the document being created. |
| Setting the value to |
| For invoices, specifies whether non-invoiced linked stock documents should also be included. Goods from these stock documents are then no longer listed in the |
| For issued invoices, specifies whether linked advance payments should be deducted. |
| For received invoices, the mandatory number of the incoming invoice. |
| For received invoices, the mandatory due date. |
⚠️ The issue date always uses the current date according to the current accounting period; it cannot currently be set otherwise.
ℹ️ Fulfillment into an already existing invoice is only possible for issued and received invoices, provided that the invoice is not locked, is itemized, is not canceled, paid, or already sent to EET. For all other document types, fulfillment always creates a new document, and specifying an existing document will cause an import error.
Identifying items
Fulfilled items are listed in the polozkyObchDokladu list as individual polozka elements. An item can be identified in three ways — only one of them is needed:
cenikNeboVyrobniCislo— the EAN of a price list item or a serial number. The EAN can be specified directly or with theean:prefix; we recommend using the prefix.cisRad— the line number in the order, i.e., the item's sequence number.id— any identifier of the order item, including an external one.
In addition, you can specify for the item:
mj— the quantity being fulfilled. If the item is found by EAN or serial number from the previous line, this is always 1. It does not need to be specified if a list of serial numbers is provided.vyrobniCisla— a list ofvyrobniCisloelements. This is used if the item is not found by serial number; for received invoices, serial numbers must always be provided if required.sarzeorexpirace— batch or expiration. Depending on the price list item's settings, only one of these values can be specified, and it must be selected from those currently in stock.
ℹ️ Order fulfillment was designed primarily for barcode scanners. That's why it doesn't matter whether the serial number or the EAN-based goods identification is used.
XML examples
Basic form — fulfillment by identifying the goods
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2024</id>
<realizaceObj type="faktura-vydana">
<polozkyObchDokladu>
<polozka>
<cenikNeboVyrobniCislo>123skl</cenikNeboVyrobniCislo>
<mj>1</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
Fulfillment by identifying the order line
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2024</id>
<realizaceObj type="faktura-vydana">
<polozkyObchDokladu>
<polozka>
<!-- číslo řádku v objednávce -->
<cisRad>1</cisRad>
<mj>1</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
Fulfillment with batch and expiration
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2024</id>
<realizaceObj type="faktura-vydana">
<polozkyObchDokladu>
<polozka>
<cisRad>1</cisRad>
<!-- lze uvést pouze jeden z údajů podle nastavení ceníkové položky -->
<sarze>XY12345</sarze>
<expirace>2024-12-31</expirace>
<mj>1</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
Complete structure
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2024</id>
<!-- faktura-vydana / faktura-prijata / skladovy-pohyb / prodejka -->
<realizaceObj type="faktura-vydana">
<!-- lze použít libovolný identifikátor -->
<id>ext:...</id>
<typDokl>...</typDokl>
<sklad>...</sklad>
<varSym>...</varSym>
<!-- generování požadavků na výdej při nedostatku zboží -->
<generovatPozadavky>true</generovatPozadavky>
<!-- u faktury říká, zda se mají zahrnout i nevyfakturované navázané skladové doklady -->
<zahrnoutSkladoveDoklady>true</zahrnoutSkladoveDoklady>
<!-- u vydané faktury říká, zda se mají odpočítat navázané zálohy -->
<odpocetZaloh>true</odpocetZaloh>
<!-- u přijaté faktury povinné -->
<cisDosle>...</cisDosle>
<!-- u přijaté faktury povinné -->
<datSplat>2024-01-01</datSplat>
<polozkyObchDokladu>
<polozka>
<!-- následují tři způsoby identifikace položky, stačí jeden -->
<!-- <id>extId...</id> -->
<!-- <cisRad>1</cisRad> -->
<cenikNeboVyrobniCislo>123skl</cenikNeboVyrobniCislo>
<mj>1</mj>
<vyrobniCisla>
<vyrobniCislo>123</vyrobniCislo>
<vyrobniCislo>456</vyrobniCislo>
</vyrobniCisla>
<sarze>XY12345</sarze>
<expirace>2024-12-31</expirace>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
JSON example
{
"winstrom": {
"objednavka-prijata": {
"id": "code:OBP0004/2024",
"realizaceObj@type": "faktura-vydana",
"realizaceObj": {
"typDokl": "code:FAKTURA",
"varSym": "12345",
"polozkyObchDokladu": [
{
"cisRad": 1,
"mj": "1",
"vyrobniCisla": [ 123, 456 ]
}
]
}
}
}
}
Fulfilling items with packaging
Example of packaging settings for a price list item — the default unit is a piece, with packages of 100 pcs:
Here is what an item in a received order looks like:
In the fulfillment, the quantity is specified in the default units of measure, not in packages:
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2024</id>
<realizaceObj type="skladovy-pohyb">
<polozkyObchDokladu>
<polozka>
<cisRad>1</cisRad>
<mj>300</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
Creating an advance payment
You can also create an issued advance payment from a received order. Similarly to the application, you can directly specify the advance payment amount, which does not have to match the full price of the order.
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2024</id>
<tvorbaZalohy>
<!-- lze použít libovolný identifikátor -->
<id>ext:...</id>
<typDokl>...</typDokl>
<!-- částka vytvářené zálohy -->
<castka>...</castka>
<!-- alternativně částka zadaná procenty z celkové částky objednávky -->
<procent>...</procent>
</tvorbaZalohy>
</objednavka-prijata>
</winstrom>
Fulfillment as part of invoice creation
Within a single API request, you can create an invoice and simultaneously fulfill an existing order into it. This is done using a temporary identifier in the form of tmp:FAV123, which you use to reference the invoice currently being created.
<?xml version="1.0" encoding="utf-8"?>
<winstrom version="1.0">
<faktura-vydana>
<id>tmp:FAV123</id>
<typDokl>code:FAKTURA</typDokl>
<firma>code:ČOKOLÁDA</firma>
<datVyst>2026-01-08</datVyst>
</faktura-vydana>
<objednavka-prijata>
<id>56</id>
<realizaceObj type="faktura-vydana">
<id>tmp:FAV123</id>
<typDokl>code:FAKTURA</typDokl>
<polozkyObchDokladu>
<polozka>
<cisRad>1</cisRad>
<mj>1</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>


