信封架构
描述
信封用于将所有其他数据与消息级协议数据包装在一起。信封由一个标题、一条或多条消息(每一条消息都包含特定的数据对象)组成。虽然一个信封可以包含多条消息,但是同一信封内的每条消息的类型都必须与由消息类型元素指定的类型相同。
词典
元素 | 描述 |
生效日期 | 库存上传数据的生效日期 |
消息编号 | 唯一标识信封内消息的编号,并且该编号必须是信封内的唯一编号;用于调整“处理报告”文档中的错误和警告 |
消息类型 | 信封中指定的文档类型,必须全都是同一类型 |
操作类型 | 可选“操作类型”元素可用于指定数据执行的操作类型(更新、删除或部分更新)。OperationType 仅适用于与商品相关的上传数据(商品、库存、商品价格等),对于不适用的上传数据,操作类型将被忽略。
若只是要使用新数据替换所有现有数据,请在 amzn-envelope.xsd 中使用 PurgeAndReplace 来替换 OperationType。如果在 amzn-envelope.xsd 中使用 PurgeAndReplace 元素,那么系统将忽略 OperationType,并且您上传的数据将完全替换所有现有数据,即使是未指定的 SKU 也将被替换。 |
清除和替换 | 导致上传数据的内容完全替换了任何现有商品数据的标记(设置为“true”时);仅适用于与商品相关的上传数据(如果该标记设置为“true”,则将忽略 OperationType 元素。) |
XSD
https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/amzn-envelope.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
elementFormDefault="qualified">
<xsd:include schemaLocation="amzn-base.xsd"/>
<xsd:include schemaLocation="amzn-header.xsd"/>
<xsd:include schemaLocation="FulfillmentCenter.xsd"/>
<xsd:include schemaLocation="Inventory.xsd"/>
<xsd:include schemaLocation="OrderAcknowledgment.xsd"/>
<xsd:include schemaLocation="OrderAdjustment.xsd"/>
<xsd:include schemaLocation="OrderFulfillment.xsd"/>
<xsd:include schemaLocation="OrderReport.xsd"/>
<xsd:include schemaLocation="Override.xsd"/>
<xsd:include schemaLocation="Price.xsd"/>
<xsd:include schemaLocation="ProcessingReport.xsd"/>
<xsd:include schemaLocation="Product.xsd"/>
<xsd:include schemaLocation="ProductImage.xsd"/>
<xsd:include schemaLocation="Relationship.xsd"/>
<xsd:include schemaLocation="SettlementReport.xsd"/>
<xsd:element name="AmazonEnvelope" />
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Header"/>
<xsd:element name="MessageType">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="FulfillmentCenter"/>
<xsd:enumeration value="Inventory"/>
<xsd:enumeration value="OrderAcknowledgment"/>
<xsd:enumeration value="OrderAdjustment"/>
<xsd:enumeration value="OrderFulfillment"/>
<xsd:enumeration value="OrderReport"/>
<xsd:enumeration value="Override"/>
<xsd:enumeration value="Price"/>
<xsd:enumeration value="ProcessingReport"/>
<xsd:enumeration value="Product"/>
<xsd:enumeration value="ProductImage"/>
<xsd:enumeration value="Relationship"/>
<xsd:enumeration value="SettlementReport"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="PurgeAndReplace" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="EffectiveDate" type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="Message" maxOccurs="unbounded" />
<xsd:complexType>
<xsd:sequence>
<xsd:element name="MessageID" type="IDNumber"/>
<xsd:element name="OperationType" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Update"/>
<xsd:enumeration value="Delete"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:choice>
<xsd:element ref="FulfillmentCenter"/>
<xsd:element ref="Inventory"/>
<xsd:element ref="OrderAcknowledgment"/>
<xsd:element ref="OrderAdjustment"/>
<xsd:element ref="OrderFulfillment"/>
<xsd:element ref="OrderReport"/>
<xsd:element ref="Override"/>
<xsd:element ref="Price"/>
<xsd:element ref="ProcessingReport"/>
<xsd:element ref="Product"/>
<xsd:element ref="ProductImage"/>
<xsd:element ref="Relationship"/>
<xsd:element ref="SettlementReport"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:sequence>
</xsd:complexType>
</xs:schema>
亚马逊官网原文详情:
Envelope Schema
Description
The envelope is used to wrap all other data with message-level protocol data. The envelope consists of a header and one or more messages, each of which contains the specified data object. While an envelope may contain more than one message, each message in the same envelope must be of the same type, as specified by the message type element.
Dictionary
Element
Description
EffectiveDate
The date an inventory feed is effective
MessageID
A number that uniquely identifies the message within the envelope, and which must be a unique number within that envelope; used for reconciliation of errors and warnings in the Processing Report document
MessageType
The type of document specified in the envelope, which must all be of the same type
OperationType
The optional OperationType element can be used to specify the type of operation (Update, Delete or PartialUpdate) to be performed on the data. The OperationType is only applicable to product-related feeds (Product, Inventory, Price, etc) and will be ignored for non-applicable feeds.
If you use Update, all specified information overwrites any existing information. Any unspecified information is erased.
If you use Delete, all information is removed.
For Product feeds only: If you use PartialUpdate for a Product feed, all specified information overwrites any existing information, but unspecified information is unaffected. Caution: This operation type is only valid for Product feeds. If this operation type is used for any other feed type, such as Inventory and Price feeds, unpredictable data loss can occur.
To simply replace all existing data with new data, use PurgeAndReplace as part of the amzn-envelope.xsd instead of OperationType. If you use the PurgeAndReplace element as part of the amzn-envelope.xsd, then OperationType is ignored and the data you upload completely replaces all existing data, even for unspecified SKUs.
PurgeAndReplace
The flag (when set to "true") that causes the contents of the feed to completely replace any existing product data; applicable to product-related feeds only (If this flag is set to "true" the OperationType elements will be ignored.)
Before using a PurgeAndReplace feed for the very first time, contact Seller Support and request deactivation of the "safety net" feature. This feature is in place to prevent accidental deletion of listings via PurgeAndReplace.
Caution: An empty PurgeAndReplace feed, by definition, will cancel all of your listings. Since it does not contain any product information, all of your listings will no longer be available on Amazon.com and they will also be gone from your seller account.
We do not recommend using PurgeAndReplace regularly, or simply to modify product information. The purged and re-created products lose their original sales history, and search results and placement on the website can be impacted. When deleting variation product data, instead of using PurgeAndReplace, use a product delete (OperationType "Delete").XSD
https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/amzn-envelope.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:include schemaLocation="amzn-base.xsd"/>
<xsd:include schemaLocation="amzn-header.xsd"/>
<xsd:include schemaLocation="FulfillmentCenter.xsd"/>
<xsd:include schemaLocation="Inventory.xsd"/>
<xsd:include schemaLocation="OrderAcknowledgment.xsd"/>
<xsd:include schemaLocation="OrderAdjustment.xsd"/>
<xsd:include schemaLocation="OrderFulfillment.xsd"/>
<xsd:include schemaLocation="OrderReport.xsd"/>
<xsd:include schemaLocation="Override.xsd"/>
<xsd:include schemaLocation="Price.xsd"/>
<xsd:include schemaLocation="ProcessingReport.xsd"/>
<xsd:include schemaLocation="Product.xsd"/>
<xsd:include schemaLocation="ProductImage.xsd"/>
<xsd:include schemaLocation="Relationship.xsd"/>
<xsd:include schemaLocation="SettlementReport.xsd"/>
<xsd:element name="AmazonEnvelope" />
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Header"/>
<xsd:element name="MessageType">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="FulfillmentCenter"/>
<xsd:enumeration value="Inventory"/>
<xsd:enumeration value="OrderAcknowledgment"/>
<xsd:enumeration value="OrderAdjustment"/>
<xsd:enumeration value="OrderFulfillment"/>
<xsd:enumeration value="OrderReport"/>
<xsd:enumeration value="Override"/>
<xsd:enumeration value="Price"/>
<xsd:enumeration value="ProcessingReport"/>
<xsd:enumeration value="Product"/>
<xsd:enumeration value="ProductImage"/>
<xsd:enumeration value="Relationship"/>
<xsd:enumeration value="SettlementReport"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="PurgeAndReplace" type="xsd:boolean" minOccurs="0"/>
<xsd:element name="EffectiveDate" type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="Message" maxOccurs="unbounded" />
<xsd:complexType>
<xsd:sequence>
<xsd:element name="MessageID" type="IDNumber"/>
<xsd:element name="OperationType" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Update"/>
<xsd:enumeration value="Delete"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:choice>
<xsd:element ref="FulfillmentCenter"/>
<xsd:element ref="Inventory"/>
<xsd:element ref="OrderAcknowledgment"/>
<xsd:element ref="OrderAdjustment"/>
<xsd:element ref="OrderFulfillment"/>
<xsd:element ref="OrderReport"/>
<xsd:element ref="Override"/>
<xsd:element ref="Price"/>
<xsd:element ref="ProcessingReport"/>
<xsd:element ref="Product"/>
<xsd:element ref="ProductImage"/>
<xsd:element ref="Relationship"/>
<xsd:element ref="SettlementReport"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:sequence>
</xsd:complexType>
</xs:schema>
文章来源:亚马逊官方网站