<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	xmlns="http://www.posti.com/wms/postiwmsxml/OutStockBalanceInventory/2016/1" 
	targetNamespace="http://www.posti.com/wms/postiwmsxml/OutStockBalanceInventory/2016/1" 
	elementFormDefault="qualified" attributeFormDefault="unqualified">

	<xs:element name="InventorySnapShots">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="InventorySnapShot" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="InventorySnapShot">
		<xs:complexType>
			<xs:all>
				<xs:element name="MetaData" type="ctMetaDataType" minOccurs="0" maxOccurs="1"/>
				<xs:element name="ShipNode" type="ctShipNodeType" minOccurs="0" maxOccurs="1"/>
			</xs:all>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="ctMetaDataType">
		<xs:annotation>
			<xs:documentation>Contains information about message.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="ReceiverOrganizationId" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Name of the organization to whom the stock balance is sent to (principal identifier).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="Language" type="stStringMaxLength2Type" use="optional">
			<xs:annotation>
				<xs:documentation>Language code of the stock balance in two-letter ISO 639-1 format, e.g. FI.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="ExternalUserId" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Identifier of the principal in external system (OVT code, EDI ID).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="DocumentType" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Name of the document. This should be OutStockBalanceInventory.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="CreationDateTime" type="xs:dateTime" use="optional">
			<xs:annotation>
				<xs:documentation>Date and time of stock balance creation.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="MessageIdentifier" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>In outgoing message from Posti, Posti generates the unique identifier.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ctShipNodeType">
		<xs:annotation>
			<xs:documentation>Ship node.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Item" type="ctItemType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="ShipNode" type="stStringMaxLength24Type" use="optional">
			<xs:annotation>
				<xs:documentation>The unique identifier for the ship node. The identifier of Posti warehouse.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ctItemType">
		<xs:annotation>
			<xs:documentation>Item details.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="PrimaryInformation" type="ctPrimaryInformationType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SupplyDetails" type="ctSupplyDetailsType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="UnitOfMeasure" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>The unit of measure for this inventory item.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="ProductClass" type="stStringMaxLength10Type" use="optional">
			<xs:annotation>
				<xs:documentation>The product class for this inventory item.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="ItemID" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>The identifer for this inventory item.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="Description" type="stStringMaxLength500Type" use="optional">
			<xs:annotation>
				<xs:documentation>The description of the item.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ctPrimaryInformationType">
		<xs:annotation>
			<xs:documentation>Primary information.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="UnitHeight" type="stDecimal14Dig4FractType" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Height.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitHeightUOM" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Height UOM.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitLength" type="stDecimal14Dig4FractType" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Length.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitLengthUOM" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Length UOM.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitWeight" type="stDecimal14Dig4FractType" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Weight.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitWeightUOM" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Weight UOM.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitWidth" type="stDecimal14Dig4FractType" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Width.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UnitWidthUOM" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Unit Width UOM.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ctSupplyDetailsType">
		<xs:annotation>
			<xs:documentation>Supply details.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Tag" type="ctTagType" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="Segment" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>The segment for this inventory supply.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SegmentType" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>The segment type for this inventory supply.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SupplyType" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>The supply type of this inventory supply.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="Quantity" type="stDecimal14Dig4FractType" use="optional">
			<xs:annotation>
				<xs:documentation>Quantity of the supply.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ctTagType">
		<xs:annotation>
			<xs:documentation>Tag information.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Extn" type="ctExtnType" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="ManufacturingDate" type="xs:date" use="optional">
			<xs:annotation>
				<xs:documentation>Manufacturing date.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="LotNumber" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Lot number.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="LotAttribute1" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Any other attribute.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="LotAttribute2" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Any other attribute.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="LotAttribute3" type="stStringMaxLength40Type" use="optional">
			<xs:annotation>
				<xs:documentation>Any other attribute.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="StockCountDate" type="xs:dateTime" use="optional">
			<xs:annotation>
				<xs:documentation>Latest date of stock count in the warehouse.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ctExtnType">
		<xs:annotation>
			<xs:documentation>More details on tags.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="ExtnIncubationDate" type="xs:date" use="optional">
			<xs:annotation>
				<xs:documentation>Ready for use date after manufacturing date.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="ExtnBestBeforeDate" type="xs:date" use="optional">
			<xs:annotation>
				<xs:documentation>Best before date.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="stStringMaxLength2Type">
		<xs:annotation>
			<xs:documentation>String with maximum length of 2 characters.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stStringMaxLength10Type">
		<xs:annotation>
			<xs:documentation>String with maximum length of 10 characters.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="10"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stStringMaxLength24Type">
		<xs:annotation>
			<xs:documentation>String with maximum length of 24 characters.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="24"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stStringMaxLength40Type">
		<xs:annotation>
			<xs:documentation>String with maximum length of 40 characters.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="40"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stStringMaxLength500Type">
		<xs:annotation>
			<xs:documentation>String with maximum length of 500 characters.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="500"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stDecimal14Dig4FractType">
		<xs:annotation>
			<xs:documentation>Decimal with maximum of 14 total digits and 4 fraction digits.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="14"/>
			<xs:fractionDigits value="4"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
