ProductGroup¶
A ProductGroup gathers the variants of one product, such as a T-shirt sold in five sizes and three
colors. variesBy names the properties that differ between the variants, and hasVariant links to each variant
Product. Each variant points back with isVariantOf or inProductGroupWithID.
Modeled on schema.org/ProductGroup · JSON Schema · ABAC object type ProductGroup
Example¶
Create one with POST /productgroups:
{
"name": [
{
"at_language": "en",
"at_value": "Organic Cotton T-Shirt"
}
],
"sku": "TS-ORG",
"productGroupID": "TS-ORG",
"variesBy": [
"https://schema.org/size",
"https://schema.org/color"
]
}
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 |
ProductGroup |
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 ProductGroup Name. See schema.org/name. |
description |
list of LanguageTaggedString | The ProductGroup Description. See schema.org/description. | |
url |
URL | This ProductGroup URL | |
additionalType |
ProductCollection |
The kind of product: ProductCollection for a bundle or kit, whose contents are in includesObject: its JSON-LD @type. None for a ProductGroup. | |
includesObject |
list of TypeAndQuantityNode | ProductCollection: the bundle's contents, each a good and how many of it | |
hasVariant |
computed: list of Product or ProductModel | A pointer to another, specific product (or multiple products) for which this product is a variant (e.g. in color, size, material, etc.). Computed, read-only: the objects whose Product.isVariantOf and ProductModel.isVariantOf points to this object, listed from that type; never stored or written. | |
productGroupID |
string | The Product Group ID for the product group | |
variesBy |
list of string | The property by which the product varies (e.g. https://schema.org/color, https://schema.org/size, https://schema.org/material, etc.) | |
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 []. |
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 /productgroups |
| List and search | GET /productgroups |
| Create up to 100 at once | POST /productgroups/batch |
| Retrieve | GET /productgroups/{id} |
| Retrieve as a JSON-LD document for your pages | GET /productgroups/{id} with Accept: application/ld+json; see JSON-LD for your pages |
| Replace | PUT /productgroups/{id} |
| Update some fields | PATCH /productgroups/{id} |
| Delete | DELETE /productgroups/{id} |
The OpenAPI contract, with every parameter and response: ProductGroups (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | productGroup(id: ID!, version: String): ProductGroup |
| Query | productGroups(where: ProductGroupWhereInput, orderBy: [ProductGroupOrderByInput!], first: Int, after: String): ProductGroupConnection! |
| Query | productGroupsGroupBy(by: [ProductGroupGroupByField!]!, where: ProductGroupWhereInput, having: ProductGroupHavingInput, orderBy: [ProductGroupGroupByOrderByInput!], first: Int, after: String): ProductGroupGroupByConnection! |
| Mutation | createProductGroup(input: CreateProductGroupInput!): ProductGroup! |
| Mutation | updateProductGroup(input: UpdateProductGroupInput!, expectedVersion: String): ProductGroup! |
| Mutation | deleteProductGroup(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a ProductGroup changes:
ProductGroupCreated, ProductGroupUpdated, ProductGroupPatched, ProductGroupDeleted.