XML format: dataPack¶
All communication with Pohoda is an exchange of dataPack → responsePack pairs.
Root element¶
<?xml version="1.0" encoding="Windows-1250"?>
<dat:dataPack
xmlns:dat="http://www.stormware.cz/schema/version_2/data.xsd"
xmlns:inv="http://www.stormware.cz/schema/version_2/invoice.xsd"
xmlns:typ="http://www.stormware.cz/schema/version_2/type.xsd"
version="2.0" id="import-0001" ico="12345678"
application="MyApp" note="Invoice import">
<dat:dataPackItem version="2.0" id="FA-0001">
<!-- exactly one agenda element -->
</dat:dataPackItem>
</dat:dataPack>
dataPack attributes (per data.xsd)¶
Attribute |
Required |
Meaning |
|---|---|---|
|
yes |
Package version. Allowed: |
|
yes |
Package identifier (max. 64 characters). Together with the item
|
|
no |
Company ID the XML is meant for; must match the accounting unit’s
IČO. Takes precedence over |
|
no |
Unique accounting key; used when |
|
no |
Accounting period. If omitted, the logged-in user’s current period is used; if given and different, the communication ends with an error. |
|
yes |
Text shown in the Application field of the XML Import agenda. |
|
yes |
Note shown in the Notes tab of the XML Import agenda. |
|
no |
Informational program version. |
Each dataPackItem has required version (1.0 or 2.0) and
id (max. 64 characters, unique within the package) and contains exactly
one agenda element (xsd:any – the envelope does not validate content).
The optional <dat:transformation> element (since dataPack 1.1) sets
an XSL transformation of the input (input) and output (output).
Encoding¶
Pohoda always produces XML in Windows-1250. Input may use another encoding if declared correctly in the XML declaration. Clients therefore convert output to UTF-8 before processing (e.g. the PHP-Pohoda-Connector).
Namespaces and prefixes¶
All namespaces take the form
http://www.stormware.cz/schema/version_2/<file>.xsd. Commonly used
prefixes:
Prefix |
XSD file |
Content |
|---|---|---|
|
data.xsd |
|
|
response.xsd |
|
|
type.xsd |
common types ( |
|
filter.xsd |
export filters |
|
list.xsd |
list requests ( |
|
invoice.xsd |
invoices |
|
voucher.xsd |
cash vouchers |
|
intDoc.xsd |
internal documents |
|
order.xsd |
orders |
|
enquiry.xsd / offer.xsd |
enquiries / offers |
|
addressbook.xsd |
address book |
|
stock.xsd |
stock items |
|
vydejka / prijemka / prevodka / vyroba / prodejka |
issue slips, receipts, transfers, production, sales slips |
|
bank.xsd |
bank |
|
print.xsd |
printing |
|
lock.xsd |
document locking |
|
intParam.xsd / parameter.xsd |
user parameters |
The full list of imported schemas is at the top of data.xsd.