How to define a ticket of ten in Schema.org "PriceSpecification"? - schema.org

I try to get our pricing into the PriceSpecification scheme from Schema.org.
For our time based tickets this is pretty straight forward, like for our 3-month ticket:
"priceSpecification": {
"#type": "UnitPriceSpecification",
"priceCurrency": "USD",
"price": "10",
"referenceQuantity": {
"#type": "QuantitativeValue",
"value": "3",
"unitCode": "MON"
}
},
But we also have a "ticket of 10", which I try to describe, if possible with a unitCode and not a unitText.
Is there any UNECE/CEFACT code for this to describe or do I have to use unitText as fallback?

Related

How do i add Likes Received to Structured Data in JSON-LD for Product Type

I've been trying to figure out a way to add how many likes were received to a product using structured data. Is what I have below correct? Or would the second example be more correct?
Is my usage of ["Product","InteractionCounter"] for the type correct in the first example?
I'm trying to have the google show a likes counter much like the aggregateRating property of Product.
I'm also not sure what the url in offers is supposed to point to or if it's necessary. Any ideas?
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://example.com/index.php?page=gallery"
},
"userInteractionCount": 55
}
</script>
OR
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Product",
"name": "CC-1",
"description": "Wedding Cake",
"additionalProperty": {
"#type": "PropertyValue",
"name": "Likes",
"description": "Likes Received",
"value": 55
}
}
</script>
This is what I have right now:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake with bla bla bla",
"category": "Wedding Cakes",
"brand": {
"#type": "Brand",
"logo": "https://example.com/images/logo.png",
"slogan": "Cakes Are Nice"
},
"offers": {
"#type": "Offer",
"url": "https://example.com/anvil",
"priceCurrency": "CAD",
"price": "119.99"
},
"image": "https://example.com/collection/wedding_cakes/mid_def/CC-1",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://mimozas.com/index.php?page=gallery"
},
"userInteractionCount": "55 PLACEHOLDER"
}
If the product is the subject of content, then it makes sense to indicate likes as part of the type Product. My suggestion for you:
{"#context":"https://schema.org",
"#type":"Product",
"name":"CC-1",
"description":"Wedding Cake",
"subjectOf":{
"#type": "InteractionCounter",
"interactionType":{
"#type":"LikeAction",
"name":"Likes",
"description":"Likes Received"
},
"interactionService":{
"#type":"WebSite",
"url":"https://example.com/index.php?page=gallery"
},
"userInteractionCount":"55"
}
}
And be careful about inverted commas.
My addition after expanding the question.
I'm trying to have the google show a likes counter much like the
aggregateRating property of Product.
Google has no direct support for the type InteractionCounter - read more Explore the search gallery. However, in the rich test results of my suggestion, there are no errors or warning messages from Google:
Probably needs experimentation.

How to markup (using JSON-LD) a Service to show price within a LocalBusiness in Schema.org?

When I test this code in validator, I am getting WARNING for the property price and the property priceCurrency. How do I fix this?
Thank you.
The property price is not recognized by the schema (e.g. schema.org) for an object of type Service.
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "LocalBusiness",
"name" : "Charlotte Property Management",
"hasOfferCatalog": {
"#type": "OfferCatalog",
"name": "Charlotte Property Management Plans",
"itemListElement": [
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Silver Plan",
"description": " Our Silver Plan is developed for early-stage investors seeking to learn the intricacies of investment property management but with an added protection layer of professional oversight by our experienced team. This plan is perfect for DIY investment enthusiasts.",
"price": "49",
"priceCurrency": "USD"
}
},
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Gold Plan",
"description": "The Gold Plan is designed for investors who value their time, treating their investment property as a business. If you are looking to delegate all aspects of property management and maintenance to our experienced team, while you focus on what matters in your life, this program is for you. Our Investment property acquisition, sale, and consulting services are included in this program.",
"price": "99",
"priceCurrency": "USD"
}
},
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Platinum Plan",
"description": "The Platinum Plan is designed for the avid investor who is actively looking to build wealth by growing their Real Estate investment portfolio. The program includes full professional management services backed by our Uninterrupted Rent and Eviction Guarantees. Our Investment property acquisition, sale, and consulting services are included in this program.",
"price": "249",
"priceCurrency": "USD"
}
},
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Guaranteed Income Plan",
"description": "On the other hand, our Guaranteed Income Plan is a non-property management plan designed to free up your schedule, avoid rental income fluctuations, and make your rental property a continuously profitable investment.",
"price": "Custom",
"priceCurrency": "USD"
}
}
]
}
}
</script>
In the markup, properties price and priceCurrency are located/belong to the Service object/type, which does not contain such properties. Those properties belong to the Offer, so they should be moved accordingly.
So just move them one level up, outside of the Service, so that they belong to the Offer object/type:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "LocalBusiness",
"name" : "Charlotte Property Management",
"hasOfferCatalog": {
"#type": "OfferCatalog",
"name": "Charlotte Property Management Plans",
"itemListElement": [
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Silver Plan",
"description": " Our Silver Plan is developed for early-stage investors seeking to learn the intricacies of investment property management but with an added protection layer of professional oversight by our experienced team. This plan is perfect for DIY investment enthusiasts."
},
"price": "49",
"priceCurrency": "USD"
},
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Gold Plan",
"description": "The Gold Plan is designed for investors who value their time, treating their investment property as a business. If you are looking to delegate all aspects of property management and maintenance to our experienced team, while you focus on what matters in your life, this program is for you. Our Investment property acquisition, sale, and consulting services are included in this program."
},
"price": "99",
"priceCurrency": "USD"
},
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Platinum Plan",
"description": "The Platinum Plan is designed for the avid investor who is actively looking to build wealth by growing their Real Estate investment portfolio. The program includes full professional management services backed by our Uninterrupted Rent and Eviction Guarantees. Our Investment property acquisition, sale, and consulting services are included in this program."
},
"price": "249",
"priceCurrency": "USD"
},
{
"#type": "Offer",
"itemOffered": {
"#type": "Service",
"name": "Guaranteed Income Plan",
"description": "On the other hand, our Guaranteed Income Plan is a non-property management plan designed to free up your schedule, avoid rental income fluctuations, and make your rental property a continuously profitable investment."
},
"price": "Custom",
"priceCurrency": "USD"
}
]
}
}
</script>

