Swell · Schema
Swell Product
CommerceHeadless CommerceAPI-FirstB2CB2BSubscriptionsMarketplacesWholesaleStorefrontCheckoutPaymentsCartsOrdersCatalogInternationalization
Properties
| Name | Type | Description |
|---|---|---|
| id | string | MongoDB-style object ID. |
| name | string | Human-friendly product name. |
| slug | string | URL-friendly identifier, auto-generated from name. |
| sku | string | Stock keeping unit. |
| active | boolean | |
| type | string | |
| delivery | stringnull | |
| price | number | |
| sale | boolean | |
| sale_price | number | |
| currency | string | |
| description | string | |
| stock_tracking | boolean | |
| stock_level | integer | |
| stock_status | string | |
| stock_purchasable | boolean | |
| variable | boolean | |
| variants | array | |
| options | array | |
| bundle | boolean | |
| bundle_items | array | |
| purchase_options | object | |
| category_id | string | |
| categories | array | |
| shipment_weight | number | |
| shipment_dimensions | object | |
| images | array | |
| tags | array | |
| meta_title | string | |
| meta_keywords | string | |
| meta_description | string | |
| date_created | string | |
| date_updated | string |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/swell-io/main/json-schema/swell-product-schema.json",
"title": "Swell Product",
"type": "object",
"required": ["name", "sku"],
"properties": {
"id": { "type": "string", "description": "MongoDB-style object ID.", "pattern": "^[a-f0-9]{24}$" },
"name": { "type": "string", "description": "Human-friendly product name." },
"slug": { "type": "string", "description": "URL-friendly identifier, auto-generated from name." },
"sku": { "type": "string", "description": "Stock keeping unit." },
"active": { "type": "boolean" },
"type": { "type": "string", "enum": ["standard", "subscription", "bundle", "giftcard"] },
"delivery": { "type": ["string", "null"], "enum": ["shipment", "subscription", "giftcard", null] },
"price": { "type": "number" },
"sale": { "type": "boolean" },
"sale_price": { "type": "number" },
"currency": { "type": "string", "minLength": 3, "maxLength": 3 },
"description": { "type": "string" },
"stock_tracking": { "type": "boolean" },
"stock_level": { "type": "integer" },
"stock_status": { "type": "string", "enum": ["in_stock", "out_of_stock", "preorder", "backorder"] },
"stock_purchasable": { "type": "boolean" },
"variable": { "type": "boolean" },
"variants": { "type": "array", "items": { "type": "object" } },
"options": { "type": "array", "items": { "type": "object" } },
"bundle": { "type": "boolean" },
"bundle_items": { "type": "array", "items": { "type": "object" } },
"purchase_options": { "type": "object" },
"category_id": { "type": "string" },
"categories": { "type": "array", "items": { "type": "object" } },
"shipment_weight": { "type": "number" },
"shipment_dimensions": { "type": "object" },
"images": { "type": "array", "items": { "type": "object" } },
"tags": { "type": "array", "items": { "type": "string" } },
"meta_title": { "type": "string" },
"meta_keywords": { "type": "string" },
"meta_description": { "type": "string" },
"date_created": { "type": "string", "format": "date-time" },
"date_updated": { "type": "string", "format": "date-time" }
}
}