» Products Module Documentation

Getting All Products

Function: get_product_list() &  admin_get_product_list()

Purpose

This function retrieves a list of products available for customers and administrators. The get_product_list() function is used to fetch products based on a customer’s access level, meaning some products may be restricted based on user type or permissions. On the other hand, admin_get_product_list() provides access to all products, regardless of restrictions, allowing administrators full control over inventory and visibility. This helps businesses manage product accessibility, control pricing strategies, and ensure restricted products are only available to authorized users. Additionally, it supports filtering, sorting, and pagination to efficiently navigate large product catalogs.

Parameters

This function does not require any input parameters.

Use Case

The get_product_list()  is used to browse and purchase available products for a customer, ensuring they only see items they are eligible to buy. Businesses can apply restrictions based on customer groups, scheduled availability, and password protection, making it ideal for exclusive sales or membership-based access. The admin_get_product_list() function allows administrators to manage all products, even those hidden from regular customers, ensuring smooth inventory tracking, bulk updates, and product lifecycle management. This separation helps maintain control over restricted products while allowing flexibility for different user types.

def get_product_list():
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.product.list()
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

This function returns a list of products along with details such as pricing, stock availability, variations, metadata, and access restrictions. For regular customers, the response includes only products they are allowed to purchase, while administrators receive full product listings, including restricted and password-protected items. Each product contains information such as base price, sale price, stock levels, categories, variations, and SEO metadata to support e-commerce functionality. The response also supports pagination, ensuring efficient retrieval of product lists for large inventories.

ProductListResponseDTO(
    products=[
        ProductDataDTO(
            administrativeStatus=BOOLEAN,
            advanced={
                'advance_information': {
                    'global_trade_item_number': 'PRODUCT_GTIN',
                    'product_condition': 'NEW',
                    'loyality_points': 'LOYALTY_POINTS'
                },
                'webtool_disable_tracking': BOOLEAN,
                'meta_tags': [
                    {'name': 'Meta', 'value': 'META_VALUE', 'id': META_ID}
                ],
                'custom_information': {}
            },
            available=BOOLEAN,
            availableFor='AVAILABLE_FOR',
            availableFromDate='YYYY-MM-DDTHH:MM:SSZ',
            availableStock=AVAILABLE_STOCK,
            availableToDate='YYYY-MM-DDTHH:MM:SSZ',
            availableOnDateRange=BOOLEAN,
            availableOnWeekdays=ProductAvailableWeekdaysDataDTO(
                enabled=BOOLEAN,
                weekdays=[
                    WeekdaysDataDTO(day='DAY', startHour=0, startMinute=0, endHour=0, endMinute=0)
                ]
            ),
            basePrice=BASE_PRICE,
            costPrice=COST_PRICE,
            customClass='CUSTOM_CLASS',
            customProperties='',
            heading='HEADER',
            id=PRODUCT_ID,
            imageAndVideo=ProductMediaDTO(
                images=[
                    ImageDataDTO(
                        id=IMAGE_ID,
                        filename='IMAGE_FILENAME',
                        link='IMAGE_LINK',
                        thumbnail='IMAGE_THUMBNAIL'
                    )
                ],
                videos=[
                    VideoDataDTO(
                        id=VIDEO_ID,
                        filename='VIDEO_FILENAME',
                        link='VIDEO_LINK',
                        thumbnail='VIDEO_THUMBNAIL'
                    )
                ],
                specs=[
                    MediaDataDTO(
                        id=SPEC_ID,
                        filename='SPEC_FILENAME',
                        link='SPEC_LINK'
                    )
                ]
            ),
            isOnSale=BOOLEAN,
            name='PRODUCT_NAME',
            parents=[
                ParentDataDTO(id=PARENT_ID, name='PARENT_NAME', isInTrash=BOOLEAN, isParentInTrash=BOOLEAN, isDisposable=BOOLEAN),
                ParentDataDTO(id=PARENT_ID, name='PARENT_NAME', isInTrash=BOOLEAN, isParentInTrash=BOOLEAN, isDisposable=BOOLEAN)
            ],
            password='',
            passwordProtected=BOOLEAN,
            productPricingAndStock=ProductPricingAndStockDTO(
                availableStock=AVAILABLE_STOCK,
                enableCallForPrice=BOOLEAN,
                enableMultipleOrder=BOOLEAN,
                expectedToPay=BOOLEAN,
                expectedToPayPrice=EXPECTED_TO_PAY_PRICE,
                hidePrice=BOOLEAN,
                lowLevelStock=LOW_LEVEL_STOCK,
                maximumOrderQuantity=MAX_ORDER_QTY,
                minimumOrderQuantity=MIN_ORDER_QTY,
                multipleOrderQuantity=MULTIPLE_ORDER_QTY,
                onSale=BOOLEAN,
                onSalePrice=SALE_PRICE,
                onSalePriceType='SALE_PRICE_TYPE',
                restrictPriceFor='none',
                restrictPriceForExceptCustomers=[],
                restrictPurchaseFor='none',
                restrictPurchaseForSelectedCustomers=[],
                shippingProfile=ShippingProfileDataDTO(id=SHIPPING_ID, name='SHIPPING'),
                taxProfile=TaxProfileDataDTO(id=TAX_ID, name='TAX_NAME'),
                trackInventory=BOOLEAN
            ),
            productLayout=CommonStructureDTO(id=LAYOUT_ID, name='LAYOUT_NAME'),
            productSummary='PRODUCT_SUMMARY',
            productDescription='PRODUCT_DESCRIPTION',
            productPage={},
            productType='PRODUCT_TYPE',
            restrictPriceFor=None,
            restrictPurchaseFor=None,
            restrictForSelectedCustomers=[],
            relatedProducts=[
                RelatedOrSimilarProductDTO(id=RELATED_PRODUCT_ID, name='RELATED_PRODUCT_NAME', url='RELATED_PRODUCT_URL'),
                RelatedOrSimilarProductDTO(id=RELATED_PRODUCT_ID, name='RELATED_PRODUCT_NAME', url='RELATED_PRODUCT_URL')
            ],
            similarProducts=[
                RelatedOrSimilarProductDTO(id=SIMILAR_PRODUCT_ID, name='SIMILAR_PRODUCT_NAME', url='SIMILAR_PRODUCT_URL'),
                RelatedOrSimilarProductDTO(id=SIMILAR_PRODUCT_ID, name='SIMILAR_PRODUCT_NAME', url='SIMILAR_PRODUCT_URL')
            ],
            selectedCustomers=[],
            salePrice=SALE_PRICE,
            seoConfigs=[],
            sku='PRODUCT_SKU',
            summary=None,
            tags=[],
            url=None,
            videos=None
        )
    ],
    pagination=PaginationDTO(
        records=TOTAL_RECORDS,
        limit=PAGE_LIMIT,
        offset=OFFSET,
        nextPage='NEXT_PAGE_URL',
        previousPage=None
    )
)

Getting Specific Product Information

Functions: get_product_info() & get_admin_product_info()

Purpose

