Product¶
A Product is anything you sell or describe: a pair of shoes, a phone, a book. It carries the identifiers search engines and marketplaces use (SKU, GTIN, MPN, ASIN), its names and descriptions in several languages, and links to its Brand, Offers and Reviews.
Use a ProductGroup for a set of variants, such as one shirt in several sizes, and a
ProductModel for a model of a product line. A bundle or kit is a Product whose
additionalType is ProductCollection, its contents in includesObject
(TypeAndQuantityNodes: a good and how many of it), sold with its own Offers.
Modeled on schema.org/Product · JSON Schema · ABAC object type Product
Example¶
Create one with POST /products:
{
"name": [
{
"at_language": "en",
"at_value": "Trail Running Shoe"
},
{
"at_language": "de",
"at_value": "Trailrunning-Schuh"
}
],
"description": [
{
"at_language": "en",
"at_value": "Lightweight shoe with a grippy sole for muddy trails."
}
],
"sku": "TRS-42-BLUE",
"gtin13": "4006381333931",
"color": "Blue",
"brand": {
"at_id": "https://apis.objectsgrid.com/brands/0f0b9a52-6d7e-4f4b-9d5e-3c1c2a7e8b11"
},
"category": [
"Shoes",
"Running"
],
"tags": [
{
"name": "department",
"val": "outdoor"
}
]
}
Fields¶
Required: name, sku.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | The object's id. Assigned by ObjectsGrid when the object is created. | |
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
Product |
JSON-LD @type, the object's type name. |
|
at_id |
URL | The object's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>, its JSON-LD @id: what References to it hold. Assigned by ObjectsGrid. |
|
identifier |
string | The object's id, as Schema.org identifier. Assigned by ObjectsGrid. |
|
image |
URL | image URL | |
name |
list of LanguageTaggedString | Yes | The Product Name. See schema.org/name. |
description |
list of LanguageTaggedString | The Product Description. See schema.org/description. | |
url |
URL | This Product URL | |
additionalType |
one of ProductCollection, Vehicle, Car, Motorcycle, BusOrCoach |
The kind of product: ProductCollection for a bundle or kit (its contents in includesObject), or Vehicle, Car, Motorcycle, BusOrCoach for a vehicle (with the vehicle fields): its JSON-LD @type. None for a Product. | |
includesObject |
list of TypeAndQuantityNode | ProductCollection: the bundle's contents, each a good and how many of it | |
aggregateRating |
AggregateRating | The aggregate rating of the Product | |
asin |
string | The Amazon Standard Identification Number (ASIN) of the product | |
audience |
Audience | The audience for the product | |
award |
string | Awards won by or for this item | |
brand |
Reference to Brand or Organization | The brand of the product | |
category |
list of string | The category of the product | |
color |
string | The color of the product | |
colorSwatch |
string | Color swatch images for the product | |
countryOfAssembly |
CountryCodeEnumeration | The country where the product is assembled | |
countryOfLastProcessing |
CountryCodeEnumeration | The country where the product was last processed | |
countryOfOrigin |
CountryCodeEnumeration | The country where the product was manufactured | |
depth |
QuantitativeValue | The depth of the product | |
funding |
Reference (external URL) | A pointer to a funding source for the item | |
gtin |
string | The Global Trade Item Number (GTIN) of the product | |
gtin12 |
string | The GTIN-12 of the product | |
gtin13 |
string | The GTIN-13 of the product | |
gtin14 |
string | The GTIN-14 of the product | |
gtin8 |
string | The GTIN-8 of the product | |
hasAdultConsideration |
list of AdultOrientedEnumeration | Indicates whether this item is targeted at a mature audience | |
hasCertification |
list of string | The certifications and/or standards for the product | |
hasEnergyConsumptionDetails |
EnergyConsumptionDetails | The energy consumption details for the product | |
hasGS1DigitalLink |
URL | A link to the GS1 Digital Link representation of the product identifier | |
hasMeasurement |
QuantitativeValue | A pointer to a product measurement | |
hasMerchantReturnPolicy |
Reference to MerchantReturnPolicy | The return policy for it, when it differs from its Product's or seller's | |
height |
QuantitativeValue | The height of the product | |
inProductGroupWithID |
string | The Product Group ID for the product | |
isAccessoryOrSparePartFor |
list of References to Product or ProductGroup or ProductModel | A pointer to another product (or multiple products) for which this product is an accessory or spare part | |
isConsumableFor |
list of References to Product or ProductGroup or ProductModel | A pointer to another product (or multiple products) for which this product is a consumable | |
isFamilyFriendly |
boolean | Indicates whether this item is family friendly | |
isRelatedTo |
list of References to Product or ProductGroup or ProductModel or Service | A pointer to another, somehow related product (or multiple products) | |
isSimilarTo |
list of References to Product or ProductGroup or ProductModel or Service | A pointer to another, functionally similar product (or multiple products) | |
isVariantOf |
Reference to ProductGroup or ProductModel | A pointer to a base product (or multiple products) for which this product is a variant (e.g. in color, size, material, etc.) | |
itemCondition |
OfferItemCondition | The condition of the product | |
keywords |
list of LanguageTaggedString | Keywords used to describe the product | |
logo |
URL | An associated logo for the product | |
manufacturer |
Reference to Organization | The manufacturer of the product | |
material |
list of string | The material of the product | |
mobileUrl |
URL | This Product Mobile URL | |
model |
string | The model of the product | |
mpn |
string | The Manufacturer Part Number (MPN) of the product | |
negativeNotes |
list of LanguageTaggedString | Provides negative considerations regarding the product | |
nsn |
string | The NATO Stock Number (NSN) of the product | |
offers |
computed: list of Offer | Links to Offers to provide this item. For example, offers to sell a product, rent the DVD of a movie, or give away tickets to an event. Computed, read-only: the objects whose Offer.itemOffered points to this object, listed from that type; never stored or written. | |
pattern |
list of LanguageTaggedString | A pattern that can be used to describe the product | |
positiveNotes |
list of LanguageTaggedString | Provides positive considerations regarding the product | |
productID |
string | The product identifier, such as ISBN. For example: 'isbn:123-456-789'. | |
productionDate |
date-time | The production date of the product | |
purchaseDate |
date-time | The purchase date of the product | |
releaseDate |
date-time | The release date of the product | |
review |
computed: list of Review | Review of the item. Computed, read-only: the objects whose Review.itemReviewed points to this object, listed from that type; never stored or written. | |
size |
SizeSpecification | The size of the product, e.g. a clothing size in a size system | |
sku |
string | Yes | The Stock Keeping Unit (SKU) of the product |
slogan |
list of LanguageTaggedString | The slogan of the product | |
weight |
QuantitativeValue | The weight of the product | |
width |
QuantitativeValue | The width of the product | |
tags |
list of Tag | Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or []. |
|
vehicleIdentificationNumber |
string | Vehicle: the VIN, 17 letters and digits (no I, O or Q) | |
vehicleModelDate |
string | Vehicle: the model year, YYYY | |
dateVehicleFirstRegistered |
date | Vehicle: the date of first registration | |
mileageFromOdometer |
QuantitativeValue | Vehicle: the mileage, unitCode KMT or SMI | |
numberOfPreviousOwners |
number | Vehicle: how many owners it had before | |
knownVehicleDamages |
string | Vehicle: known damage | |
bodyType |
string | Vehicle: the body type, e.g. 'SUV', 'Hatchback' | |
vehicleConfiguration |
string | Vehicle: the trim or configuration, e.g. 'Sport' | |
fuelType |
string | Vehicle: the fuel, e.g. 'Petrol', 'Diesel', 'Electric', 'Hybrid' | |
vehicleTransmission |
string | Vehicle: the transmission, e.g. 'Manual', 'Automatic' | |
driveWheelConfiguration |
string | Vehicle: the drive, e.g. 'FrontWheelDriveConfiguration', 'AllWheelDriveConfiguration' | |
vehicleEngine |
list of EngineSpecification | Vehicle: its engines | |
fuelConsumption |
QuantitativeValue | Vehicle: fuel per distance, e.g. value 5.6 unitText 'L/100 km' | |
fuelEfficiency |
QuantitativeValue | Vehicle: distance per fuel, e.g. value 40 unitText 'mpg' | |
emissionsCO2 |
number | Vehicle: CO2 emissions in g/km | |
numberOfDoors |
number | Vehicle: the number of doors | |
vehicleSeatingCapacity |
number | Vehicle: the number of seats | |
cargoVolume |
QuantitativeValue | Vehicle: the cargo volume, unitCode LTR | |
vehicleInteriorColor |
string | Vehicle: the interior colour | |
vehicleInteriorType |
string | Vehicle: the interior, e.g. 'Leather' |
REST API¶
Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.
| Operation | Request |
|---|---|
| Create | POST /products |
| List and search | GET /products |
| Create up to 100 at once | POST /products/batch |
| Retrieve | GET /products/{id} |
| Retrieve as a JSON-LD document for your pages | GET /products/{id} with Accept: application/ld+json; see JSON-LD for your pages |
| Replace | PUT /products/{id} |
| Update some fields | PATCH /products/{id} |
| Delete | DELETE /products/{id} |
The OpenAPI contract, with every parameter and response: Products (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | product(id: ID!, version: String): Product |
| Query | products(where: ProductWhereInput, orderBy: [ProductOrderByInput!], first: Int, after: String): ProductConnection! |
| Query | productsGroupBy(by: [ProductGroupByField!]!, where: ProductWhereInput, having: ProductHavingInput, orderBy: [ProductGroupByOrderByInput!], first: Int, after: String): ProductGroupByConnection! |
| Mutation | createProduct(input: CreateProductInput!): Product! |
| Mutation | updateProduct(input: UpdateProductInput!, expectedVersion: String): Product! |
| Mutation | deleteProduct(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a Product changes:
ProductCreated, ProductUpdated, ProductPatched, ProductDeleted.