It allows you:
to get the Product Substitutes of a product
to create a new Product Substitute for one product
to update a Product Substitute for one product
to delete a Product Substitute for one product if it is allowed.
Actions can be done:
list
create
update
delete
Product Substitute fields
In SocrateCloud, a Product Substitute has the following structure:
URL: https://api.socratecloud.com/webapi/rest/product/substitute/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Columns that can be used as filters:
Organization (name)
Product_ID
Substitute_ID
Name
Description
At least one Parameter is mandatory.
Return: JSON object with next format:
{
"data": [
{
"Organization_ID": 1234567,
"OrganizationValue": "Test Org Value",
"Organization": "Test Org Name",
"Created": "2025-03-21 12:00:00+0000",
"CreatedBy_ID": 2345678,
"CreatedBy": "Test User",
"Updated": "2025-03-21 12:00:00+0000",
"UpdatedBy_ID": 3456789,
"UpdatedBy": "Test User",
"Active": true,
"Name": "Test Name Substitute",
"Description": "Test Description Substitute",
"Product_ID": 4567890,
"Substitute_ID": 5678900
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/product/substitute/create/{version}?Product_ID={product_id}&accessToken={access_token}
Method: POST
Parameter Product_ID is mandatory.
Return:
{
"data": "Test Name Substitute",
"id": 5678900
}
Data format:
{
"Organization_ID": 1234567,
"OrganizationValue": "Test Org Value",
"Organization": "Test Org Name",
"Active": true,
"Name": "Test Name Substitute",
"Description": "Test Description Substitute",
"Product_ID": 4567890,
"Substitute_ID": 5678900
}
Product_ID and Substitute_ID must be ids of existing active products.
Organization_ID or OrganizationValue or Organization (name) is mandatory.
Organization cannot be different from the one on the master Product.
URL: https://api.socratecloud.com/webapi/rest/product/substitute/update/{version}?Product_ID={product_id}&Substitute_ID={substitute_ID}&accessToken={access_token}
Method: POST
Parameters Product_ID and Substitute_ID are mandatory.
Product_ID and Substitute_ID must be ids of existing active products.
Return:
{
"data": "Test Name2 Substitute",
"id": 5678900
}
Data format:
{
"Active": true,
"Name": "Test Name2 Substitute",
"Description": "Test Description2 Substitute"
}
URL: https://api.socratecloud.com/webapi/rest/product/substitute/delete/{version}?Product_ID={product_id}&Substitute_ID={substitute_ID}&accessToken={access_token}
Method: POST
Parameter Substitute_ID is mandatory.
Parameter Product_ID is optional.
Return: "Deleted" for success or error message (starts with "Error: ").