<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="apiResponse">
		<xs:annotation>
			<xs:documentation>Root element of API response message</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:all>
				<xs:element name="token">
					<xs:annotation>
						<xs:documentation>Token string that is 32 characters long and unique for each transaction.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="32"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="success" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>Status of the request. "true" on success / "false" on failure</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="feedType" type="xs:string" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The feed type used in the API request</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="actionType" type="xs:string" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The action type used in the API request
							For instance:
							* sales order interface (NO) would have action NEW, UPDATE, CANCEL
							</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="errors" minOccurs="0">
					<xs:annotation>
						<xs:documentation>List of Errors if request fails.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="error" type="xs:string" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>Error message.</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="missingSkus" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Missing SKUs. It will be populated only when there are SKUs in the request that are not present in GSI systems.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="sku" type="xs:string" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>SKU identifier</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element minOccurs="0" name="objectId" type="xs:string">
					<xs:annotation>
						<xs:documentation>Depending on the interface type, this may populate with the main obejst reference.
							For instance:
							* sales order interface (NO) would map the order ID
							* purchase order interface (PO) would map the po reference number</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:all>
		</xs:complexType>
	</xs:element>
</xs:schema>