This functions  retrieves detailed information about a specific product using its unique identifier. It provides essential data such as product name, price, description, stock availability, and other relevant metadata. Businesses can use this function to dynamically fetch product details for e-commerce platforms, inventory management systems, or customer queries. The get_admin_product_info() function is specifically designed for administrative users, allowing them to access extended product data, including internal attributes, supplier details, and restricted settings. By leveraging this function, businesses can ensure accurate and up-to-date product information is displayed, improving customer experience and operational efficiency. Administrators can use the admin version to manage and monitor product-related configurations without directly modifying the database. This function is essential for streamlining product data retrieval across different user roles, ensuring data consistency, and reducing errors in pricing, descriptions, or stock levels.

Parameters

Parameter
Type
Description
id
String
The unique identifier of the product.

Use Case

 This both functions get_product_info()get_admin_product_info() can be used when you need to fetch detailed product information for display, order processing, or inventory tracking. The admin version should be used for backend management purposes where additional product attributes are required.

def get_product_info():
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.product.info(id="PRODUCT_ID")
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

A response object containing detailed product information such as product name, SKU, price, stock status, description, and images. The admin version provides additional fields, including supplier details, internal notes, and restricted attributes.

ProductResponseDTO(
    status="STATUS",
    product=ProductDataDTO(
        administrativeStatus=True,
        advanced=AdvancedDTO(
            advance_information=AdvanceInformationDTO(
                global_trade_item_number="GLOBAL_TRADE_ITEM_NUMBER",
                product_condition="PRODUCT_CONDITION",
                loyality_points="LOYALITY_POINTS"
            ),
            webtool_disable_tracking="WEBTOOL_DISABLE_TRACKING",
            meta_tags=[
                MetaTagDTO(
                    name="META_NAME_1",
                    value="META_VALUE_1",
                    id="META_ID_1"
                ),
                MetaTagDTO(
                    name="META_NAME_2",
                    value="META_VALUE_2",
                    id="META_ID_2"
                )
            ],
            custom_information="CUSTOM_INFORMATION"
        ),
        available=True,
        availableFor="AVAILABLE_FOR",
        availableFromDate="AVAILABLE_FROM_DATE",
        availableStock="AVAILABLE_STOCK",
        availableToDate="AVAILABLE_TO_DATE",
        availableOnDateRange=True,
        availableOnWeekdays=ProductAvailableWeekdaysDataDTO(
            enabled=True,
            weekdays=[
                WeekdaysDataDTO(
                    day="DAY_1",
                    startHour="START_HOUR_1",
                    startMinute="START_MINUTE_1",
                    endHour="END_HOUR_1",
                    endMinute="END_MINUTE_1"
                ),
                WeekdaysDataDTO(
                    day="DAY_2",
                    startHour="START_HOUR_2",
                    startMinute="START_MINUTE_2",
                    endHour="END_HOUR_2",
                    endMinute="END_MINUTE_2"
                ),
                WeekdaysDataDTO(
                    day="DAY_3",
                    startHour="START_HOUR_3",
                    startMinute="START_MINUTE_3",
                    endHour="END_HOUR_3",
                    endMinute="END_MINUTE_3"
                )
            ]
        ),
        basePrice="BASE_PRICE",
        costPrice="COST_PRICE",
        customClass="CUSTOM_CLASS",
        customProperties="CUSTOM_PROPERTIES",
        heading="HEADING",
        id="PRODUCT_ID",
        imageAndVideo=ProductMediaDTO(
            images=[
                ImageDataDTO(
                    id="IMAGE_ID",
                    filename="IMAGE_FILENAME",
                    link="IMAGE_LINK",
                    thumbnail="IMAGE_THUMBNAIL"
                )
            ],
            videos=[
                VideoDataDTO(
                    id="VIDEO_ID",
                    filename="VIDEO_FILENAME",
                    link="VIDEO_LINK",
                    thumbnail="VIDEO_THUMBNAIL"
                )
            ],
            specs=[
                MediaDataDTO(
                    id="MEDIA_ID",
                    filename="MEDIA_FILENAME",
                    link="MEDIA_LINK"
                )
            ]
        ),
        isOnSale=True,
        name="PRODUCT_NAME",
        parents=[
            ParentDataDTO(
                id="PARENT_ID_1",
                name="PARENT_NAME_1",
                isInTrash=False,
                isParentInTrash=False,
                isDisposable=False
            ),
            ParentDataDTO(
                id="PARENT_ID_2",
                name="PARENT_NAME_2",
                isInTrash=False,
                isParentInTrash=False,
                isDisposable=False
            )
        ],
        password="PASSWORD",
        passwordProtected=False,
        productPricingAndStock=ProductPricingAndStockDTO(
            availableStock="AVAILABLE_STOCK",
            enableCallForPrice=True,
            enableMultipleOrder=True,
            expectedToPay=False,
            expectedToPayPrice="EXPECTED_TO_PAY_PRICE",
            hidePrice=False,
            lowLevelStock="LOW_LEVEL_STOCK",
            maximumOrderQuantity="MAXIMUM_ORDER_QUANTITY",
            minimumOrderQuantity="MINIMUM_ORDER_QUANTITY",
            multipleOrderQuantity="MULTIPLE_ORDER_QUANTITY",
            onSale=True,
            onSalePrice="ON_SALE_PRICE",
            onSalePriceType="ON_SALE_PRICE_TYPE",
            restrictPriceFor="RESTRICT_PRICE_FOR",
            restrictPriceForExceptCustomers=["RESTRICT_CUSTOMER_1", "RESTRICT_CUSTOMER_2"],
            restrictPurchaseFor="RESTRICT_PURCHASE_FOR",
            restrictPurchaseForSelectedCustomers=["SELECTED_CUSTOMER_1", "SELECTED_CUSTOMER_2"],
            shippingProfile=ShippingProfileDataDTO(
                id="SHIPPING_PROFILE_ID",
                name="SHIPPING_PROFILE_NAME"
            ),
            taxProfile=TaxProfileDataDTO(
                id="TAX_PROFILE_ID",
                name="TAX_PROFILE_NAME"
            ),
            trackInventory=False
        ),
        productLayout=CommonStructureDTO(
            id="LAYOUT_ID",
            name="LAYOUT_NAME"
        ),
        productSummary="PRODUCT_SUMMARY",
        productDescription="PRODUCT_DESCRIPTION",
        productPage={},
        productType="PRODUCT_TYPE",
        restrictPriceFor="RESTRICT_PRICE_FOR",
        restrictPurchaseFor="RESTRICT_PURCHASE_FOR",
        restrictForSelectedCustomers=["SELECTED_CUSTOMER_1", "SELECTED_CUSTOMER_2"],
        relatedProducts=[
            RelatedOrSimilarProductDTO(
                id="RELATED_PRODUCT_ID_1",
                name="RELATED_PRODUCT_NAME_1",
                url="RELATED_PRODUCT_URL_1"
            ),
            RelatedOrSimilarProductDTO(
                id="RELATED_PRODUCT_ID_2",
                name="RELATED_PRODUCT_NAME_2",
                url="RELATED_PRODUCT_URL_2"
            ),
            RelatedOrSimilarProductDTO(
                id="RELATED_PRODUCT_ID_3",
                name="RELATED_PRODUCT_NAME_3",
                url="RELATED_PRODUCT_URL_3"
            )
        ],
        similarProducts=[
            RelatedOrSimilarProductDTO(
                id="SIMILAR_PRODUCT_ID_1",
                name="SIMILAR_PRODUCT_NAME_1",
                url="SIMILAR_PRODUCT_URL_1"
            ),
            RelatedOrSimilarProductDTO(
                id="SIMILAR_PRODUCT_ID_2",
                name="SIMILAR_PRODUCT_NAME_2",
                url="SIMILAR_PRODUCT_URL_2"
            ),
            RelatedOrSimilarProductDTO(
                id="SIMILAR_PRODUCT_ID_3",
                name="SIMILAR_PRODUCT_NAME_3",
                url="SIMILAR_PRODUCT_URL_3"
            )
        ],
        selectedCustomers=["SELECTED_CUSTOMER_ID_1"],
        salePrice="SALE_PRICE",
        seoConfigs=[],
        sku="SKU",
        summary="SUMMARY",
        tags=["TAG1", "TAG2"],
        url="PRODUCT_URL",
        videos="PRODUCT_VIDEOS"
    )
)

