4cbbabc29b
The tool argument name Kong actually forwards comes from the operation's declared parameters — a header cannot be sent as an arbitrary argument name, it has to be in the spec like any other parameter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
715 lines
20 KiB
YAML
715 lines
20 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Classic Models API — Catalog domain
|
|
version: 4.7.0
|
|
description: 'Products and product lines in the Classic Models catalogue. Catalog domain subset of the shared classic-models-api backend, as exposed by the catalog domain''s Kong gateway. Paths and server below are the gateway''s, not the backend''s: the gateway rewrites /catalog/v1/... onto /classic-models/api/v1/... upstream. Requires a bearer token from the classic-models realm.'
|
|
paths:
|
|
/catalog/v1/productlines/:
|
|
get:
|
|
operationId: list_product_lines
|
|
description: Retrieve a paginated list of all product line categories in the system.
|
|
summary: List all product lines
|
|
parameters:
|
|
- name: page
|
|
required: false
|
|
in: query
|
|
description: A page number within the paginated result set.
|
|
schema:
|
|
type: integer
|
|
- name: page_size
|
|
required: false
|
|
in: query
|
|
description: Number of results to return per page.
|
|
schema:
|
|
type: integer
|
|
tags:
|
|
- Product Lines
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedProductLineList'
|
|
description: ""
|
|
post:
|
|
operationId: create_product_line
|
|
description: Add a new product line category to the system.
|
|
summary: Create a new product line
|
|
tags:
|
|
- Product Lines
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLineRequest'
|
|
application/x-www-form-urlencoded:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLineRequest'
|
|
multipart/form-data:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLineRequest'
|
|
required: true
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"201":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLine'
|
|
description: ""
|
|
/catalog/v1/productlines/{productline}/:
|
|
get:
|
|
operationId: get_product_line
|
|
description: Retrieve detailed information about a specific product line by its identifier.
|
|
summary: Get a specific product line
|
|
parameters:
|
|
- in: path
|
|
name: productline
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product line.
|
|
required: true
|
|
tags:
|
|
- Product Lines
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLine'
|
|
description: ""
|
|
delete:
|
|
operationId: delete_product_line
|
|
description: Remove a product line from the system.
|
|
summary: Delete a product line
|
|
parameters:
|
|
- in: path
|
|
name: productline
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product line.
|
|
required: true
|
|
tags:
|
|
- Product Lines
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"204":
|
|
description: No response body
|
|
patch:
|
|
operationId: patch_product_line
|
|
description: Update specific fields of an existing product line.
|
|
summary: Partially update a product line
|
|
parameters:
|
|
- in: path
|
|
name: productline
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product line.
|
|
required: true
|
|
tags:
|
|
- Product Lines
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PatchedProductLineRequest'
|
|
application/x-www-form-urlencoded:
|
|
schema:
|
|
$ref: '#/components/schemas/PatchedProductLineRequest'
|
|
multipart/form-data:
|
|
schema:
|
|
$ref: '#/components/schemas/PatchedProductLineRequest'
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLine'
|
|
description: ""
|
|
put:
|
|
operationId: update_product_line
|
|
description: Update all fields of an existing product line.
|
|
summary: Update a product line
|
|
parameters:
|
|
- in: path
|
|
name: productline
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product line.
|
|
required: true
|
|
tags:
|
|
- Product Lines
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLineRequest'
|
|
application/x-www-form-urlencoded:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLineRequest'
|
|
multipart/form-data:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLineRequest'
|
|
required: true
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductLine'
|
|
description: ""
|
|
/catalog/v1/productlines/{productline}/products/:
|
|
get:
|
|
operationId: get_product_line_products
|
|
description: Retrieve all products in a specific product line category. This endpoint allows browsing products by category.
|
|
summary: Get products by product line
|
|
parameters:
|
|
- name: page
|
|
required: false
|
|
in: query
|
|
description: A page number within the paginated result set.
|
|
schema:
|
|
type: integer
|
|
- name: page_size
|
|
required: false
|
|
in: query
|
|
description: Number of results to return per page.
|
|
schema:
|
|
type: integer
|
|
- in: path
|
|
name: productline
|
|
schema:
|
|
type: string
|
|
description: The product line identifier
|
|
required: true
|
|
tags:
|
|
- Product Lines
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedProductList'
|
|
description: ""
|
|
/catalog/v1/products/:
|
|
get:
|
|
operationId: list_products
|
|
description: Retrieve a paginated list of all products in the catalog with their details.
|
|
summary: List all products
|
|
parameters:
|
|
- name: page
|
|
required: false
|
|
in: query
|
|
description: A page number within the paginated result set.
|
|
schema:
|
|
type: integer
|
|
- name: page_size
|
|
required: false
|
|
in: query
|
|
description: Number of results to return per page.
|
|
schema:
|
|
type: integer
|
|
tags:
|
|
- Products
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedProductList'
|
|
description: ""
|
|
post:
|
|
operationId: create_product
|
|
description: Add a new product to the catalog with all required information.
|
|
summary: Create a new product
|
|
tags:
|
|
- Products
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductRequest'
|
|
application/x-www-form-urlencoded:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductRequest'
|
|
multipart/form-data:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductRequest'
|
|
required: true
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"201":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Product'
|
|
description: ""
|
|
/catalog/v1/products/{productcode}/:
|
|
patch:
|
|
operationId: patch_product
|
|
description: Update specific fields of an existing product. Send X-Stock-Change-Reason as delivery:<id> when a quantityinstock change is a fulfilled reorder rather than a correction.
|
|
summary: Partially update a product
|
|
parameters:
|
|
- in: path
|
|
name: productcode
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product.
|
|
required: true
|
|
- in: header
|
|
name: X-Stock-Change-Reason
|
|
schema:
|
|
type: string
|
|
pattern: '^delivery:[\w-]{1,64}$'
|
|
description: 'Only honoured in this one shape: delivery:<reorder-id>. Anything else is recorded as a manual adjustment.'
|
|
required: false
|
|
tags:
|
|
- Products
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PatchedProductRequest'
|
|
application/x-www-form-urlencoded:
|
|
schema:
|
|
$ref: '#/components/schemas/PatchedProductRequest'
|
|
multipart/form-data:
|
|
schema:
|
|
$ref: '#/components/schemas/PatchedProductRequest'
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Product'
|
|
description: ""
|
|
put:
|
|
operationId: update_product
|
|
description: Update all fields of an existing product in the catalog.
|
|
summary: Update a product
|
|
parameters:
|
|
- in: path
|
|
name: productcode
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product.
|
|
required: true
|
|
tags:
|
|
- Products
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductRequest'
|
|
application/x-www-form-urlencoded:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductRequest'
|
|
multipart/form-data:
|
|
schema:
|
|
$ref: '#/components/schemas/ProductRequest'
|
|
required: true
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Product'
|
|
description: ""
|
|
delete:
|
|
operationId: delete_product
|
|
description: Remove a product from the catalog.
|
|
summary: Delete a product
|
|
parameters:
|
|
- in: path
|
|
name: productcode
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product.
|
|
required: true
|
|
tags:
|
|
- Products
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"204":
|
|
description: No response body
|
|
get:
|
|
operationId: get_product
|
|
description: Retrieve detailed information about a specific product by its code.
|
|
summary: Get a specific product
|
|
parameters:
|
|
- in: path
|
|
name: productcode
|
|
schema:
|
|
type: string
|
|
description: A unique value identifying this product.
|
|
required: true
|
|
tags:
|
|
- Products
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Product'
|
|
description: ""
|
|
/catalog/v1/products/{productcode}/order-details/:
|
|
get:
|
|
operationId: get_product_order_details
|
|
description: Retrieve all order details (sales) for a specific product. This endpoint provides the complete sales history for the product.
|
|
summary: Get product order history
|
|
parameters:
|
|
- name: page
|
|
required: false
|
|
in: query
|
|
description: A page number within the paginated result set.
|
|
schema:
|
|
type: integer
|
|
- name: page_size
|
|
required: false
|
|
in: query
|
|
description: Number of results to return per page.
|
|
schema:
|
|
type: integer
|
|
- in: path
|
|
name: productcode
|
|
schema:
|
|
type: string
|
|
description: The product code
|
|
required: true
|
|
tags:
|
|
- Products
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- JWTAuth: []
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedOrderdetailList'
|
|
description: ""
|
|
components:
|
|
schemas:
|
|
Orderdetail:
|
|
type: object
|
|
description: Order line items with product details
|
|
properties:
|
|
id:
|
|
type: integer
|
|
readOnly: true
|
|
quantityordered:
|
|
type: integer
|
|
maximum: 2147483647
|
|
minimum: -2147483648
|
|
priceeach:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
orderlinenumber:
|
|
type: integer
|
|
maximum: 32767
|
|
minimum: -32768
|
|
ordernumber:
|
|
type: integer
|
|
maximum: 2147483647
|
|
minimum: -2147483648
|
|
productcode:
|
|
type: string
|
|
required:
|
|
- id
|
|
- orderlinenumber
|
|
- ordernumber
|
|
- priceeach
|
|
- productcode
|
|
- quantityordered
|
|
PaginatedOrderdetailList:
|
|
type: object
|
|
properties:
|
|
count:
|
|
type: integer
|
|
example: 123
|
|
next:
|
|
type: string
|
|
nullable: true
|
|
format: uri
|
|
example: http://api.example.org/accounts/?page=4
|
|
previous:
|
|
type: string
|
|
nullable: true
|
|
format: uri
|
|
example: http://api.example.org/accounts/?page=2
|
|
results:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Orderdetail'
|
|
PaginatedProductLineList:
|
|
type: object
|
|
properties:
|
|
count:
|
|
type: integer
|
|
example: 123
|
|
next:
|
|
type: string
|
|
nullable: true
|
|
format: uri
|
|
example: http://api.example.org/accounts/?page=4
|
|
previous:
|
|
type: string
|
|
nullable: true
|
|
format: uri
|
|
example: http://api.example.org/accounts/?page=2
|
|
results:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/ProductLine'
|
|
PaginatedProductList:
|
|
type: object
|
|
properties:
|
|
count:
|
|
type: integer
|
|
example: 123
|
|
next:
|
|
type: string
|
|
nullable: true
|
|
format: uri
|
|
example: http://api.example.org/accounts/?page=4
|
|
previous:
|
|
type: string
|
|
nullable: true
|
|
format: uri
|
|
example: http://api.example.org/accounts/?page=2
|
|
results:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Product'
|
|
PatchedProductLineRequest:
|
|
type: object
|
|
description: Product line category information
|
|
properties:
|
|
productline:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 50
|
|
textdescription:
|
|
type: string
|
|
nullable: true
|
|
maxLength: 4000
|
|
htmldescription:
|
|
type: string
|
|
nullable: true
|
|
PatchedProductRequest:
|
|
type: object
|
|
description: Product catalog information
|
|
properties:
|
|
productcode:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 15
|
|
productname:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 70
|
|
productscale:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 10
|
|
productvendor:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 50
|
|
productdescription:
|
|
type: string
|
|
minLength: 1
|
|
quantityinstock:
|
|
type: integer
|
|
maximum: 32767
|
|
minimum: -32768
|
|
buyprice:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
msrp:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
productline:
|
|
type: string
|
|
minLength: 1
|
|
Product:
|
|
type: object
|
|
description: Product catalog information
|
|
properties:
|
|
productcode:
|
|
type: string
|
|
maxLength: 15
|
|
productname:
|
|
type: string
|
|
maxLength: 70
|
|
productscale:
|
|
type: string
|
|
maxLength: 10
|
|
productvendor:
|
|
type: string
|
|
maxLength: 50
|
|
productdescription:
|
|
type: string
|
|
quantityinstock:
|
|
type: integer
|
|
maximum: 32767
|
|
minimum: -32768
|
|
buyprice:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
msrp:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
productline:
|
|
type: string
|
|
required:
|
|
- buyprice
|
|
- msrp
|
|
- productcode
|
|
- productdescription
|
|
- productline
|
|
- productname
|
|
- productscale
|
|
- productvendor
|
|
- quantityinstock
|
|
ProductLine:
|
|
type: object
|
|
description: Product line category information
|
|
properties:
|
|
productline:
|
|
type: string
|
|
maxLength: 50
|
|
textdescription:
|
|
type: string
|
|
nullable: true
|
|
maxLength: 4000
|
|
htmldescription:
|
|
type: string
|
|
nullable: true
|
|
image:
|
|
type: string
|
|
format: byte
|
|
readOnly: true
|
|
nullable: true
|
|
required:
|
|
- image
|
|
- productline
|
|
ProductLineRequest:
|
|
type: object
|
|
description: Product line category information
|
|
properties:
|
|
productline:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 50
|
|
textdescription:
|
|
type: string
|
|
nullable: true
|
|
maxLength: 4000
|
|
htmldescription:
|
|
type: string
|
|
nullable: true
|
|
required:
|
|
- productline
|
|
ProductRequest:
|
|
type: object
|
|
description: Product catalog information
|
|
properties:
|
|
productcode:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 15
|
|
productname:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 70
|
|
productscale:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 10
|
|
productvendor:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 50
|
|
productdescription:
|
|
type: string
|
|
minLength: 1
|
|
quantityinstock:
|
|
type: integer
|
|
maximum: 32767
|
|
minimum: -32768
|
|
buyprice:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
msrp:
|
|
type: string
|
|
format: decimal
|
|
pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
|
|
productline:
|
|
type: string
|
|
minLength: 1
|
|
required:
|
|
- buyprice
|
|
- msrp
|
|
- productcode
|
|
- productdescription
|
|
- productline
|
|
- productname
|
|
- productscale
|
|
- productvendor
|
|
- quantityinstock
|
|
securitySchemes:
|
|
ApiKeyAuth:
|
|
type: apiKey
|
|
in: header
|
|
name: X-API-Key
|
|
description: API key authentication using X-API-Key header
|
|
JWTAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
servers:
|
|
- url: https://catalog-dev.sttlab.local
|
|
description: Catalog gateway (dev)
|