Add Torob Product API v3 for store-module sites with a store setting to enable it.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
6f1b13b6dc
commit
42cf29bc4e
@@ -44,6 +44,10 @@
|
||||
{
|
||||
"name": "Store"
|
||||
},
|
||||
{
|
||||
"name": "Torob",
|
||||
"description": "Product API v3 for Torob. Called by Torob (not storefront JS). Nginx on the shop apex proxies POST /torob_api/v3/products. Only tenants with the store module enabled; otherwise 404."
|
||||
},
|
||||
{
|
||||
"name": "Blogs"
|
||||
},
|
||||
@@ -1422,6 +1426,111 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tenants/{domain}/torob_api/v3/products": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Torob"
|
||||
],
|
||||
"summary": "Torob Product API v3 (store module only)",
|
||||
"description": "Torob POSTs here (or to `https://{domain}/torob_api/v3/products` which nginx proxies). JWT in `X-Torob-Token` (EdDSA, aud = shop host). Returns 404 when the tenant does not have the **store** module. Page size is 100.",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/components/parameters/domain"
|
||||
},
|
||||
{
|
||||
"name": "X-Torob-Token",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "X-Torob-Token-Version",
|
||||
"in": "header",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"example": "1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"page",
|
||||
"sort"
|
||||
],
|
||||
"properties": {
|
||||
"page": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"sort": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"date_added_desc",
|
||||
"date_updated_desc"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"page_urls"
|
||||
],
|
||||
"properties": {
|
||||
"page_urls": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"page_uniques"
|
||||
],
|
||||
"properties": {
|
||||
"page_uniques": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{ api_version: torob_api_v3, current_page, total, max_pages, products[] }"
|
||||
},
|
||||
"400": {
|
||||
"description": "{ error: string }"
|
||||
},
|
||||
"401": {
|
||||
"description": "Invalid or missing Torob JWT"
|
||||
},
|
||||
"404": {
|
||||
"description": "Unknown domain, store module off, or Torob switch off in store settings"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tenants/{domain}/blogs": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
||||
Reference in New Issue
Block a user