Getting Products Count

Function: get_product_count() & admin_get_product_count()

Purpose

Retrieves the total number of products available. For get_product_count(), it returns the count for customers, groups, or anonymous users based on their access, whereas admin_get_product_count() provides the full count for all products accessible by the admin.

Parameters

This function does not require any input parameters.

Use Case

The get_product_count()  function is used to get an idea of how many products are available to customers in the store, ensuring they see only items they can purchase. Administrators use admin_get_product_count() for inventory management, tracking total product numbers, including hidden or restricted items. This distinction is useful for managing special promotions, private sales, or exclusive memberships where not all products should be publicly accessible

def get_product_count():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.product.count()
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response returns the number of products available. For get_product_count(), this number represents only the products the current customer can access. In contrast, admin_get_product_count() provides the total number of products in the system, including restricted items. This helps businesses understand inventory size from both a customer and administrative perspective.

CountResponseDTO(count=TOTAL_PRODUCT_COUNT)

Getting Product Settings

Function: get_product_settings()

Purpose

This function get_product_settings() retrieves global product settings that define how products behave within the system. It provides essential configurations such as pricing rules, stock management settings, tax policies, display preferences, and other operational parameters. Businesses can use this function to dynamically adjust product behavior, ensuring consistency in pricing, stock control, and visibility settings across their platform. It helps developers, administrators, and system integrators access predefined product rules without manually checking configurations in the database. By leveraging this function, businesses can streamline product management, reduce errors, and ensure compliance with pricing and tax regulations. This is particularly useful for multi-channel e-commerce platforms, inventory systems, and custom storefronts that rely on system-wide product configurations.

Parameters

No input parameters are required for this function.

Use Case

This function get_product_settings() when you need to retrieve system-wide product settings for pricing, inventory control, tax policies, and display configurations. It is particularly useful for ensuring that all products adhere to a consistent set of rules across different parts of the system.

def get_product_settings():
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.product.settings()
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

A response object containing global product settings, including pricing configurations, stock control rules, tax settings, and display preferences. These settings define how products function within the system and affect pricing, availability, and presentation.

ProductSettingsDataDTO(
    labelForCallForPrice="Call for Price",
    labelForExpectToPay="Expect to Pay",
    labelForBasePrice="Today's Price",
    addToCart="true",
    variationOptionView="flat"
)

Getting Product Variations

Function: admin_get_product_variation()

Purpose

This function retrieves detailed information about the variations of a specific product. It is designed for administrative use, allowing administrators to access and manage product variations, including their types, options, and available combinations. This function is beneficial for managing complex products with multiple variations, such as different colors, sizes, or other customizable attributes.

Parameters

Parameter
Type
Description
id
String
The unique identifier of the product for which variations are being retrieved.

Use Case

This function is used when administrators need to fetch detailed information about the variations of a product. It is particularly useful in scenarios where products have multiple customizable options, such as configurable products with different colors, sizes, or materials. It is also helpful for managing tiered pricing or inventory tracking for each variation. Additionally, this function can be used to dynamically display product variations on the frontend or update inventory details in the backend.

def admin_get_product_variation():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.admin_product.product_variations(id="PRODUCT_ID")
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response provides detailed information about the product variations, including the variation model, types, options, and available combinations. Each variation includes SKU, pricing, stock levels, images, videos, and tax information.

