The Deactivate Product command allows you to change the status of an active product in a catalog to inactive.
The Deactivate Product in Catalog command requires the following arguments: Catalog ID and Project ID.
api_web?r=myrealm&p=mypass&c=deactivate_product&product_id=2020ABCxyz&catalog_id=68
The command is ‘deactivate_product', the realm is ‘myrealm’ and the password is ‘mypass’. The Product with ID ‘2020ABCxyz’ in the catalog with ID ‘68’ will be set to inactive status.
Example
Using deactivate_product with all commands and arguments (please note the command is wrapped for display purposes only):
api_web?r=myrealm&p=mypass&c=deactivate_product&product_id=2020ABCxyz&catalog_id=68
Successful results return:
SUCCESS: Product Deactivated (product_id: 2020ABCxyz, catalog_id: 68)
Results
The Deactivate Product in Catalog command outputs either a SUCCESS or FAILURE message.
Success
The command success message returns the SUCCESS message. The result format is:
SUCCESS: Product Deactivated (product_id: [product_feed_id], catalog_id: [catalog_id])
Failure
The command will fail if a Product with the ID does not exist, required data is missing, the Catalog does not exist, or invalid data is defined. The result format is:
FAILURE: [Reason]
Arguments
The command supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd=listattrcreate c=listattrcreate |
Realm |
Yes |
Name of the realm to run the command. This is required, and the command will fail if the realm and password do not match. |
realm=[realm_name] r=[realm_name] |
Password |
Yes |
Authentication code for API access. This is required, and the command will fail if the realm and password do not match. |
pwd=[password] p=[password] |
Product ID | Yes | Unique ID for the product item. |
product_id=[string] |
Catalog ID | Yes | Unique ID for the grouping of product items into a Catalog. |
catalog_id=[integer] |
Feature added in v15.14.00.