Products
Base URL
/api/v3/admin/catalog/products
Authentication
Required permissions for using this API:
- For read operations:
catalog:product:read
- For write operations:
catalog:product:update
List Products
Retrieves a list of products.
- URL:
/
- Method:
GET
- Query Parameters:
- Filtering options from ProductFilter class
include
: Used to include related datacurrency
: Currency informationrelation_hierarchy
: Hierarchy informationrelation_image
: Product imagesrelation_product_detail
: Product detailsrelation_linklist
: Link listrelation_supplier
: Supplier information
- Response: Paginated list of products
Create Product
Creates a new product.
- URL:
/
- Method:
POST
- Headers:
Content-Type: application/json
- Permissions:
catalog:product:update
- Request Body:
{
"name": "Sample Product", // Required
"wsProductCode": "WS-123", // Optional, must be unique
"priceSale": 199.99, // Required, must be greater than 0
"vat": 18, // Optional, range 0-100
"vendorMaxOrderCount": 100, // Optional, must be greater than 0
"vendorMinOrderCount": 1, // Optional, must be greater than 0
"customerMaxOrderCount": 10, // Optional, must be greater than 0
"customerMinOrderCount": 1, // Optional, must be greater than 0
"relation_product_detail": {
"width": 10, // Optional, must be greater than 0
"length": 20, // Optional, must be greater than 0
"depth": 5 // Optional, must be greater than 0
},
"relation_hierarchy": [ // Required, must be array
{"id": 1, "type": "category"}
]
}
- Response: Created product object
Get Single Product
Retrieves a single product by ID.
- URL:
/{id}
- Method:
GET
- Permissions:
catalog:product:read
- URL Parameters:
id
: Product ID
- Query Parameters:
include
: Used to include related datacurrency
: Currency informationrelation_hierarchy
: Hierarchyrelation_special_price
: Special pricerelation_special_price_decision
: Special price decisionsrelation_special_price_calculator
: Special price calculatorrelation_product_detail.translates
: Product detail translationsrelation_image
: Imagesrelation_linklist
: Link listrelation_supplier
: Supplierrelation_metadata
: Metadata
- Response: Product details
Update Product
Updates an existing product. Supports partial updates (only send fields that need to be updated).
- URL:
/{id}
- Method:
PUT
- Permissions:
catalog:product:update
- URL Parameters:
id
: Product ID
- Request Body:
{
"wsProductCode": "WS-123", // Optional, must be unique
"vat": 18, // Optional, range 0-100
"purchasePrice": 150.00, // Optional, must be greater than 0
"priceSale": 199.99, // Optional, must be greater than 0
"vendorMaxOrderCount": 100, // Optional, must be greater than 0
"vendorMinOrderCount": 1, // Optional, must be greater than 0
"customerMaxOrderCount": 10, // Optional, must be greater than 0
"customerMinOrderCount": 1, // Optional, must be greater than 0
"relation_product_detail": {
"width": 10, // Optional, must be greater than 0
"length": 20, // Optional, must be greater than 0
"depth": 5 // Optional, must be greater than 0
}
}
- Response: Updated product object
- Note: Thanks to partial update support, you can send only the fields you want to update. Unspecified fields will retain their current values.
Delete Product
Deletes a product.
- URL:
/{id}
- Method:
DELETE
- URL Parameters:
id
: Product ID
- Permissions: Delete permission required
- Response: Deleted product object
Related Model Fields (Operations)
Relations that can be used when creating or updating products:
Category Hierarchy (relation_hierarchy)
Specifies the product's relationship with categories.
{
"relation_hierarchy": [
{
"id": 1, // Category ID
"type": "category" // Relation type
}
]
}
Product Details (relation_product_detail)
Contains product detail information.
{
"relation_product_detail": {
"width": 10, // Width
"length": 20, // Length
"depth": 5, // Depth
"id": 1 // Product ID (optional)
}
}
Image Gallery (relation_image)
Contains product images.
{
"relation_image": [
{
"path": "path/to/image.jpg", // Image path
"type": "main", // Image type (main, detail, etc.)
"sort": 1 // Sort order
}
]
}
All Available Fields
Basic Information
Field | Type | Description | Required |
---|---|---|---|
name | string | Product name | Yes |
barcode | string | Barcode | No |
shortDescription | string | Short description | No |
visibility | boolean | Visibility status | No |
listNo | integer | Sort order | No |
searchKeywords | string | Search keywords | No |
searchRank | integer | Search ranking | No |
Price and Stock
Field | Type | Description | Required |
---|---|---|---|
priceSale | decimal | Sale price | Yes |
priceDiscount | decimal | Discounted price | No |
purchasePrice | decimal | Purchase price | No |
vat | integer | VAT rate (0-100) | No |
stock | integer | Stock quantity | No |
stock2 | integer | Secondary stock | No |
stock99 | integer | Backup stock | No |
currencyId | integer | Currency ID | No |
SEO Information
Field | Type | Description | Required |
---|---|---|---|
seoLink | string | SEO URL | No |
seoTitle | string | SEO title | No |
seoDescription | string | SEO description | No |
Supplier Information
Field | Type | Description | Required |
---|---|---|---|
supplierId | integer | Supplier ID | No |
supplierProductCode | string | Supplier product code | No |
wsProductCode | string | Web service product code | No |
Order Limits
Field | Type | Description | Required |
---|---|---|---|
customerMinOrderCount | integer | Minimum customer order quantity | No |
customerMaxOrderCount | integer | Maximum customer order quantity | No |
vendorMinOrderCount | integer | Minimum vendor order quantity | No |
vendorMaxOrderCount | integer | Maximum vendor order quantity | No |
Brand and Model
Field | Type | Description | Required |
---|---|---|---|
brandId | integer | Brand ID | No |
modelId | integer | Model ID | No |
Feature Flags
Field | Type | Description | Required |
---|---|---|---|
isHomePageProduct | boolean | Show on homepage | No |
isMostSold | boolean | Best seller | No |
isNewProduct | boolean | New product | No |
isShipmentFree | boolean | Free shipping | No |
showVat | boolean | Show VAT | No |
showToDealer | boolean | Show to dealer | No |
showPromotion | boolean | Show as promoted | No |
showWithDiscount | boolean | Show with discount | No |
showComparisonWebsites | boolean | Show on comparison websites | No |
Error Codes
401
: Authentication error403
: Permission error404
: Product not found422
: Validation error
Changelog
2024-12
- Added support for emoji in product names
- Enhanced product catalog system
- Added sorting capability for supplier product code
- Improved tag link management
2024-09
- Added product image services for catalog products
- Implemented catalog product listing
- Enhanced category catalog system
- Added metafields and metaobjects support
2024-08
- Added additional product information fields
- Improved logging system for data changes
2024-07
- Added multilingual SEO information generation
- Enhanced product translation capabilities
2024-05
- Added automatic deletion of related shopping list records
- Improved product cloning functionality
2024-04
- Added automatic collection cleanup on product deletion
- Enhanced product copy functionality
2024-03
- Added HS code mapping support
2024-02
- Enhanced stock status update functionality
2024-01
- Fixed product search ID filter
- Added product hierarchy support
2023-12
- Optimized product listing and hierarchy filters
- Added shipping company restrictions
- Enhanced payment type restrictions
2023-10
- Added product filter assignment feature
- Enhanced product hierarchy filtering
- Implemented member group visibility controls
2023-09
- Added product search indexing functionality
- Enhanced product image SEO link updates
- Added product video gallery services
- Improved product detail update capabilities
2023-08
- Added flexible pricing system
- Enhanced product API functionality
2023-07
- Implemented product image model
- Added multilingual support for images
- Enhanced product deletion event handling
- Added CSV logging for products
2023-06
- Initial release of Product API V3
- Added credit card installment support
- Implemented product completeness check
This document was generated by AI. For support: api-support@tsoft.com.tr