ProductVariationResponseDTO(
    product=ProductVariationDataDTO(
        productId=PRODUCT_ID,
        productVariation=ProductVariationDTO(
            variationModel='VARIATION_MODEL',
            types=[
                VariationTypeDTO(
                    id=VARIATION_TYPE_ID,
                    name='VARIATION_TYPE_NAME',
                    standard='VARIATION_STANDARD',
                    options=[
                        VariationOptionDTO(
                            id=VARIATION_OPTION_ID,
                            label='VARIATION_OPTION_LABEL',
                            value='VARIATION_OPTION_VALUE',
                            default=VARIATION_OPTION_DEFAULT
                        ),
                        VariationOptionDTO(
                            id=VARIATION_OPTION_ID,
                            label='VARIATION_OPTION_LABEL',
                            value='VARIATION_OPTION_VALUE',
                            default=VARIATION_OPTION_DEFAULT
                        )
                    ],
                    role=None,
                    isDisposable=None
                )
            ],
            availableCombinations=[
                AvailableCombinationDTO(
                    options=[
                        CombinationOptionDTO(
                            id=COMBINATION_OPTION_ID,
                            index=COMBINATION_OPTION_INDEX,
                            type=[
                                CombinationVariationTypeDTO(
                                    id=COMBINATION_VARIATION_TYPE_ID,
                                    name='COMBINATION_VARIATION_TYPE_NAME',
                                    standard='COMBINATION_VARIATION_STANDARD',
                                    role=None,
                                    isDisposable=COMBINATION_VARIATION_IS_DISPOSABLE
                                )
                            ],
                            label='COMBINATION_OPTION_LABEL',
                            value='COMBINATION_OPTION_VALUE',
                            colorHasSwatch=COLOR_HAS_SWATCH,
                            colorSwatchValue='COLOR_SWATCH_VALUE',
                            imageBaseUrl='IMAGE_BASE_URL'
                        )
                    ],
                    details=VariationDetailsDTO(
                        variationId=VARIATION_ID,
                        productName='PRODUCT_NAME',
                        sku='PRODUCT_SKU',
                        customSku=None,
                        urls=ProductVariationUrlsDTO(
                            url='PRODUCT_URL',
                            productUrl='PRODUCT_FULL_URL'
                        ),
                        url=None,
                        productUrl=None,
                        metaTags=[],
                        isInventoryEnabled=IS_INVENTORY_ENABLED,
                        availableStock=AVAILABLE_STOCK,
                        lowStockLevel=LOW_STOCK_LEVEL,
                        spec=None,
                        isMultipleOrderQuantity=IS_MULTIPLE_ORDER_QUANTITY,
                        isOnSale=IS_ON_SALE,
                        isExpectToPay=IS_EXPECT_TO_PAY,
                        isCallForPriceEnabled=IS_CALL_FOR_PRICE_ENABLED,
                        isNew=IS_NEW,
                        onSaleAmountType='ON_SALE_AMOUNT_TYPE',
                        title=None,
                        heading='PRODUCT_HEADING',
                        summary='PRODUCT_SUMMARY',
                        description='PRODUCT_DESCRIPTION',
                        model='PRODUCT_MODEL',
                        productCondition='PRODUCT_CONDITION',
                        basePrice=BASE_PRICE,
                        costPrice=COST_PRICE,
                        salePrice=SALE_PRICE,
                        expectToPayPrice=EXPECT_TO_PAY_PRICE,
                        weight='PRODUCT_WEIGHT',
                        height='PRODUCT_HEIGHT',
                        length='PRODUCT_LENGTH',
                        width='PRODUCT_WIDTH',
                        displayPrice=None,
                        previousPrice=None,
                        minOrderQuantity=MIN_ORDER_QUANTITY,
                        maxOrderQuantity=MAX_ORDER_QUANTITY,
                        multipleOfOrderQuantity=MULTIPLE_OF_ORDER_QUANTITY,
                        supportedMaxOrderQuantity=SUPPORTED_MAX_ORDER_QUANTITY,
                        images=[
                            ImageDataDTO(
                                id=IMAGE_ID,
                                filename=None,
                                link=None,
                                thumbnail='IMAGE_THUMBNAIL_URL',
                                url='IMAGE_URL'
                            )
                        ],
                        videos=[
                            VideoDataDTO(
                                id=VIDEO_ID,
                                filename='VIDEO_FILENAME',
                                link='VIDEO_LINK',
                                thumbnail='VIDEO_THUMBNAIL'
                            )
                        ],
                        specs=[
                            MediaDataDTO(
                                id=SPEC_ID,
                                filename='SPEC_FILENAME',
                                link='SPEC_LINK'
                            )
                        ],
                        tax=TAX_AMOUNT,
                        taxMessage='TAX_MESSAGE',
                        priceAndStock=VariationPriceAndStockDTO(
                            trackInventory=TRACK_INVENTORY,
                            availableStock=AVAILABLE_STOCK,
                            lowLevelStock=LOW_LEVEL_STOCK,
                            minimumOrderQuantity=MINIMUM_ORDER_QUANTITY,
                            maximumOrderQuantity=MAXIMUM_ORDER_QUANTITY,
                            supportedMaxOrderQuantity=SUPPORTED_MAX_ORDER_QUANTITY,
                            enableMultipleOrder=ENABLE_MULTIPLE_ORDER,
                            multipleOrderQuantity=MULTIPLE_ORDER_QUANTITY,
                            onSale=ON_SALE,
                            soldOut=SOLD_OUT,
                            soldOutLabel=None,
                            onSalePriceType='ON_SALE_PRICE_TYPE',
                            onSalePrice=ON_SALE_PRICE,
                            expectedToPay=EXPECTED_TO_PAY,
                            expectedToPayPrice=EXPECTED_TO_PAY_PRICE,
                            enableCallForPrice=ENABLE_CALL_FOR_PRICE,
                            hidePrice=HIDE_PRICE
                        )
                    )
                )
            ]
        )
    )
)

Adjusting Product Inventory

Function: adjust_inventory_product()

Purpose

This function allows administrators to adjust the inventory details of a specific product. It updates key inventory-related fields such as available stock, low stock level, minimum and maximum order quantities, and inventory tracking settings. This function is essential for maintaining accurate inventory levels and ensuring that product availability is correctly reflected in the system.

Parameters

ParameterTypeDescription
idStringThe unique identifier of the product whose inventory is being adjusted.
trackInventoryBooleanIndicates whether inventory tracking is enabled for the product.
availableStockStringThe updated available stock level for the product.
lowLevelStockStringThe threshold at which the product is considered low in stock.
minimumOrderQuantityStringThe minimum quantity that can be ordered for the product.
maximumOrderQuantityStringThe maximum quantity that can be ordered for the product.

Use Case

This function is used when administrators need to update the inventory details of a product. It is particularly useful in scenarios such as restocking products, setting low stock alerts, or adjusting order quantity limits. For example, if a product’s stock level changes due to a new shipment, this function can be used to update the available stock. Similarly, if the business wants to enforce minimum or maximum order quantities, this function can be used to set those limits.

def adjust_inventory_product():
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        product_data = ProductInventoryCreateDTO(
            product=ProductInventoryDTO(
                productPricingAndStock=ProductInventoryPricingAndStockDTO(
                    trackInventory=BOOLEAN,
                    availableStock="AVAILABLE_STOCK",
                    lowLevelStock="LOW_LEVEL_STOCK",
                    minimumOrderQuantity="MINIMUM_ORDER_QUANTITY",
                    maximumOrderQuantity="MAXIMUM_ORDER_QUANTITY"
                )
            )
        )
        response = webcommander_sdk.admin_product.adjust_inventory(id="PRODUCT_ID", request_data=product_data)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response confirms whether the inventory update was successful. It returns a status and message indicating the result of the operation.

CommonMessageDTO(
    status='success',
    message='Inventory has been updated successfully'
)

Creating Product Images

Function: create_product_image()

Purpose

This function enables administrators to upload and associate multiple images with a specific product. It supports uploading images in base64 encoded format and automatically generates thumbnail versions. The function is essential for managing product media assets, allowing for visual representation of products in the e-commerce platform.

Parameters

ParameterTypeDescription
idStringThe unique identifier of the product receiving the images
filenameStringImage file name with extension.
base64StringBase64 format of the image for upload.

Use Case

This function is used when administrators need to add new product images or update existing ones. Typical scenarios include adding product photos after initial creation, replacing outdated images, or enhancing product listings with additional visual content. The function handles multiple images in a single request, making it efficient for bulk uploads. The system automatically processes the images, storing the originals and generating optimized thumbnails for different display contexts.

def create_product_image():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        image1 = MediaAssetDTO(filename="IMAGE.jpg",
                               base64="BASE64_FORMAT_IMAGE")
        image2 = MediaAssetDTO(filename="IMAGE.jpg",
                               base64="BASE64_FORMAT_IMAGE")
        image_collection = ProductMediaCollectionDTO(images=[image1, image2], videos=[])
        media_bundle = ProductMediaBundleDTO(imageAndVideo=image_collection)
        payload = ProductImageAndVideoRequestDTO(product=media_bundle)

        response = webcommander_sdk.admin_product.create_image(id="58", request_data=payload)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response returns details of all successfully uploaded media assets, including image URLs for the original and thumbnail versions, unique identifiers for each uploaded asset, and confirmation of video and spec files if included.

ProductImageAndVideoResponseDTO(
    product=ProductMediaDTO(
        images=[
            ImageDataDTO(
                id=IMAGE_ID_1,
                filename='IMAGE_FILENAME_1',
                link='IMAGE_LINK_1',
                thumbnail='IMAGE_THUMBNAIL_1',
                url=None
            ),
            ImageDataDTO(
                id=IMAGE_ID_2,
                filename='IMAGE_FILENAME_2',
                link='IMAGE_LINK_2',
                thumbnail='IMAGE_THUMBNAIL_2',
                url=None
            )
        ],
        videos=[
            VideoDataDTO(
                id=VIDEO_ID,
                filename='VIDEO_FILENAME',
                link='VIDEO_LINK',
                thumbnail='VIDEO_THUMBNAIL'
            )
        ],
        specs=[
            MediaDataDTO(
                id=SPEC_ID,
                filename='SPEC_FILENAME',
                link='SPEC_LINK'
            )
        ]
    )
)

