E-commerce Product Catalog API
E-commerce Product Catalog API
0)
Download OpenAPI specification: Download
API for managing products, categories, inventory, and pricing for an e-commerce platform.
Products
QUERY PARAMETERS
inStock boolean
Filter by stock availability
searchTerm string
Search term for product name or description
Responses
GET /products
Response samples
200 default
Content type
application/json
sku
string
required
name string
required
description string
price
object (PriceInput)
required
isActive boolean
Default: true
Responses
POST /products
Request samples
Payload
Content type
application/json
Response samples
Content type
application/json
PATH PARAMETERS
productId string
required
Example: prod_123xyz
ID of the product to retrieve
Responses
GET /products/{productId}
Response samples
Content type
application/json
PATH PARAMETERS
productId string
required
Example: prod_123xyz
ID of the product to update
sku string
name string
description string
isActive boolean
Responses
PUT /products/{productId}
Request samples
Payload
Content type
application/json
Response samples
Content type
application/json
PATH PARAMETERS
productId string
required
Example: prod_123xyz
ID of the product to delete
Responses
DELETE /products/{productId}
Response samples
404 default
Content type
application/json
Responses
GET /categories
Response samples
200 default
Content type
application/json
Category to create
name
string
required
isActive boolean
Default: true
Responses
POST /categories
Request samples
Payload
Content type
application/json
Copy
{
"name": "string",
"description": "string",
"parentCategoryId": "acdf37b5-b785-42a1-be6f-0a9504c832f1",
"imageUrl": "string",
"isActive": true
}
Response samples
Content type
application/json
Copy
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Apparel",
"description": "Clothing items for men, women, and children.",
"parentCategoryId": "acdf37b5-b785-42a1-be6f-0a9504c832f1",
"imageUrl": "string",
"isActive": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
PATH PARAMETERS
Responses
Response samples
Content type
application/json
Copy
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Apparel",
"description": "Clothing items for men, women, and children.",
"parentCategoryId": "acdf37b5-b785-42a1-be6f-0a9504c832f1",
"imageUrl": "string",
"isActive": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
PATH PARAMETERS
name string
isActive boolean
Responses
PUT /categories/{categoryId}
Request samples
Payload
Content type
application/json
Copy
{
"name": "string",
"description": "string",
"parentCategoryId": "acdf37b5-b785-42a1-be6f-0a9504c832f1",
"imageUrl": "string",
"isActive": true
}
Response samples
Content type
application/json
Copy
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Apparel",
"description": "Clothing items for men, women, and children.",
"parentCategoryId": "acdf37b5-b785-42a1-be6f-0a9504c832f1",
"imageUrl": "string",
"isActive": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Delete a category
AUTHORIZATIONS: apiKeyAuth
PATH PARAMETERS
Responses
409 The request could not be completed due to a conflict with the current state of the resource.
DELETE /categories/{categoryId}
Response samples
Content type
application/json
PATH PARAMETERS
productId string
required
Example: prod_123xyz
ID of the product
Responses
GET /products/{productId}/inventory
Response samples
Content type
application/json
Copy
{
"quantity": 150,
"isInStock": true,
"lowStockThreshold": 10,
"lastStockUpdate": "2019-08-24T14:15:22Z"
}
PATH PARAMETERS
productId string
required
Example: prod_123xyz
ID of the product
Responses
PUT /products/{productId}/inventory
Request samples
Payload
Content type
application/json
Copy
{
"quantity": 0,
"lowStockThreshold": 0
}
Response samples
Content type
application/json
Copy
{
"quantity": 150,
"isInStock": true,
"lowStockThreshold": 10,
"lastStockUpdate": "2019-08-24T14:15:22Z"
}