How to specify more than one areaServed (eg multiple municipalities) for a LocalBusiness?

A lot of businesses serve multiple municipalities.
How should this be expressed in https://schema.org/areaServed (JSON LD)?
Eg as per https://schema.org/Service:
<script type="application/ld+json">
{
"#context": "https://schema.org/",
"#type": "Service",
"serviceType": "Weekly home cleaning",
"provider": {
"#type": "LocalBusiness",
"name": "ACME Home Cleaning"
},
"areaServed": {
"#type": "City",
"name": "New York"
},
... ?
</script>
Should it be:
"areaServed": {
"#type": "City",
"name": "New York"
},
"areaServed": {
"#type": "City",
"name": "Buffalo"
},
"areaServed": {
"#type": "City",
"name": "Syracuse"
},
Or something like:
"areaServed": {
"#type": "City",
"name": "New York",
"name": "Buffalo",
"name": "Syracuse"
},
Or something else?
According to the Schema documentation, the property areaServed can have values expected to be one of these types:
AdministrativeArea
GeoShape
Place
Text
There is no type City here as you indicate in your example. So I used type Place for my suggestion for you (alternative is the type AdministrativeArea):
{
"#context": "https://schema.org/",
"#type": "Service",
"serviceType": "Weekly home cleaning",
"provider": {
"#type": "LocalBusiness",
"name": "ACME Home Cleaning"
},
"areaServed": {
"#type": "Place",
"name":[ "New York","Buffalo"]
}
}
To use an alternative just change the name to type.
City is a "More specific Type" of "AdministrativeArea" according to schema.org documentation, so nothing wrong with using that.
(unfortunately haven't got enough points to write this as a comment under nikant25s comment but thought it was important to mention)
I would write something like this:
"areaServed": [{
"#type": "City",
"name": “New York”,
"sameAs": "https://en.wikipedia.org/wiki/New_York_City"
},
{
"#type": "City",
"name": “Buffalo”,
"sameAs": (the Wiki-page for the right Buffalo)
}],
Since there are a lot of cities with the same name it’s probably good to use the sameAs property to specify which one you mean :)

PayPal APIs - Set multiple curriences in a single order

I'm trying to set more than one currency code within a single order.
I sent this json to the PayPal API Create order with two currency codes, EUR and USD, distributed at random.
{
"intent": "CAPTURE",
"brand_name": "Miller-Miller",
"cancel_url": "https://adkins-knight.biz/login/",
"landing_page": "LOGIN",
"return_url": "https://kennedy.net/",
"shipping_preference": "NO_SHIPPING",
"user_action": "PAY_NOW",
"payer_email_address": "lindaholland#gmail.com",
"payer_address_line_1": "98169 Tina Ramp Apt. 548",
"payer_address_line_2": "Unions",
"payer_admin_area_1": "United States Virgin Islands",
"payer_admin_area_2": "South Veronicaborough",
"payer_country_code": "BE",
"payer_postal_code": "16858",
"payer_full_name": "Jeremy Martin Jr.",
"payer_given_name": "Sarah",
"payer_middle_name": "Richard",
"payer_prefix": "Dr.",
"payer_suffix": "DDS",
"payer_surname": "Donovan",
"user": null,
"purchase_units": [
{
"custom_id": "3cef9acd-acfd-4b57-9426-fe25b993b51f",
"description": "Process would successful not stage girl.\nEat economy air stuff wind box city. Suffer scene deal much. Rise or friend provide.",
"invoice_id": "0f2ac8bf-c763-48a2-8207-6c15a422cf44",
"reference_id": "0ea30992-6cc2-4e3f-9f9f-bb2a1ff9458d",
"soft_descriptor": "break",
"amount_currency_code": "EUR",
"amount_value": 9998008.45,
"breakdown_discount_currency_code": "EUR",
"breakdown_discount_value": 9999889.5,
"breakdown_handling_currency_code": "USD",
"breakdown_handling_value": 9999884.8,
"breakdown_insurance_currency_code": "EUR",
"breakdown_insurance_value": 9997223.61,
"breakdown_item_total_currency_code": "USD",
"breakdown_item_total_value": 9994971.56,
"breakdown_shipping_currency_code": "USD",
"breakdown_shipping_value": 9991250.62,
"breakdown_shipping_discount_currency_code": "USD",
"breakdown_shipping_discount_value": 9997344.57,
"breakdown_tax_total_currency_code": "USD",
"breakdown_tax_total_value": 9999229.59,
"shipping_type": "SHIPPING",
"shipping_address_line_1": "2359 Greene Path Suite 645",
"shipping_address_line_2": "Springs",
"shipping_admin_area_1": "Hong Kong",
"shipping_admin_area_2": "South Debra",
"shipping_country_code": "CU",
"shipping_postal_code": "95591",
"shipping_full_name": "Ashley Stone",
"items": [
{
"category": "PHYSICAL_GOODS",
"description": "Despite should allow. Military determine up she goal.",
"name": "Mary Harper",
"quantity": 4405,
"sku": "total",
"tax_currency_code": "USD",
"tax_value": 9997113.36,
"unit_amount_currency_code": "USD",
"unit_amount_value": 9998795.33
},
{
"category": "PHYSICAL_GOODS",
"description": "Hospital cover job rest new. Only citizen I generation raise present. Majority president stuff west.",
"name": "Lucas Parker",
"quantity": 1759,
"sku": "little",
"tax_currency_code": "USD",
"tax_value": 9996456.8,
"unit_amount_currency_code": "USD",
"unit_amount_value": 9999554.88
}
]
}
]
}
I got this response:
{
"name": "UNPROCESSABLE_ENTITY",
"details": [
{
"issue": "MULTI_CURRENCY_ORDER",
"description": "Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code."
}
],
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "527aca32094a2",
"links": [
{
"href": "https://developer.paypal.com/docs/api/orders/v2/#error-MULTI_CURRENCY_ORDER",
"rel": "information_link",
"method": "GET"
}
]
}
I have searched through the PayPal documentation and on Google, but it is not clear if it is possible to set up two or more currencies in a single order.
The inserted curriences (EUR & USD) are both approved in my PayPal settings following these steps from PayPal FAQ:
EDIT:
If I need to set multiple products with two curriences in a single transaction, I cannot do it? Have I do separate the order in two order, apply a single currency code for each of them?
Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code.

Schema.org 'specialty' property failing with Q&A type: "The property specialty is not recognised by Google for an object of type Question."

I'm trying to add the specialty property, following the Schema.org docs using JSON-LD. According to the QAPage docs, specialty is indeed a valid value for this schema type.
The problem is when I validate with Google's Structured Data Testing Tool, it spits out this error:
(The property specialty is not recognised by Google for an object of type Question.)
Now, Schema.org is partly ran by Google, so I don't feel it's an error on their end. Pretty sure it may be JSON-LD syntax but I've been trying different things all morning. Could anybody shed any light on the issue?
{
"#context": "https://schema.org",
"#type": "QAPage",
"mainEntity": {
"#type": "Question",
"name": "How many ounces are there in a pound?",
"text": "I have taken up a new interest in baking and keep running across directions in ounces and pounds. I have to translate between them and was wondering how many ounces are in a pound?",
"specialty": "SEO", //ISSUE LINE
"answerCount": 3,
"upvoteCount": 26,
"dateCreated": "2016-07-23T21:11Z",
"author": {
"#type": "Person",
"name": "New Baking User"
},
"acceptedAnswer": {
"#type": "Answer",
"text": "1 pound (lb) is equal to 16 ounces (oz).",
"dateCreated": "2016-11-02T21:11Z",
"upvoteCount": 1337,
"url": "https://example.com/question1#acceptedAnswer",
"author": {
"#type": "Person",
"name": "SomeUser"
}
},
"suggestedAnswer": [
{
"#type": "Answer",
"text": "Are you looking for ounces or fluid ounces? If you are looking for fluid ounces there are 15.34 fluid ounces in a pound of water.",
"dateCreated": "2016-11-02T21:11Z",
"upvoteCount": 42,
"url": "https://example.com/question1#suggestedAnswer1",
"author": {
"#type": "Person",
"name": "AnotherUser"
}
}, {
"#type": "Answer",
"text": " I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that.",
"dateCreated": "2016-11-06T21:11Z",
"upvoteCount": 0,
"url": "https://example.com/question1#suggestedAnswer2",
"author": {
"#type": "Person",
"name": "ConfusedUser"
}
}
]
}
}
The specialty property needs to be added to WebPage (or one of its sub-types, like QAPage).
You added it to Question (where it’s not listed).