Deleting Product Images

Function: delete_product_image()

Purpose

This function allows administrators to remove specific images associated with a product. It permanently deletes the image from both the original and thumbnail storage locations. This function is essential for maintaining accurate product media by removing outdated, incorrect, or unwanted images while preserving other media assets associated with the product.

Parameters

ParameterTypeDescription
idStringThe unique identifier of the product containing the image to be deleted.
image_idStringThe unique identifier of the specific image to be removed.

Use Case

This function is used when administrators need to remove individual product images while keeping the product record intact. Common scenarios include deleting incorrect product photos, removing outdated images after product updates, or cleaning up duplicate images. The function targets specific images without affecting other media assets (videos, specifications files) or product information, making it precise for media management operations.

def delete_product_image():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.admin_product.image_delete(id="PRODUCT_ID", image_id="IMAGE_ID")
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns None with a 204 No Content status upon successful deletion, indicating the image was removed without returning any data.

Adding Product Reviews

Function: add_product_review()

Purpose

This function enables adding customer reviews to products, including textual feedback, star ratings, and supporting media attachments. It supports adding multiple reviews in a single request and automatically associates them with the specified product. This functionality helps maintain authentic customer feedback and enhances product credibility.

Parameters

ParameterTypeDescription
idStringThe unique identifier of the product receiving the reviews
nameStringName of the customer who is providing the review.
emailStringEmail of the customer.
reviewStringReview of the product.
filenameStringImage file name with extension.
base64StringBase64 format of the image for upload.
ratingStringRating of the product.

Use Case

This function adds or imports customer reviews for products manually. Typical scenarios include migrating reviews from another system, adding verified purchase reviews, or importing professional product evaluations. The function handles multiple reviews in batch operations and supports media attachments for visual verification or demonstration of product use. It's particularly valuable for seeding initial reviews on new products or maintaining review quality standards.

def add_product_review():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        product_review_data = ProductReviewCreateDTO(
            product=ProductReviewDTO(
                reviews=[
                    ProductReviewDataDTO(
                        name="CUSTOMER_NAME",
                        email="CUSTOMER_EMAIL",
                        review="PRODUCT_REVIEW",
                        file=[
                            MediaAssetDTO(
                                filename="IMAGE.jpg",
                                base64="BASE64_IMAGE"
                            )
                        ],
                        rating=PRODUCT_RATING
                    )
                ]
            )
        )
        response = webcommander_sdk.admin_product.add_review(id="PRODUCT_ID", request_data=
                                                             product_review_data)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response returns the successfully created review data, with system-generated identifiers and processed media references. The response confirms all review elements were properly stored.

ProductReviewCreateDTO(
    product=ProductReviewDTO(
        reviews=[
            ProductReviewDataDTO(
                id="REVIEW_ID",
                name='CUSTOMER_NAME',
                email='CUSTOMER_EMAIL',
                review='PRODUCT_REVIEW_TEXT',
                file=[
                    MediaAssetDTO(
                        id=MEDIA_ASSET_ID,
                        filename='MEDIA_FILENAME',
                        thumbnail='MEDIA_THUMBNAIL'
                    )
                ],
                rating=RATING_VALUE
            )
        ]
    )
)

Creating a New Product

Function: create_product_new()

Purpose

This function is used to create and configure a new product within the system. It supports detailed customization, including product type, pricing, stock management, media attachments, SEO settings, availability conditions, restrictions, and tagging. This comprehensive creation method ensures all necessary product attributes are set from the beginning, enabling full control over how the product appears and behaves in the store.

Parameters

ParameterTypeDescription
nameStringName of the product.
skuStringStock Keeping Unit (unique identifier for inventory management).
headingStringCustom product heading for display purposes.
parentsListParent category or collection association.
createdByCommonStructureDTOInformation about the user or system creating the product.
productTypeStringDefines the product as "PHYSICAL" or "DIGITAL".
availableBooleanWhether the product is available for purchase.
productPageCommonStructureDTOAssociated page configuration for the product.
productLayoutCommonStructureDTOSpecific layout configuration for displaying the product.
customClassListCustom CSS classes for frontend customization.
availableOnDateRangeBooleanWhether availability is tied to specific dates.
availableFromDateStringStart date when the product becomes available.
availableToDateStringEnd date when the product is no longer available.
availableForStringAvailability targeting ("everyone" or "selected" customers).
selectedCustomersSelectedCustomersCreationTOList of customers and groups allowed to access the product.
restrictForSelectedCustomersBooleanWhether to restrict visibility for selected customers only.
passwordProtectedBooleanIf true, product access requires a password.
passwordStringPassword required to access the product.
availableOnWeekdaysProductAvailableWeekdaysDataDTOSpecific weekdays and times the product is available.
basePriceFloatBase selling price of the product.
costPriceFloatInternal cost price of the product.
administrativeStatusBooleanAdministrative control flag for internal management.
productSummaryStringShort summary or description shown on the product listing.
productDescriptionStringDetailed product description shown on the product page.
productPropertiesProductPropertiesDTOAdditional physical and marketing properties.
productPricingAndStockProductCreatePricingAndStockDTODetailed configuration of inventory, pricing, and promotions.
imageAndVideoProductMediaCollectionDTOProduct images, videos, and specifications documents.
advancedProductAdvancedDataDTOAdvanced settings like meta tags and tracking preferences.
relatedProductsListProducts related to this one for upselling.
similarProductsListProducts similar to this one for recommendations.
seoConfigsSeoConfigCreationDataDTOSEO configurations for better search engine visibility.
tagsListProduct tags for categorization and search optimization.
customPropertiesListAdditional custom attributes.

Use Case

The function is mainly used when a new product needs to be introduced into the catalog with a full set of detailed attributes right from the start. It is especially useful in scenarios where the product has strict availability windows, limited access to specific customers, or custom pricing and promotions that need to be managed from the beginning. This function can handle more complex requirements, such as associating SEO configurations, tagging, linking related and similar products, and even handling advanced settings like loyalty points or disabling tracking. It is ideal for launching a new product, migrating a complete set of products from another system, or setting up exclusive products for selected customer groups in e-commerce platforms that require robust inventory and pricing management.

