After customizing the product in Artifi editor, one can save the product or add it to the cart. Cart lists products/items which have been selected for purchase during shopping along with their prices and the total amount.
The order status of the products present in the cart will be "Added to cart".
If user wants to place an order for the "single" product/item in cart, he/she will hit a related button to place an order. At this time the order status of the product needs to be changed from "Add to cart" to "Checked out".
This operation changes the order status of saved/added to cart product from "Add to cart" to "Checked out".
This operation requires customized product id whose order status is to be changed and id of the associated website. It returns the response object which contains status of the operation along with the message if any error occurs during this process.
Request Information
Parameters
Name | Description |
integrationValues | integrationValues should be the object and should contain the Artifi data, which will include the following values. This values are not case sensitive.
customizedProductId: Id of the customized (Saved/Added to cart) product. The product which is customized/designed using Artifi (Product customization tool) and saved or added to cart is called as customized product. Customized product will be listed in the cart and the order status of the product will be "Added to cart". This will be the product for which user wants to place an order. Order status of this product will get changed to "Checked out" after this operation.
websiteId: This is the website with which customized product is associated. Admin user of Artifi can create one or more websites and can assign products to each of the website. The Id of the website with which specified customized product is associated should be specified in this parameter.
webApiclientKey: When any company gets registered with Artifi, Artifi will generate a special and unique key for that company which will be called as client key. This client key will be found in registered company's profile tab in Artifi Account. This client key will be used for client(company) authentication and will be called as WebApiClientKey.
orderStatus: This is the string of the order status to be updated in Artifi. This value need to be provided from Artifi.Constant constants only having 'orderStatus_' as suffix of the key.
successCallback: After this operation i.e., changing order status of customized product to "checked out", this operation will return the response, if the response will be "Success", a JavaScript method, specified in this parameter will get called. If you want to perform some operation on the success of this method, create a JavaScript method and pass name of the method in this parameter.
errorCallback: Similar to suceesCallback, you have to provide name of the JavaScript method that is to be called if this operation i.e., changing order status of the customized product fails. |
Response Information
Response body formats
On Success
On success, this method will call back the JavaScript method in website which is specified in "successCallback" parameter with following information.
{ "Response": "Success", "Message": "Order Status is/are updated successfully", "Data": null, "ErrorCode": null }
On Error
On error, this method will call back the JavaScript method in website which is specified in "errorCallback" parameter with error information.