The data model¶
ObjectsGrid objects are modeled on Schema.org, the shared vocabulary that Google, Microsoft and others use to describe products, offers, organizations and places on the web. Where Schema.org has no fitting type, ObjectsGrid defines one in the same style.
Each type is published as a JSON Schema (Draft 2020-12) in the object catalog, and documented in the object reference.
Why Schema.org¶
- Search engines understand it. Your product pages can publish the same data as structured data, for rich results with prices, ratings and availability.
- Others understand it. Marketplaces, partners, AI agents and tools already know
Product,OfferandPostalAddress; less mapping, fewer misunderstandings. - You don't have to invent it. The common things, products, prices, opening hours, return policies, are already modeled with years of real-world use behind them.
- It lasts. The vocabulary is maintained by a broad community and only grows.
JSON-LD fields¶
Schema.org data is usually written as JSON-LD, whose keywords start with @. ObjectsGrid spells them with at_, which every language and GraphQL can use as a field name:
| ObjectsGrid | JSON-LD | Meaning |
|---|---|---|
at_context |
@context |
The vocabulary, https://schema.org: only on Schema.org types, not on ObjectsGrid's own (GenericObject, JSONObject, AppConfiguration, FeatureFlag, Enum, LogEvent, Inventory) |
at_type |
@type |
The type, such as Product |
at_value |
@value |
A text value |
at_language |
@language |
The language of a text value |
To publish an object as JSON-LD, for example in your product page, rename these fields and leave out the ObjectsGrid-only fields tags and meta.
References¶
Schema.org links objects rather than nesting them. A product doesn't contain its brand: its brand field is a
Reference to the brand, a JSON-LD node reference.
{
"sku": "TRS-42",
"brand": {
"at_id": "https://apis.objectsgrid.com/brands/0f0b9a52-6d7e-4f4b-9d5e-3c1c2a7e8b11",
"id": "0f0b9a52-6d7e-4f4b-9d5e-3c1c2a7e8b11",
"at_type": "Brand"
}
}
- You send
{"at_id": "<url>"}; ObjectsGrid setsidandat_typefrom the URL. An object's URL ishttps://apis.objectsgrid.com/<path>/<id>, also in its ownat_idandurlfields. - Each field names the types it may point to (a product's
branda Brand or an Organization); an object of another type is refused. A URL outside ObjectsGrid is accepted as it is, with the Schema.orgat_typeyou send. - One brand can be referenced by many products, and is changed in one place.
- To read the referenced object, read its
at_id, with the same headers as any request. In GraphQL, select the object's fields in the same query: see References. - A list that grows as other objects are created is never stored on the object: a product's
reviewis computed from the Reviews whoseitemReviewedpoints to the product. Write the Reviews; read the list in GraphQL, or list the Reviews byitemReviewed.
Small values that only make sense inside their parent are embedded instead: a PostalAddress, GeoCoordinates, a QuantitativeValue such as a weight, an AggregateRating. They have no id and no API of their own.
Localized text¶
Text meant for people, such as name, description or slogan, is a list with one LanguageTaggedString per language:
"name": [
{"at_language": "en", "at_value": "Trail Running Shoe"},
{"at_language": "de", "at_value": "Trailrunning-Schuh"}
]
Language tags follow BCP 47: en, de, de-AT, fr-CA. The REST API's lang parameter returns only the values in one language.
Enumerations¶
Fields with a fixed set of values, such as availability or order status, take the Schema.org URL of the value:
Country codes (ISO 3166-1 alpha-2, such as DE) and currency codes (ISO 4217, such as EUR) are plain codes. All lists are on the Enumerations page. For value lists of your own, use an Enum.
Typed values¶
Where Schema.org lets a value be text, a number or a date, ObjectsGrid gives each kind its own field, so the type is always clear. A PropertyValue or LocationFeatureSpecification uses valueText, valueNumber, valueBoolean, valueDateTime or valueReference, rather than one value field.
Singular names¶
Schema.org names a property in the singular even when it holds a list: a product's isRelatedTo is a list of references, and an organization's founder a list of founders. The name reads as a relation, product → review → Review, and stays the same whatever the number of values. Check the object reference for whether a field is a list.
hasX is a relation, not a boolean¶
In Schema.org, hasX means has a relation with X: hasMerchantReturnPolicy points to a return policy, and hasCertification a list of certifications. They are not true/false flags.
What ObjectsGrid adds¶
Every stored object also has fields that aren't part of Schema.org:
id: the object's id, assigned by ObjectsGrid.tags: name and value pairs that your ABAC policy decides on. See Tag.meta: read-only metadata: the version, the type, and who created and last changed the object, and when.
Objects that aren't in Schema.org yet¶
Some objects that clients need aren't defined by Schema.org. ObjectsGrid creates them in the same style, together with clients; Inventory is one. To request a new object type or a change, use the Improvement Requests form.