Schemas / Commerce
rig.commerce.offer
v0.31.0 · draft 4 fields 1 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
item |
entity | required | What is offered |
seller |
entity | optional | Optional. Person or organisation that offers it |
availability |
enumin-stock · out-of-stock · pre-order · limited · unknown | optional | Optional. in-stock / out-of-stock / pre-order / limited / unknown |
sku |
string | optional | Optional. Seller's stock-keeping unit |
Someone offers an item. Format when present.
Field meanings follow schema.org Offer. This schema is that commercial relationship - not a checkout, inventory system, or payment.
item is required. Name the seller on that entity with rig.meta.named. Product identifiers stay on the item (rig.book.identifier, and so on) - do not copy an ISBN onto the offer.
Compose rig.commerce.price on this entity. A discount is rig.commerce.discount on the same entity. The window the offer is good for is rig.calendar.span.
A second offer (another seller, another price, another window) is another entity.
JSON Schema
Resolves at https://rig.works/schemas/rig.commerce.offer.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.commerce.offer.schema.json",
"title": "rig.commerce.offer",
"type": "object",
"additionalProperties": false,
"properties": {
"item": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"seller": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"availability": {
"type": "string",
"enum": [
"in-stock",
"out-of-stock",
"pre-order",
"limited",
"unknown"
]
},
"sku": {
"$ref": "./_defs.schema.json#/$defs/string"
}
},
"required": [
"item"
],
"description": "Someone offers an item. Field meanings follow schema.org Offer. Price composes rig.commerce.price; window composes rig.calendar.span."
}