def create_product_new():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        product_data = ProductCreateDataDTO(
            name="PRODUCT_NAME",
            sku="PRODUCT_SKU",
            heading="PRODUCT_HEADING",
            parents=[ParentDataDTO(id=PARENT_ID)],
            createdBy=CommonStructureDTO(id="CREATOR_ID", name="CREATOR_NAME"),
            productType="PHYSICAL",
            available=True,
            productPage=CommonStructureDTO(id="PAGE_ID"),
            productLayout=CommonStructureDTO(id="LAYOUT_ID"),
            customClass=["CUSTOM_CLASS"],
            availableOnDateRange=True,
            availableFromDate="AVAILABLE_FROM_DATE",
            availableToDate="AVAILABLE_TO_DATE",
            availableFor="SELECTED",
            selectedCustomers=SelectedCustomersCreationTO(
                customers=[CUSTOMER_ID],
                groups=["GROUP_ID"]
            ),
            restrictForSelectedCustomers=True,
            passwordProtected=True,
            password="PRODUCT_PASSWORD",
            availableOnWeekdays=ProductAvailableWeekdaysDataDTO(
                enabled=True,
                weekdays=[
                    WeekdaysDataDTO(day="DAY_NAME", startHour=START_HOUR, startMinute=START_MINUTE, endHour=END_HOUR, endMinute=END_MINUTE)
                ]
            ),
            basePrice=BASE_PRICE,
            costPrice=COST_PRICE,
            administrativeStatus=True,
            productSummary="PRODUCT_SUMMARY",
            productDescription="PRODUCT_DESCRIPTION",
            productProperties=ProductPropertiesDTO(
                featuredProduct=True,
                featuredProductLabel="FEATURED_LABEL",
                newProduct=True,
                soldOut=True,
                soldOutLabel="SOLD_OUT_LABEL",
                model="PRODUCT_MODEL",
                length=PRODUCT_LENGTH,
                width=PRODUCT_WIDTH,
                height=PRODUCT_HEIGHT,
                weight=PRODUCT_WEIGHT
            ),
            productPricingAndStock=ProductCreatePricingAndStockDTO(
                trackInventory=True,
                availableStock=AVAILABLE_STOCK,
                lowLevelStock=LOW_LEVEL_STOCK,
                minimumOrderQuantity=MINIMUM_ORDER_QUANTITY,
                maximumOrderQuantity=MAXIMUM_ORDER_QUANTITY,
                taxProfile="TAX_PROFILE_ID",
                shippingProfile=ShippingProfileDataDTO(id=SHIPPING_PROFILE_ID, name="SHIPPING_PROFILE_NAME"),
                enableMultipleOrder=True,
                multipleOrderQuantity=MULTIPLE_ORDER_QUANTITY,
                onSale=True,
                onSalePriceType="PERCENTAGE",
                onSalePrice=SALE_PRICE,
                expectedToPay=True,
                expectedToPayPrice=EXPECTED_PAY_PRICE,
                enableCallForPrice=True,
                restrictPriceFor="SELECTED_CUSTOMERS",
                restrictPriceForSelectedCustomers=["CUSTOMER_ID_1", "CUSTOMER_ID_2"],
                restrictPurchaseFor="SELECTED_CUSTOMERS",
                restrictPurchaseForSelectedCustomers=["CUSTOMER_ID_1", "CUSTOMER_ID_2"],
                hidePrice=True,
                variationPrice=ProductVariationPriceDTO(
                    label="VARIATION_LABEL",
                    displayType="DISPLAY_TYPE"
                ),
                enableLiteVariation=True
            ),
            imageAndVideo=ProductMediaCollectionDTO(
                images=[
                    MediaAssetDTO(
                        filename="IMAGE_FILENAME.jpg",
                        base64="BASE64_ENCODED_IMAGE"
                    )
                ],
                videos=[
                    VideoAssetDTO(
                        video="BINARY_VIDEO_FILE",
                        metadata='{"title": "VIDEO_TITLE", "description": "VIDEO_DESCRIPTION"}'
                    )
                ],
                spec=[
                    MediaAssetDTO(
                        filename="SPEC_FILENAME.sql",
                        base64="BASE64_ENCODED_SPEC_FILE"
                    )
                ]
            ),
            advanced=ProductAdvancedDataDTO(
                advanceInformation=AdvanceInformationDataDTO(
                    globalTradeItemNumber="GTIN_NUMBER",
                    productCondition="new"
                ),
                webtoolDisableTracking=True,
                metaTags=[
                    MetaTagDataDTO(name="META_TAG_NAME", value="META_TAG_VALUE", id=META_TAG_ID)
                ]
            ),
            relatedProducts=[
                RelatedOrSimilarProductDTO(
                    id=RELATED_PRODUCT_ID,
                    name="RELATED_PRODUCT_NAME",
                    url="RELATED_PRODUCT_URL"
                )
            ],
            similarProducts=[
                RelatedOrSimilarProductDTO(
                    id=SIMILAR_PRODUCT_ID,
                    name="SIMILAR_PRODUCT_NAME",
                    url="SIMILAR_PRODUCT_URL"
                )
            ],
            seoConfigs=SeoConfigCreationDataDTO(
                url=None,
                overwriteSeoSettings=True,
                seoTitle="SEO_TITLE",
                seoDescription="SEO_DESCRIPTION",
                disableSearchEngineIndexing=True,
                canocialUrl=CanonicalURLsDTO(
                    enabled=True,
                    canonicalUrls=[]
                ),
                metaTag=SeoMetaTagDTO(
                    enabled=True,
                    metaTags=[]
                )
            ),
            tags=[
                TagDTO(
                    name="TAG_NAME",
                    values=["TAG_VALUE_1", "TAG_VALUE_2"],
                    displayInProductPage=True,
                    enableExpandedView=True
                )
            ],
            customProperties=[
                CustomPropertyDTO(
                    label="CUSTOM_PROPERTY_LABEL",
                    description="CUSTOM_PROPERTY_DESCRIPTION"
                )
            ]
        )

        response = webcommander_sdk.admin_product.create(request_data=product_data)
        print(response)

    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

ProductResponseDTO(
    product=ProductDataDTO(
        id="PRODUCT_ID",
        name="PRODUCT_NAME",
        sku="PRODUCT_SKU",
        heading="PRODUCT_HEADING",
        productType="PHYSICAL",
        available=True,
        basePrice=BASE_PRICE,
        costPrice=COST_PRICE,
        availableStock=AVAILABLE_STOCK,
        availableOnDateRange=True,
        availableOnWeekdays=ProductAvailableWeekdaysDataDTO(
            enabled=True,
            weekdays=[
                WeekdaysDataDTO(day="DAY_NAME", startHour=START_HOUR, startMinute=START_MINUTE, endHour=END_HOUR, endMinute=END_MINUTE)
            ]
        ),
        productSummary="PRODUCT_SUMMARY",
        productDescription="PRODUCT_DESCRIPTION",
        createdBy=CommonStructureDTO(id="CREATOR_ID", name="CREATOR_NAME"),
        createdAt="CREATION_TIMESTAMP",
        updatedAt="UPDATED_TIMESTAMP",
        administrativeStatus=True,
        passwordProtected=True,
        productPricingAndStock=ProductPricingAndStockDTO(
            trackInventory=True,
            availableStock=AVAILABLE_STOCK,
            minimumOrderQuantity=MINIMUM_ORDER_QUANTITY,
            maximumOrderQuantity=MAXIMUM_ORDER_QUANTITY,
            onSale=False,
            hidePrice=True,
            restrictPriceFor="SELECTED_CUSTOMERS"
        ),
        seoConfigs=[],
        relatedProducts=[
            RelatedOrSimilarProductDTO(id=RELATED_PRODUCT_ID, name="RELATED_PRODUCT_NAME", url="RELATED_PRODUCT_URL")
        ],
        similarProducts=[
            RelatedOrSimilarProductDTO(id=SIMILAR_PRODUCT_ID, name="SIMILAR_PRODUCT_NAME", url="SIMILAR_PRODUCT_URL")
        ],
        tags=[],
        customProperties=[]
    )
)

