Put
/api/3/Design/UpdateDesignStatus?websiteId={websiteId}&webApiClientKey={webApiClientKey}&designId={designId}&orderStatus={orderStatus}&userId={userId}
This API is used to update the status of the order from saved/added to cart to the current status of the order.
After customizing the product in the Artifi editor, one can save the product i.e. the product is added to the cart.
The cart lists products/items that have been selected for purchase during shopping, along with their prices and the total amount.
The order status of the product present in the cart will be ‘Added to cart’.
The status of the Order is changed dynamically based on the order journey, these statuses are then fetched to Artifi via this API.
This API requires a customized product’s ID, whose order status is to be changed and the ID of the associated website.
It returns the response object, which contains the status of the operation along with the message if any error occurs during this process.
Request Information
Parameters
Name | Description | ||||||||||||
WebsiteId (INT) | This param refers to the website associated with customized products. The admin user of Artifi can create one or more websites and assign products to each of them. The ID of the website with which specified customized products are associated should be specified in this parameter. | ||||||||||||
DesignIds (String) | This is the ID of the designed product that gets added to cart. Design ID is created when the user adds the customized product to the cart. | ||||||||||||
WebApiClientKey (String) | When any company registers with Artifi, Artifi will generate a special and unique key for that company, which will be called the client key. This client key can be found in the registered company's profile tab in the Artifi Account. The client key will be used for client (company) authentication and will be referred to as WebApiClientKey. | ||||||||||||
OrderStatus (Int) | This is the string representing the order status to be updated in Artifi. This value needs to be passed in the parameter. To convert the Added to Cart status into Checkout, provide the parameter with the value "Placed." This is the string representing the order status to be updated in Artifi. This value needs to be passed in the parameter. The status will be changed in the Artifi according to the value that is passed in this parameter. Below are the statuses based on the order journey that are received in the API response with their corresponding parameter values :
| ||||||||||||
UserId (STRING) | This will be the ID of the ecommerce website's user, whether it be a registered or a guest user. If the user is registered, pass the user ID in this parameter. If the user is not registered with the e-commerce website, create a temporary ID for the user and pass that temporary ID in this parameter. The non-registered user will be referred to as a guest user, and this will be their unique user ID. The method will return the product customized by the user whose ID is specified in this parameter. |
Response Information
Response body formats
On Success
On success, this method will call back the JavaScript method in the website which is specified in "successCallback" parameter with success Message.
{
"Response": "Success",
"Message": "Design status has been updated successfully.",
"Data": "",
"ErrorCode": ""
}
On Error
On error, this method will call back the JavaScript method in the website which is specified in "errorCallback" parameter with errorMessage.
{
"Response": "Error",
"Message": "Order status is incorrect. Please provide proper order status.",
"Data": null,
"ErrorCode": "236"
}