Delete Designs by UserId

HttpDelete


/api/3/Design/DeleteDesignsbyUserId?websiteId={websiteId}&webApiClientKey={webApiClientKey}&userId={userId}


This API is used to delete all the designs referenced by the user Id that is passed in the ‘userid’ parameter.
The API triggers when the user on the webstore removes their customized products from the cart.

Request Information

Parameters

Parameter 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.

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.

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 the "successCallback" parameter with success Message.

{

"Response": "Success",

"Message": "Design deleted successfully.",

"Data": null,

"ErrorCode": ""

}

On Error

On error, this method will call back the JavaScript method in the website which is specified in the "errorCallback" parameter with errorMessage.


Invalid Website

{

"Response": "Error",

"Message": "Invalid website id.",

"Data": null,

"ErrorCode": "221"

}


Invalid webapiclientkey

{

"Response": "Error",

"Message": "Invalid webapiclientkey.",

"Data": null,

"ErrorCode": "226"

}


Invalid User Id

{

"Response": "Error",

"Message": "Invalid user id.",

"Data": null,

"ErrorCode": "227"

}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.