A standard transfer between warehouses (transfer order) in ABRA Flexi always has two sides — issue and receipt. Its typical creation is described in the article Transfer order - REST API. This guide addresses the situation where the issue note was created by fulfilling an order, meaning it cannot be completed as a standard transfer order.
Scenario
The system contains a received order for goods from a customer. The goods need to be issued from one warehouse and only later, in a second step, transferred to another warehouse — that is, completing a transfer order.
This procedure is not possible by default. Fulfilling an order via a stock movement sets the issue note's movement type to Issue after order, and completing the transfer order via the API then fails with error correctDoklTypeNotFound.
Solution
1. Fulfilling the order via stock movement
First, we generate an issue note from the order. Details can be found in the article on order fulfillment; here we only provide an example:
POST https://demo.flexibee.eu/c/demo/objednavka-prijata.xml
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP001/2023</id>
<realizaceObj type="skladovy-pohyb">
<polozkyObchDokladu>
<polozka>
<cisRad>1</cisRad>
<mj>1</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
The created issue note has the movement type typPohybuSklad.vydejPoObch:
<?xml version="1.0"?>
<winstrom>
<skladovy-pohyb>
<id>123</id>
<kod>S-001/2023</kod>
...
<typPohybuSkladK showAs="Výdej po objednávce">
typPohybuSklad.vydejPoObch
</typPohybuSkladK>
...
</skladovy-pohyb>
</winstrom>
⚠️ The response to the fulfillment contains the order ID, not the newly created issue note's ID. You can find its identifier through the document's linked records:
GET /c/{firma}/objednavka-prijata/{id}/vazebni-doklady.json
2. Enabling the movement type change
The movement type Issue after order blocks completion of the transfer order, so we need to change it. This can be enabled via advanced parameterization — parameter zmenaPohybuRealizace (Allow changing the movement type detail on an issue/receipt note created from an order/invoice):
POST https://demo.flexibee.eu/c/demo/parametr.xml
<winstrom version="1.0">
<parametr>
<paramK>zmenaPohybuRealizace</paramK>
<hodnota>true</hodnota>
</parametr>
</winstrom>
Without this parameter, editing the issue note returns 400 with code valueCannotBeChanged and the message The value of property 'typPohybuSkladK' ("Movement type + detail") cannot be changed from 'typPohybuSklad.vydejPoObch' to 'typPohybuSklad.vydejPrevod'.
3. Editing the issue note
Now the correct movement type and target warehouse can be set on the issue note. For a transfer order, this is typPohybuSklad.vydejPrevod:
POST https://demo.flexibee.eu/c/demo/skladovy-pohyb.xml
<?xml version="1.0"?>
<winstrom version="1.0">
<skladovy-pohyb>
<id>123</id>
<typPohybuSkladK>typPohybuSklad.vydejPrevod</typPohybuSkladK>
<skladCil>code:SKLAD CÍL</skladCil>
</skladovy-pohyb>
</winstrom>
For completeness, here are all the issue movement types; the full list, including the receipt values, can be found in the description of the skladovy-pohyb record.
Value | Movement type |
| "Plain" issue |
| Issue of semi-finished product |
| Issue after invoice |
| Issue after order |
| Issue for transfer order |
| Issue for invoicing (prices from price list) |
| Issue for invoicing (prices entered manually) |
| Issue of finished product |
| Issue (credit note, return) |
4. Completing the transfer order
Everything is now ready to complete the transfer order from the order-generated issue note in the standard way — using the action dokoncit-prevodku:
POST https://demo.flexibee.eu/c/demo/skladovy-pohyb.xml
<?xml version="1.0"?>
<winstrom version="1.0">
<skladovy-pohyb action="dokoncit-prevodku">
<!-- jako ID lze použít i interní číslo výdeje pro převod -->
<id>123</id>
</skladovy-pohyb>
</winstrom>
The 201 response contains the ID of the issue note on which you ran the action. The receipt note created in the target warehouse can again be found among the linked documents.
Failed requests
Situation | Response |
Action |
|
Changing the movement type without the |
|
Action |
|
FAQ
Will the documents be linked?
Yes. The received order, the issue note, and the receipt note in the target warehouse all remain linked — all three documents are returned by a query on the order's vazebni-doklady.
Does the parameter need to stay enabled permanently?
No. The parameter only allows the movement type change, so it only needs to be enabled at the moment you edit the issue note.