Updating Product Details

Function: update_product()

Purpose

This function updates the details of an existing product in the catalog, allowing modifications across general information, availability settings, pricing and stock configuration, SEO settings, customer-specific visibility, associated media (images/videos), and additional metadata. It supports both minor changes, such as stock quantity or sale price adjustments, and major revisions like product rebranding or feature expansion.

Parameters

ParameterTypeDescription
idStringUnique identifier of the product to be updated.
nameStringProduct name.
skuStringStock Keeping Unit, unique identifier for inventory tracking.
headingStringProduct heading or title.
parentsList of ParentDataDTOList of parent categories the product belongs to.
createdByCommonStructureDTOMetadata about who created the product.
productTypeStringType of product: PHYSICAL, DIGITAL, etc.
availableBooleanWhether the product is available for sale.
productPageCommonStructureDTOThe page template where the product appears.
productLayoutCommonStructureDTOLayout design used to present the product.
customClassList of StringCustom CSS classes for specific styling.
availableOnDateRangeBooleanWhether product availability is controlled by date range.
availableFromDateString (ISO datetime)Start date and time when the product becomes available.
availableToDateString (ISO datetime)End date and time after which the product is no longer available.
availableForStringScope of availability: "everyone" or "selected" customers.
selectedCustomersSelectedCustomersCreationTOCustomers and groups allowed to access the product.
restrictForSelectedCustomersBooleanIf true, restricts product visibility to selected customers only.
passwordProtectedBooleanWhether the product is protected with a password.
passwordStringPassword required to view the product.
availableOnWeekdaysProductAvailableWeekdaysDataDTOSpecific weekdays and times when the product is available.
basePriceFloatBase price of the product before discounts or promotions.
costPriceFloatInternal cost value (for internal tracking only).
administrativeStatusBooleanStatus indicating if the product is administratively active.
productSummaryStringShort summary description of the product.
productDescriptionStringDetailed, full product description.
productPropertiesProductPropertiesDTOPhysical dimensions and product labeling information.
productPricingAndStockProductCreatePricingAndStockDTOConfiguration for pricing, inventory, taxes, shipping, sales, and purchase limits.
imageAndVideoProductMediaCollectionDTOProduct images, videos, and specification documents.
advancedProductAdvancedDataDTOAdvanced settings such as meta tags, tracking, and condition information.
relatedProductsList of RelatedOrSimilarProductDTORelated products to suggest cross-sells or bundles.
similarProductsList of RelatedOrSimilarProductDTOSimilar products for recommendations.
seoConfigsSeoConfigCreationDataDTOSEO settings including titles, descriptions, and search indexing options.
tagsList of TagDTOTags assigned to the product to assist with searchability and categorization.
customPropertiesList of CustomPropertyDTOCustom fields to extend the product attributes.

Use Case

This function is typically used when businesses need to modify product details either due to operational updates or strategic changes. For example, companies may use it to refresh product content after rebranding, apply new marketing descriptions, launch limited-time sales, or manage availability windows for exclusive customer groups. It also supports complex scenarios like setting product access via password protection, restricting availability by customer group, and fine-tuning stock management through minimum/maximum order quantities. Whether updating a few fields such as adjusting sale prices, or completely overhauling a product's description, media, SEO metadata, and customer targeting, this function provides a comprehensive solution for maintaining and evolving the online product catalog.

def update_product():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        product_data = ProductCreateDataDTO(
            name="PRODUCT_NAME",
            sku="PRODUCT_SKU",
            heading="PRODUCT_HEADING",
            parents=[ParentDataDTO(id=PARENT_ID)],
            createdBy=CommonStructureDTO(id="CREATED_BY_ID", name="CREATED_BY_NAME"),
            productType="PRODUCT_TYPE",
            available=True,
            productPage=CommonStructureDTO(id="PRODUCT_PAGE_ID"),
            productLayout=CommonStructureDTO(id="PRODUCT_LAYOUT_ID"),
            customClass=["CUSTOM_CLASS"],
            availableOnDateRange=True,
            availableFromDate="AVAILABLE_FROM_DATE",
            availableToDate="AVAILABLE_TO_DATE",
            availableFor="AVAILABLE_FOR_SCOPE",
            selectedCustomers=SelectedCustomersCreationTO(
                customers=[CUSTOMER_ID],
                groups=["GROUP_ID"]
            ),
            restrictForSelectedCustomers=True,
            passwordProtected=True,
            password="PRODUCT_PASSWORD",
            availableOnWeekdays=ProductAvailableWeekdaysDataDTO(
                enabled=True,
                weekdays=[
                    WeekdaysDataDTO(day="DAY_1", startHour=START_HOUR, startMinute=START_MINUTE, endHour=END_HOUR, endMinute=END_MINUTE),
                    WeekdaysDataDTO(day="DAY_2", startHour=START_HOUR, startMinute=START_MINUTE, endHour=END_HOUR, endMinute=END_MINUTE)
                ]
            ),
            basePrice=BASE_PRICE,
            costPrice=COST_PRICE,
            administrativeStatus=True,
            productSummary="PRODUCT_SUMMARY",
            productDescription="PRODUCT_DESCRIPTION",
            productProperties=ProductPropertiesDTO(
                featuredProduct=True,
                featuredProductLabel="FEATURED_LABEL",
                newProduct=True,
                soldOut=True,
                soldOutLabel="SOLD_OUT_LABEL",
                model="PRODUCT_MODEL",
                length=PRODUCT_LENGTH,
                width=PRODUCT_WIDTH,
                height=PRODUCT_HEIGHT,
                weight=PRODUCT_WEIGHT
            ),
            productPricingAndStock=ProductCreatePricingAndStockDTO(
                trackInventory=True,
                availableStock=AVAILABLE_STOCK,
                lowLevelStock=LOW_LEVEL_STOCK,
                minimumOrderQuantity=MIN_ORDER_QUANTITY,
                maximumOrderQuantity=MAX_ORDER_QUANTITY,
                taxProfile="TAX_PROFILE_ID",
                shippingProfile=ShippingProfileDataDTO(id=SHIPPING_PROFILE_ID, name="SHIPPING_PROFILE_NAME"),
                enableMultipleOrder=True,
                multipleOrderQuantity=MULTIPLE_ORDER_QUANTITY,
                onSale=True,
                onSalePriceType="SALE_PRICE_TYPE",
                onSalePrice=SALE_PRICE,
                expectedToPay=True,
                expectedToPayPrice=EXPECTED_TO_PAY_PRICE,
                enableCallForPrice=True,
                restrictPriceFor="RESTRICT_PRICE_FOR_SCOPE",
                restrictPriceForSelectedCustomers=["CUSTOMER_ID_1", "CUSTOMER_ID_2"],
                restrictPurchaseFor="RESTRICT_PURCHASE_FOR_SCOPE",
                restrictPurchaseForSelectedCustomers=["CUSTOMER_ID_1", "CUSTOMER_ID_2"],
                hidePrice=True,
                variationPrice=ProductVariationPriceDTO(
                    label="VARIATION_LABEL",
                    displayType="DISPLAY_TYPE"
                ),
                enableLiteVariation=True
            ),
            imageAndVideo=ProductMediaCollectionDTO(
                images=[
                    MediaAssetDTO(
                        filename="IMAGE_FILENAME",
                        base64="IMAGE_BASE64_STRING"
                    )
                ],
                videos=[
                    VideoAssetDTO(
                        video="<VIDEO_BINARY>",
                        metadata='{ "title": "VIDEO_TITLE", "description": "VIDEO_DESCRIPTION" }'
                    )
                ],
                spec=[
                    MediaAssetDTO(
                        filename="SPEC_FILENAME",
                        base64="SPEC_BASE64_STRING"
                    )
                ]
            ),
            advanced=ProductAdvancedDataDTO(
                advanceInformation=AdvanceInformationDataDTO(
                    globalTradeItemNumber="GTIN_NUMBER",
                    productCondition="PRODUCT_CONDITION"
                ),
                webtoolDisableTracking=True,
                metaTags=[
                    MetaTagDataDTO(name="META_TAG_NAME", value="META_TAG_VALUE", id=META_TAG_ID)
                ]
            ),
            relatedProducts=[
                RelatedOrSimilarProductDTO(
                    id=RELATED_PRODUCT_ID,
                    name="RELATED_PRODUCT_NAME",
                    url="RELATED_PRODUCT_URL"
                )
            ],
            similarProducts=[
                RelatedOrSimilarProductDTO(
                    id=SIMILAR_PRODUCT_ID,
                    name="SIMILAR_PRODUCT_NAME",
                    url="SIMILAR_PRODUCT_URL"
                )
            ],
            seoConfigs=SeoConfigCreationDataDTO(
                url=None,
                overwriteSeoSettings=True,
                seoTitle="SEO_TITLE",
                seoDescription="SEO_DESCRIPTION",
                disableSearchEngineIndexing=True,
                canocialUrl=CanonicalURLsDTO(
                    enabled=True,
                    canonicalUrls=[]
                ),
                metaTag=SeoMetaTagDTO(
                    enabled=True,
                    metaTags=[]
                )
            ),
            tags=[
                TagDTO(
                    name="TAG_NAME",
                    values=["TAG_VALUE_1", "TAG_VALUE_2"],
                    displayInProductPage=True,
                    enableExpandedView=True
                )
            ],
            customProperties=[
                CustomPropertyDTO(
                    label="CUSTOM_PROPERTY_LABEL",
                    description="CUSTOM_PROPERTY_DESCRIPTION"
                )
            ]
        )

        response = webcommander_sdk.admin_product.update(id="PRODUCT_ID", request_data=product_data)
        print(response)

    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

