订单是对交易的确认(收据),可以包含多个订单项,每个订单项都由客户接受的优惠表示。
使用场景
基本订单
订单的最小示例
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "29.99",
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Google Chromecast"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
}
}
}
</script>
微数据
<div itemscope itemtype="http://schema.org/Order">
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Amazon.com"/>
</div>
<meta itemprop="orderNumber" content="123-4567890-1234567"/>
<meta itemprop="priceCurrency" content="USD"/>
<meta itemprop="price" content="29.99"/>
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Google Chromecast"/>
</div>
<meta itemprop="price" content="29.99"/>
<meta itemprop="priceCurrency" content="USD"/>
<div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
<meta itemprop="value" content="1"/>
</div>
</div>
</div>
“查看订单”操作
您可以通过设置 url 属性,在订单中添加 View Order 按钮。如需直接链接到移动应用,请同时添加 ViewAction:
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"orderStatus": "http://schema.org/OrderProcessing",
"priceCurrency": "USD",
"price": "29.99",
"priceSpecification": {
"@type": "PriceSpecification",
"validFrom": "2027-12-07T23:30:00-08:00"
},
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Google Chromecast",
"sku": "B00DR0PDNE",
"url": "http://www.amazon.com/Google-Chromecast-Streaming-Media-Player/dp/B00DR0PDNE/",
"image": "http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
}
},
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567",
"potentialAction": {
"@type": "ViewAction",
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"
}
}
</script>
微数据
<div itemscope itemtype="http://schema.org/Order">
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Amazon.com"/>
</div>
<link itemprop="orderStatus" href="http://schema.org/OrderProcessing"/>
<meta itemprop="orderNumber" content="123-4567890-1234567"/>
<meta itemprop="priceCurrency" content="USD"/>
<meta itemprop="price" content="29.99"/>
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Google Chromecast"/>
<link itemprop="url" href="http://www.amazon.com/Google-Chromecast-Streaming-Media-Player/dp/B00DR0PDNE/"/>
<link itemprop="image" href="http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"/>
<meta itemprop="sku" content="B00DR0PDNE"/>
</div>
<meta itemprop="price" content="29.99"/>
<meta itemprop="priceCurrency" content="USD"/>
<div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
<meta itemprop="value" content="1"/>
</div>
</div>
<link itemprop="url" href="https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"/>
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"/>
</div>
<div itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
<meta itemprop="validFrom" content="2027-12-07T23:30:00-08:00"/>
</div>
</div>
包含结算详情的订单
包含详细结算信息的示例订单
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "539.00",
"priceSpecification": {
"@type": "PriceSpecification",
"validFrom": "2027-12-07T23:30:00-08:00"
},
"acceptedOffer": [
{
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Samsung Chromebook",
"sku": "B009LL9VDG",
"url": "http://www.amazon.com/Samsung-XE303C12-A01US-Chromebook-Wi-Fi-11-6-Inch/dp/B009LL9VDG/",
"image": "http://ecx.images-amazon.com/images/I/81H-DO3qX0L._SX522_.jpg"
},
"price": "249.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "2"
},
"seller": {
"@type": "Organization",
"name": "Samsung Marketplace Store"
}
},
{
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Google Chromecast",
"sku": "B00DR0PDNE",
"url": "http://www.amazon.com/Google-Chromecast-Streaming-Media-Player/dp/B00DR0PDNE/",
"image": "http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
},
"seller": {
"@type": "Organization",
"name": "Google Store @ Amazon"
}
}
],
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567",
"potentialAction": {
"@type": "ViewAction",
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"
},
"orderStatus": "http://schema.org/OrderProcessing",
"paymentMethod": {
"@type": "PaymentMethod",
"name": "http://schema.org/CreditCard"
},
"paymentMethodId": "**** **** **** 1234",
"orderDate": "2027-11-07T23:30:00-08:00",
"isGift": "false",
"discount": "0.97",
"discountCurrency": "USD",
"customer": {
"@type": "Person",
"name": "John Smith"
},
"billingAddress": {
"@type": "PostalAddress",
"name": "Google",
"streetAddress": "1600 Amphitheatre Pkwy",
"addressLocality": "Mountain View",
"addressRegion": "CA",
"addressCountry": "USA"
}
}
</script>
微数据
<div itemscope itemtype="http://schema.org/Order">
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Amazon.com"/>
</div>
<meta itemprop="orderNumber" content="123-4567890-1234567"/>
<meta itemprop="priceCurrency" content="USD"/>
<meta itemprop="price" content="539.00"/>
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Samsung Chromebook"/>
<meta itemprop="sku" content="B009LL9VDG"/>
<link itemprop="url" href="http://www.amazon.com/Samsung-XE303C12-A01US-Chromebook-Wi-Fi-11-6-Inch/dp/B009LL9VDG/"/>
<link itemprop="image" href="http://ecx.images-amazon.com/images/I/81H-DO3qX0L._SX522_.jpg"/>
</div>
<meta itemprop="price" content="249.99"/>
<meta itemprop="priceCurrency" content="USD"/>
<div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
<meta itemprop="value" content="2"/>
</div>
<div itemprop="seller" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Samsung Marketplace Store"/>
</div>
</div>
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Google Chromecast"/>
<meta itemprop="sku" content="B00DR0PDNE"/>
<link itemprop="url" href="http://www.amazon.com/Google-Chromecast-Streaming-Media-Player/dp/B00DR0PDNE/"/>
<link itemprop="image" href="http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"/>
</div>
<meta itemprop="price" content="29.99"/>
<meta itemprop="priceCurrency" content="USD"/>
<div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
<meta itemprop="value" content="1"/>
</div>
<div itemprop="seller" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Google Store @ Amazon"/>
</div>
</div>
<link itemprop="url" href="https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"/>
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"/>
</div>
<link itemprop="orderStatus" href="http://schema.org/OrderProcessing"/>
<div itemprop="paymentMethod" itemscope itemtype="http://schema.org/PaymentMethod">
<meta itemprop="name" content="http://schema.org/CreditCard"/>
</div>
<meta itemprop="paymentMethodId" content="**** **** **** 1234"/>
<meta itemprop="orderDate" content="2027-11-07T23:30:00-08:00"/>
<meta itemprop="isGift" content="false"/>
<meta itemprop="discount" content="0.97"/>
<meta itemprop="discountCurrency" content="USD"/>
<div itemprop="customer" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Smith"/>
</div>
<div itemprop="billingAddress" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="name" content="Google"/>
<meta itemprop="streetAddress" content="1600 Amphitheatre Pkwy"/>
<meta itemprop="addressLocality" content="Mountain View"/>
<meta itemprop="addressRegion" content="CA"/>
<meta itemprop="addressCountry" content="USA"/>
</div>
<div itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
<meta itemprop="validFrom" content="2027-12-07T23:30:00-08:00"/>
</div>
</div>
测试您的标记
您可以使用电子邮件标记测试工具验证您的标记。粘贴标记代码,然后点击验证 按钮,扫描内容并接收有关任何错误的报告。
规范
下表列出了此类型的所有可用属性:
| 属性 | 类型 | 说明 |
|---|---|---|
| merchant | Organization 或 Person | (必需) 接受订单的一方(例如,Amazon.com 是许多卖家的商家)。也接受字符串(例如“Amazon.com”)。 |
| merchant.name | 文字 | (必需) 组织的名称。 |
| merchant.sameAs | 网址 | 商家的 Freebase 网址。 |
| orderNumber | 文字 | (必需) 交易的商家专属标识符。 |
| priceCurrency | 文字 | (必需) 订单价格的币种(采用由 3 个字母表示的 ISO 4217 格式)。 |
| price | 数字或文字 | (必需) 整个交易的总价格。 |
| acceptedOffer | 优惠 | (必需) 订单中包含的优惠。也接受对象数组。 |
| acceptedOffer.itemOffered | 商品或预订 | (必需) 正在销售的商品。 |
| acceptedOffer.itemOffered.name | 文字 | (必需) 商品的名称。 |
| acceptedOffer.itemOffered.sku | 文字 | (建议用于确认卡片/搜索答案) 库存量单位 (SKU),即商品或服务的商家专属标识符,或优惠所指的商品。 |
| acceptedOffer.itemOffered.url | 网址 | (建议用于确认卡片/搜索答案) 商品的网址,通常是商家网站上的商品着陆页。 |
| acceptedOffer.itemOffered.image | 网址 | (建议用于确认卡片/搜索答案) 商品图片的网址,通常是商家网站上的图片。 |
| acceptedOffer.itemOffered.color | 文字 | 商品的颜色。 |
| acceptedOffer.price | 数字或文字 | (必需) 商品的单价。 |
| acceptedOffer.priceCurrency | 文字 | (必需) 价格的币种(采用由 3 个字母表示的 ISO 4217 格式)。 |
| acceptedOffer.eligibleQuantity | QuantitativeValue | (必需) 优惠或价格规范有效的订购数量的间隔和计量单位。 |
| acceptedOffer.eligibleQuantity.value | 数字 | (必需) 商品特征的值。 |
| acceptedOffer.priceSpecification | PriceSpecification | 一个或多个详细的价格规范,指明单价以及配送或付款费用。 |
| acceptedOffer.priceSpecification.price | 数字或文字 | 整个交易的总价格。 |
| acceptedOffer.priceSpecification.priceCurrency | 文字 | 订单价格的币种(采用由 3 个字母表示的 ISO 4217 格式)。 |
| acceptedOffer.itemCondition | OfferItemCondition | 对商品或服务,或优惠中包含的商品或服务的状况的文字说明。 |
| acceptedOffer.seller | Organization 或 Person | 接受订单的一方。也接受字符串(例如“ ”)。 |
| acceptedOffer.seller.name | 文字 | 组织的名称。 |
| priceSpecification | PriceSpecification | (建议用于确认卡片/搜索答案) 价格/priceCurrency 的任何更详细的替代方案。也用于指定税费和配送费用。也接受对象数组。 |
| url | 网址 | (建议用于确认卡片/搜索答案) 订单的网址,通常是指向商家网站的链接,用户可以在该网站上检索有关订单的更多详细信息。 |
| orderStatus | OrderStatus | (建议用于确认卡片/搜索答案) 订单的当前状态。 |
| paymentMethod | PaymentMethod | 订单的信用卡或其他付款方式的名称。 |
| paymentMethodId | 文字 | 所用付款方式的标识符(例如,信用卡的后 4 位数字)。 |
| orderDate | DateTime | 下单日期。 |
| isGift | 布尔值 | 优惠是否作为礼物送给买家以外的其他人。 |
| discount | 数字或文字 | 应用的任何折扣。 |
| discountCurrency | 文字 | 折扣的币种(采用由 3 个字母表示的 ISO 4217 格式)。 |
| customer | Person 或 Organization | 下单的一方。 |
| customer.name | 文字 | 个人的姓名。 |
| billingAddress | PostalAddress | 订单的结算地址。 |
| billingAddress.name | 文字 | PostalAddress 的名称。 |
| billingAddress.streetAddress | 文字 | 街道地址。例如,中山南路 1 号。 |
| billingAddress.addressLocality | 文字 | 地点。例如,南京市。 |
| billingAddress.addressRegion | 文字 | 地区。例如,江苏省。 |
| billingAddress.addressCountry | 文字或国家/地区 | 国家/地区。例如,中国。您还可以提供由 2 个字母表示的 ISO 3166-1 alpha-2 国家/地区代码。 |