Microsoft Store 产品的数据架构
当你向应用商店提交产品(如应用或加载项)时,应用商店将维护该产品及其许可的全套数据。 在你的应用代码中,可通过使用 Windows.Services.Store 命名空间中的属性以编程方式访问部分数据。 例如,可以使用 StoreProduct.Description 和 StoreProduct.Price 属性检索当前应用或当前应用的加载项的描述和价格。
但是,应用商店中产品的许多数据都不是由 Windows.Services.Store 命名空间中的预定义属性来公开。 要在你的代码中访问产品的完整数据,可以改用以下常规属性:
- StoreProduct.ExtendedJsonData
- StoreSku.ExtendedJsonData
- StoreAvailability.ExtendedJsonData
- StoreCollectionData.ExtendedJsonData
- StoreAppLicense.ExtendedJsonData
- StoreLicense.ExtendedJsonData
- StorePurchaseProperties.ExtendedJsonData
这些属性以 JSON 格式字符串的形式返回相应对象的完整数据。 本文提供了这些属性所返回数据的完整架构。
注意
应用商店中的产品以产品、SKU 和可用性对象的层次结构来组织。 有关详细信息,请参阅产品、SKU 和可用性。
StoreProduct、StoreSku、StoreAvailability 和 StoreCollectionData 的架构
以下架构描述了 StoreProduct.ExtendedJsonData 返回的 JSON 格式的字符串。 StoreSku.ExtendedJsonData、StoreAvailability.ExtendedJsonData 和 StoreCollectionData.ExtendedJsonData 属性只返回分别在 DisplaySkuAvailabilities\Sku
、DisplaySkuAvailabilities\Availabilities
和 DisplaySkuAvailabilities\Sku\CollectionData
路径下定义的架构部分。
有关 StoreProduct.ExtendedJsonData 返回的 JSON 格式字符串的示例,请参阅本部分。
{
"type": "object",
"properties": {
"ProductId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}$"
},
"ProductKind": {
"type": "string"
},
"LocalizedProperties": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"DeveloperName": {
"type": [ "string", "null" ]
},
"PublisherName": {
"type": [ "string", "null" ]
},
"PublisherWebsiteUri": {
"type": [ "string", "null" ]
},
"SupportUri": {
"type": [ "string", "null" ]
},
"EligibilityProperties": {
"type": [ "object", "null" ],
"properties": {
"Affirmations": {
"type": "array",
"items": {
"$ref": "#/definitions/affirmationDescription"
}
},
"Remediations": {
"type": "array",
"items": {
"$ref": "#/definitions/remediationDescription"
}
}
},
"additionalProperties": false
},
"ProductTitle": {
"type": "string"
},
"ProductDescription": {
"type": [ "string", "null" ]
},
"Language": {
"type": "string"
},
"Images": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/image"
}
},
"Videos": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/video"
}
},
"SearchTitles": {
"type": [ "array", "null" ],
"items": {
"type": "object",
"properties": {
"SearchTitleType": {
"type": "string"
},
"SearchTitleString": {
"type": "string"
}
},
"required": [
"SearchTitleType",
"SearchTitleString"
]
}
}
},
"required": [
"ProductTitle",
"Language"
],
"additionalProperties": false
}
},
"MarketProperties": {
"type": [ "array", "null" ],
"minItems": 0,
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"RelatedProducts": {
"type": [ "array", "null" ],
"items": {
"type": "object",
"properties": {
"RelationshipType": {
"type": "string"
},
"RelatedProductId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}$"
}
},
"required": [
"RelationshipType",
"RelatedProductId"
]
}
}
},
"additionalProperties": false
}
},
"Properties": {
"type": [ "object", "null" ],
"properties": {
"InAppOfferToken": {
"type": "string"
},
"PackageFamilyName": {
"type": [
"string",
"null"
]
},
"Category": {
"type": "string"
},
"IsAwardable": {
"type": "boolean"
},
"IsColorizable": {
"type": "boolean"
},
"Is3DExportable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"DisplaySkuAvailabilities": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/sku"
}
}
},
"required": [
"ProductId",
"ProductKind",
"LocalizedProperties",
"DisplaySkuAvailabilities"
],
"format": "Product",
"definitions": {
"sku": {
"type": "object",
"properties": {
"Sku": {
"type": "object",
"properties": {
"SkuId": {
"type": "string",
"pattern": "^[0-9A-Z]{4}$"
},
"Properties": {
"type": "object",
"properties": {
"FulfillmentType": {
"type": [ "string", "null" ]
},
"CustomDeveloperData": {
"type": [ "string", "null" ]
},
"IsTrial": {
"type": [ "boolean", "null" ]
},
"SkuDisplayRank": {
"type": [ "integer", "null" ]
},
"BundledSkus": {
"type": [ "array", "null" ],
"items": {
"type": "object",
"properties": {
"BigId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}(?:/[0-9A-Z]{4})?$"
}
},
"additionalProperties": false
}
},
"ConsumableQuantity": {
"type": "integer",
"minimum": 1,
"format": "ConsumableQuantity"
},
"IsRepurchasable": {
"type": "boolean"
},
"Packages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"PackageUri": {
"type": "string"
}
},
"required": [ "PackageUri" ],
"additionalProperties": false
}
}
},
"additionalProperties": false,
"format": "SkuProperties"
},
"LocalizedProperties": {
"type": "array",
"minItems": 0,
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"SkuTitle": {
"type": [ "string", "null" ]
},
"SkuDescription": {
"type": [ "string", "null" ]
},
"SkuButtonTitle": {
"type": [ "string", "null" ]
},
"Language": {
"type": "string"
},
"Images": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/image"
}
},
"Videos": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/video"
}
},
"LegalText": {
"type": [ "object", "null" ],
"properties": {
"Tou": {
"type": [ "string", "null" ]
},
"TouUri": {
"type": [ "string", "null" ]
},
"Copyright": {
"type": [ "string", "null" ]
},
"CopyrightUri": {
"type": [ "string", "null" ]
},
"PrivacyPolicy": {
"type": [ "string", "null" ]
},
"PrivacyPolicyUri": {
"type": [ "string", "null" ]
},
"AdditionalLicenseTerms": {
"type": [ "string", "null" ]
}
},
"additionalProperties": false
},
"SkuDisplayRank": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Dimension": {
"type": "string"
},
"Rank": {
"type": "integer"
}
},
"additionalProperties": false
}
}
},
"required": [
"Language"
],
"additionalProperties": false
}
},
"RecurrencePolicy": {
"type": [
"object",
"null"
],
"properties": {
"InitialDuration": {
"$ref": "#/definitions/duration"
},
"Duration": {
"$ref": "#/definitions/duration"
},
"IsRecurring": {
"type": [ "boolean", "null" ]
},
"HasTrial": {
"type": [ "boolean", "null" ]
}
},
"required": [ "InitialDuration", "Duration" ],
"additionalProperties": false
},
"CollectionData": {
"$ref": "#/definitions/collectionData"
}
},
"required": [
"SkuId",
"Properties",
"LocalizedProperties"
],
"additionalProperties": false
},
"Availabilities": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/availability"
}
}
},
"format": "SKU",
"required": [
"Sku",
"Availabilities"
],
"additionalProperties": false
},
"availability": {
"type": "object",
"properties": {
"Conditions": {
"type": "object",
"properties": {
"EndDate": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$"
}
},
"required": [ "EndDate" ],
"additionalProperties": false
},
"OrderManagementData": {
"type": [ "object", "null" ],
"properties": {
"Price": {
"type": "object",
"properties": {
"ListPrice": {
"type": "number"
},
"CurrencyCode": {
"enum": [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "USS", "UYI", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XFU", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW" ]
},
"MSRP": {
"type": "number"
},
"RecurrencePrice": {
"type": [ "number", "null" ]
}
},
"required": [
"ListPrice",
"CurrencyCode",
"MSRP"
],
"additionalProperties": false
}
},
"required": [ "Price" ],
"additionalProperties": false
},
"AvailabilityId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}$"
},
"DisplayRank": {
"type": "integer"
},
"RemediationRequired": {
"type": "boolean"
},
"Remediations": {
"type": "array",
"items": {
"$ref": "#/definitions/remediation"
}
},
"AffirmationId": {
"type": "string"
},
"Actions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"format": "Availability",
"required": [
"Conditions",
"AvailabilityId",
"DisplayRank",
"Actions"
],
"additionalProperties": false
},
"duration": {
"type": "object",
"properties": {
"UnitType": {
"enum": [ "Year", "Month", "Week", "Day", "Hour", "Minute" ]
},
"Units": {
"type": "integer"
}
},
"format": "Duration",
"required": [ "Units" ],
"additionalProperties": false
},
"collectionData": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}$"
},
"skuId": {
"type": "string",
"pattern": "^[0-9A-Z]{4}$"
},
"isTrial": {
"type": [ "boolean", "null" ]
},
"campaignId": {
"type": [ "string", "null" ]
},
"devOfferId": {
"type": [ "string", "null" ]
},
"acquiredDate": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$"
},
"endDate": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$"
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$"
},
"modifiedDate": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$"
},
"autoRenew": {
"type": "boolean"
},
"additionalIds": {
"type": "array",
"items": {
"type": "object"
}
},
"fulfillmentData": {
"type": "array",
"items": {
"type": "string"
}
},
"inAppOfferToken": {
"type": "string"
},
"isCacheable": {
"type": "boolean"
},
"itemId": {
"type": "string"
},
"localTicketReference": {
"type": "string"
},
"musicTracksInfo": {
"type": "array",
"items": {
"type": "object"
}
},
"orderId": {
"type": "string",
"pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}?$"
},
"orderLineItemId": {
"type": "string",
"pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}?$"
},
"ownershipType": {
"type": "string"
},
"productFamily": {
"type": "string"
},
"productKind": {
"type": "string"
},
"productTitleId": {
"type": "string"
},
"purchasedCountry": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"skuType": {
"type": "string"
},
"status": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"transactionId": {
"type": "string",
"pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}?$"
}
},
"required": [
"acquiredDate",
"autoRenew",
"additionalIds",
"endDate",
"fulfillmentData",
"isCacheable",
"itemId",
"localTicketReference",
"modifiedDate",
"musicTracksInfo",
"orderId",
"orderLineItemId",
"ownershipType",
"productFamily",
"productId",
"productKind",
"productTitleId",
"purchasedCountry",
"skuId",
"skuType",
"startDate",
"status",
"tags",
"transactionId"
],
"additionalProperties": false
},
"video": {
"properties": {
"Uri": {
"type": "string"
},
"BackgroundColor": {
"type": [
"string",
"null"
]
},
"ForegroundColor": {
"type": [
"string",
"null"
]
},
"Caption": {
"type": [
"string",
"null"
]
},
"Width": {
"type": "integer"
},
"Height": {
"type": "integer"
},
"VideoPurpose": {
"type": [ "string", "null" ]
},
"PreviewImage": {
"$ref": "#/definitions/image"
}
},
"required": [
"Uri",
"Width",
"Height"
],
"additionalProperties": false
},
"image": {
"properties": {
"Uri": {
"type": "string"
},
"ImagePurpose": {
"type": [
"string",
"null"
]
},
"BackgroundColor": {
"type": [
"string",
"null"
]
},
"ForegroundColor": {
"type": [
"string",
"null"
]
},
"Caption": {
"type": [
"string",
"null"
]
},
"Width": {
"type": "integer"
},
"Height": {
"type": "integer"
}
},
"required": [
"Uri",
"Width",
"Height"
],
"additionalProperties": false
},
"remediationDescription": {
"type": "object",
"properties": {
"RemediationId": {
"type": "string"
},
"Description": {
"type": "string"
}
},
"required": [ "RemediationId", "Description" ],
"additionalProperties": false
},
"remediation": {
"type": "object",
"properties": {
"RemediationId": {
"type": "string"
},
"Url": {
"type": "string"
},
"BigId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}(?:/[0-9A-Z]{4})?$"
}
},
"required": [
"RemediationId"
],
"additionalProperties": false
},
"affirmationDescription": {
"type": "object",
"properties": {
"AffirmationId": {
"type": "string"
},
"AffirmationProductId": {
"type": [ "string", "null" ],
"pattern": "^[0-9A-Z]{12}$"
},
"Description": {
"type": "string"
}
},
"required": [ "AffirmationId", "Description" ],
"additionalProperties": false
}
},
"additionalProperties": false
}
示例
以下示例演示应用的 StoreProduct.ExtendedJsonData 属性所返回的 JSON 格式字符串。
{
"LocalizedProperties": [
{
"DeveloperName": "Contoso developer",
"PublisherName": "Contoso",
"PublisherWebsiteUri": "http://www.contoso.com",
"SupportUri": "mailto:support@contoso.com",
"EligibilityProperties": null,
"Images": [
{
"BackgroundColor": "transparent",
"Caption": "",
"ForegroundColor": "",
"Height": 300,
"ImagePurpose": "tile",
"Uri": "//store-images.s-contoso.com/image/apps.40735.14525693010133175.0aff34d4-9b25-4671-b5fc-0d13efd28147.c23ea293-a138-42a0-a615-d03c41409169",
"Width": 300
},
{
"BackgroundColor": "transparent",
"Caption": "",
"ForegroundColor": "",
"Height": 88,
"ImagePurpose": "tile",
"Uri": "//store-images.s-contoso.com/image/apps.25013.14525693010133175.40f2a63d-463b-49f6-8953-b2d9cc4abeba.baa4030d-5d37-4965-8039-72158df22c42",
"Width": 88
},
{
"BackgroundColor": "transparent",
"Caption": "",
"ForegroundColor": "",
"Height": 300,
"ImagePurpose": "tile",
"Uri": "//store-images.s-contoso.com/image/apps.61404.14525693010133175.b9fde0dd-bab8-49a1-acfb-35d897b02bda.c0a07eff-ce1b-47c8-a4b5-5c83337911f9",
"Width": 620
},
{
"BackgroundColor": "transparent",
"Caption": "",
"ForegroundColor": "",
"Height": 50,
"ImagePurpose": "logo",
"Uri": "//store-images.s-contoso.com/image/apps.53845.14525693010133175.f907b7fa-6bd3-4d9e-af7d-33f19e170d33.07b372ce-4514-4f71-832f-745cad63c78e",
"Width": 50
},
{
"BackgroundColor": "transparent",
"Caption": "",
"ForegroundColor": "",
"Height": 300,
"ImagePurpose": "Logo",
"Uri": "//store-images.s-contoso.com/image/apps.27529.14525693010133175.f7574c79-bdda-4684-9929-25f7e1d370b7.a16a54ee-c3b1-4311-9d36-5fee7ac23639",
"Width": 300
},
{
"BackgroundColor": "transparent",
"Caption": "",
"ForegroundColor": "",
"Height": 768,
"ImagePurpose": "Screenshot",
"Uri": "//store-images.s-contoso.com/image/apps.39690.14525693010133175.47a548ec-c651-4b73-b937-7953a8714ddd.b2724431-1470-419e-aa4b-74830aba9e1b",
"Width": 1366
}
],
"Videos": [],
"ProductDescription": "This is a sample app for developement tasks",
"ProductTitle": "Contoso Sample App",
"SearchTitles": [],
"Language": "en-us"
}
],
"MarketProperties": [
{
"RelatedProducts": []
}
],
"ProductId": "9NBLGGH4R315",
"Properties": {
"PackageFamilyName": "30321Contoso.ContosoSampleApp_sv9ybgxvtektj"
},
"ProductKind": "Application",
"DisplaySkuAvailabilities": [
{
"Sku": {
"LocalizedProperties": [
{
"LegalText": {
"Copyright": "",
"CopyrightUri": "",
"PrivacyPolicy": "",
"PrivacyPolicyUri": "",
"Tou": "",
"TouUri": ""
},
"SkuDescription": "This is a sample app for developement tasks",
"SkuTitle": "Contoso Sample App",
"SkuDisplayRank": [],
"Language": "en-us"
}
],
"Properties": {
"FulfillmentType": "WindowsUpdate",
"BundledSkus": [],
"IsRepurchasable": false,
"IsTrial": false
},
"SkuId": "0010",
"RecurrencePolicy": null,
"CollectionData": {
"acquiredDate": "2017-02-27T13:34:57.6680551-08:00",
"additionalIds": [],
"beneficiary": {
"identityType": "msa",
"identityValue": "949157616400113"
},
"endDate": "9999-12-31T15:59:59.9999999-08:00",
"fulfillmentData": [],
"isCacheable": true,
"itemId": "0ae08fb4326a413a890c957b52aeda88",
"localTicketReference": "0",
"modifiedDate": "2017-02-27T13:34:57.6616413-08:00",
"musicTracksInfo": [],
"orderId": "9c54da93-5b1d-4afe-ac45-dd0c19bb3e8f",
"orderLineItemId": "88043dae-9cca-4497-aaac-e85f6cf018aa",
"ownershipType": "OwnedByBeneficiary",
"productFamily": "Apps",
"productId": "9NBLGGH4R315",
"productKind": "Application",
"productTitleId": "-129071",
"purchasedCountry": "US",
"purchaser": {
"identityType": "msa",
"identityValue": "985157600400620"
},
"quantity": 1,
"skuId": "0010",
"skuType": "Full",
"startDate": "2017-02-27T13:19:57.6680551-08:00",
"status": "Active",
"tags": [],
"transactionId": "9c54da93-5b1d-4afe-ac45-dd0c19bb3e8f"
}
},
"Availabilities": [
{
"Actions": [
"Details",
"Fulfill",
"License",
"Purchase",
"Redeem"
],
"AvailabilityId": "9XJKQMZ5M9NX",
"Conditions": {
"EndDate": "9998-12-30T00:00:00Z"
},
"OrderManagementData": {
"Price": {
"CurrencyCode": "USD",
"ListPrice": 0,
"MSRP": 0
}
},
"DisplayRank": 0,
"RemediationRequired": false
}
]
},
{
"Sku": {
"LocalizedProperties": [
{
"LegalText": {
"Copyright": "",
"CopyrightUri": "",
"PrivacyPolicy": "",
"PrivacyPolicyUri": "",
"Tou": "",
"TouUri": ""
},
"SkuDescription": "This is a sample app for developement tasks",
"SkuTitle": "Contoso Sample App",
"SkuDisplayRank": [],
"Language": "en-us"
}
],
"Properties": {
"FulfillmentType": "WindowsUpdate",
"BundledSkus": [],
"IsRepurchasable": false,
"IsTrial": false
},
"SkuId": "0017",
"RecurrencePolicy": null
},
"Availabilities": [
{
"Actions": [
"Details"
],
"AvailabilityId": "9ZFNZ00M33HF",
"Conditions": {
"EndDate": "9998-12-30T00:00:00Z"
},
"OrderManagementData": {
"Price": {
"CurrencyCode": "USD",
"ListPrice": 0,
"MSRP": 0
}
},
"DisplayRank": 0,
"RemediationRequired": false
}
]
},
{
"Sku": {
"LocalizedProperties": [
{
"LegalText": {
"Copyright": "",
"CopyrightUri": "",
"PrivacyPolicy": "",
"PrivacyPolicyUri": "",
"Tou": "",
"TouUri": ""
},
"SkuDescription": "This is a sample app for developement tasks",
"SkuTitle": "Contoso Sample App",
"SkuDisplayRank": [],
"Language": "en-us"
}
],
"Properties": {
"FulfillmentType": "WindowsUpdate",
"BundledSkus": [],
"IsRepurchasable": false,
"IsTrial": true
},
"SkuId": "0011",
"RecurrencePolicy": null
},
"Availabilities": [
{
"Actions": [
"Details",
"License",
"Fulfill"
],
"AvailabilityId": "9QVHW1D0B4QB",
"Conditions": {
"EndDate": "9998-12-30T00:00:00Z"
},
"OrderManagementData": {
"Price": {
"CurrencyCode": "USD",
"ListPrice": 0,
"MSRP": 0
}
},
"DisplayRank": 0,
"RemediationRequired": false
}
]
}
]
}
StoreAppLicense 和 StoreLicense 的架构
以下架构描述了 StoreAppLicense.ExtendedJsonData 返回的 JSON 格式的字符串。 StoreLicense.ExtendedJsonData 属性只返回在 productAddOns
路径下定义的架构部分。
有关 StoreAppLicense.ExtendedJsonData 返回的 JSON 格式字符串的示例,请参阅本部分。
{
"type": "object",
"properties": {
"productId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}$"
},
"skuId": {
"type": "string",
"pattern": "^[0-9A-Z]{4}$"
},
"expiration": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d(\\.\\d+)?$"
},
"isActive": {
"type": "boolean"
},
"isTrial": {
"type": "boolean"
},
"isTrialOwnedByThisUser": {
"type": "boolean"
},
"trialTimeRemaining": {
"type": "string"
},
"productAddOns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"inAppOfferToken": {
"type": "string"
},
"productId": {
"type": "string",
"pattern": "^[0-9A-Z]{12}$"
},
"productType": {
"type": "string"
},
"skuId": {
"type": "string",
"pattern": "^[0-9A-Z]{4}$"
},
"skuType": {
"type": "string"
},
"expiration": {
"type": "string",
"pattern": "^\\d{4}-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d(\\.\\d+)?$"
},
"isActive": {
"type": "boolean"
}
},
"required": [
"inAppOfferToken",
"productType",
"skuType",
"expiration",
"isActive"
],
"additionalProperties": false
}
}
},
"required": [
"productAddOns",
"productId",
"skuId",
"expiration",
"isActive",
"isTrial",
"isTrialOwnedByThisUser",
"trialTimeRemaining"
],
"additionalProperties": false
}
示例
以下示例演示应用的 StoreAppLicense.ExtendedJsonData 属性所返回的 JSON 格式字符串。
{
"productAddOns": [
{
"inAppOfferToken": "Durable test add-on",
"productId": "9NBLGGH4TNMP",
"productType": "Durable",
"skuId": "0010",
"skuType": "Full",
"expiration": "9999-12-31 00:00:00",
"isActive": true
},
{
"inAppOfferToken": "Consumable test add-on",
"productId": "9NBLGGH4TNMN",
"productType": "Consumable",
"skuId": "0020",
"skuType": "Full",
"expiration": "9999-12-31 00:00:00",
"isActive": true
}
],
"productId": "9NBLGGH4R315",
"skuId": "0010",
"isActive": true,
"isTrial": false,
"isTrialOwnedByThisUser": false,
"expiration": "9999-12-31 00:00:00"
}
StorePurchaseProperties 的架构
以下架构描述了 StorePurchaseProperties.ExtendedJsonData 返回的 JSON 格式的字符串。
{
"type": "object",
"properties": {
"Name": {
"type": "string"
}
},
"required": [
"Name"
],
"additionalProperties": false
}