Skip to main content

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 data
      • currency: Currency information
      • relation_hierarchy: Hierarchy information
      • relation_image: Product images
      • relation_product_detail: Product details
      • relation_linklist: Link list
      • relation_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 data
      • currency: Currency information
      • relation_hierarchy: Hierarchy
      • relation_special_price: Special price
      • relation_special_price_decision: Special price decisions
      • relation_special_price_calculator: Special price calculator
      • relation_product_detail.translates: Product detail translations
      • relation_image: Images
      • relation_linklist: Link list
      • relation_supplier: Supplier
      • relation_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

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)
}
}

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

FieldTypeDescriptionRequired
namestringProduct nameYes
barcodestringBarcodeNo
shortDescriptionstringShort descriptionNo
visibilitybooleanVisibility statusNo
listNointegerSort orderNo
searchKeywordsstringSearch keywordsNo
searchRankintegerSearch rankingNo

Price and Stock

FieldTypeDescriptionRequired
priceSaledecimalSale priceYes
priceDiscountdecimalDiscounted priceNo
purchasePricedecimalPurchase priceNo
vatintegerVAT rate (0-100)No
stockintegerStock quantityNo
stock2integerSecondary stockNo
stock99integerBackup stockNo
currencyIdintegerCurrency IDNo

SEO Information

FieldTypeDescriptionRequired
seoLinkstringSEO URLNo
seoTitlestringSEO titleNo
seoDescriptionstringSEO descriptionNo

Supplier Information

FieldTypeDescriptionRequired
supplierIdintegerSupplier IDNo
supplierProductCodestringSupplier product codeNo
wsProductCodestringWeb service product codeNo

Order Limits

FieldTypeDescriptionRequired
customerMinOrderCountintegerMinimum customer order quantityNo
customerMaxOrderCountintegerMaximum customer order quantityNo
vendorMinOrderCountintegerMinimum vendor order quantityNo
vendorMaxOrderCountintegerMaximum vendor order quantityNo

Brand and Model

FieldTypeDescriptionRequired
brandIdintegerBrand IDNo
modelIdintegerModel IDNo

Feature Flags

FieldTypeDescriptionRequired
isHomePageProductbooleanShow on homepageNo
isMostSoldbooleanBest sellerNo
isNewProductbooleanNew productNo
isShipmentFreebooleanFree shippingNo
showVatbooleanShow VATNo
showToDealerbooleanShow to dealerNo
showPromotionbooleanShow as promotedNo
showWithDiscountbooleanShow with discountNo
showComparisonWebsitesbooleanShow on comparison websitesNo

Error Codes

  • 401: Authentication error
  • 403: Permission error
  • 404: Product not found
  • 422: 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