ProductDataDTO(
    administrativeStatus=True,
    advanced=ProductAdvancedDataDTO(
        advanceInformation=AdvanceInformationDataDTO(
            globalTradeItemNumber=None,
            productCondition='PRODUCT_CONDITION',
            loyaltyPoints=None
        ),
        webtoolDisableTracking=False,
        metaTags=[],
        customInformation=None
    ),
    available=True,
    availableFor='AVAILABLE_FOR_SCOPE',
    availableFromDate=None,
    availableStock=None,
    availableToDate=None,
    availableOnDateRange=True,
    availableOnWeekdays=ProductAvailableWeekdaysDataDTO(
        enabled=True,
        weekdays=[
            WeekdaysDataDTO(day='DAY_1', startHour=START_HOUR, startMinute=START_MINUTE, endHour=END_HOUR, endMinute=END_MINUTE),
            WeekdaysDataDTO(day='DAY_2', startHour=START_HOUR, startMinute=START_MINUTE, endHour=END_HOUR, endMinute=END_MINUTE)
        ]
    ),
    basePrice=BASE_PRICE,
    costPrice=COST_PRICE,
    createdBy=CommonStructureDTO(id="CREATED_BY_ID", name="CREATED_BY_NAME"),
    createdAt='CREATED_AT_TIMESTAMP',
    customClass=None,
    customProperties='',
    heading='PRODUCT_HEADING',
    height='PRODUCT_HEIGHT',
    id=PRODUCT_ID,
    imageAndVideo=ProductMediaDTO(images=[], videos=[], specs=[]),
    isOnSale=False,
    length='PRODUCT_LENGTH',
    name='PRODUCT_NAME',
    parents=[],
    password='PRODUCT_PASSWORD',
    passwordProtected=True,
    productPricingAndStock=ProductPricingAndStockDTO(
        availableStock=AVAILABLE_STOCK,
        enableCallForPrice=False,
        enableMultipleOrder=True,
        expectedToPay=False,
        expectedToPayPrice=0.0,
        hidePrice=False,
        lowLevelStock=LOW_LEVEL_STOCK,
        maximumOrderQuantity=MAX_ORDER_QUANTITY,
        minimumOrderQuantity=MIN_ORDER_QUANTITY,
        multipleOrderQuantity=1,
        onSale=False,
        onSalePrice=0.0,
        onSalePriceType='SALE_PRICE_TYPE',
        restrictPriceFor='SELECTED_CUSTOMERS',
        restrictPriceForExceptCustomers=[],
        restrictPurchaseFor='SELECTED_CUSTOMERS',
        restrictPurchaseForSelectedCustomers=[],
        shippingProfile=ShippingProfileDataDTO(id=None, name=None),
        taxProfile={},
        trackInventory=True,
        variationPrice=None
    ),
    productLayout=CommonStructureDTO(id=None, name=None),
    productSummary='PRODUCT_SUMMARY',
    productDescription='PRODUCT_DESCRIPTION',
    productPage=CommonStructureDTO(id="PRODUCT_PAGE_ID", name="PRODUCT_PAGE_NAME"),
    productType='PRODUCT_TYPE',
    productVariation=False,
    restrictPriceFor=None,
    restrictPurchaseFor=None,
    restrictForSelectedCustomers=[],
    relatedProducts=[
        RelatedOrSimilarProductDTO(
            id=RELATED_PRODUCT_ID,
            name='RELATED_PRODUCT_NAME',
            url='RELATED_PRODUCT_URL'
        )
    ],
    reviews=[],
    similarProducts=[
        RelatedOrSimilarProductDTO(
            id=SIMILAR_PRODUCT_ID,
            name='SIMILAR_PRODUCT_NAME',
            url='SIMILAR_PRODUCT_URL'
        )
    ],
    selectedCustomers=SelectedCustomersDataDTO(
        customers=[CommonStructureDTO(id=16, name='CUSTOMER_NAME')],
        groups=[CommonStructureDTO(id=4, name='GROUP_NAME')]
    ),
    salePrice=0.0,
    seoConfigs=[],
    sku='PRODUCT_SKU',
    soldOut=False,
    soldOutLabel=None,
    summary=None,
    tags=[],
    url=None,
    updatedAt='UPDATED_AT_TIMESTAMP',
    videos=None,
    width='PRODUCT_WIDTH',
    weight='PRODUCT_WEIGHT'
)