Get Decoration Method List

Get


/api/3/DecorationMethod/GetDecorationMethodList?websiteId={websiteId}&webApiClientKey={webApiClientKey}&sku={sku}&designId={designId}


The Get Decoration Method List API retrieves a list of decoration methods associated with a product, either based on a specific design ID or SKU. This API provides details on various decoration methods, their rendering types, and available templates.

This API is triggered when the products are added to cart on the webstore, after they are customized in the Artifi Designer.

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.

sku

This is a unique field to identify any product. In this field, users can send either

Product base SKU/ProductCode or Variant SKU. This field should be matched with the product available in Admin.

If Artifi receives the base product code/SKU and the product has variants, then we are sending back the default SKU details of that product.

designId

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.

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":"",

"Data":{

"templates":[

{

"ViewId":5378,

"Templates":[

{

"Name":"Front 1234",

"ImageUniqueName":"870b0111-e398-4f93-a593-ebffffa6bb5e.png",

"Code":"15638",

"DisplayImageUniqueName":null,

"DisplayName":null,

"DecorationMethodId":77,

"Id":15638

}

],

"DecorationMethods":[

{

"DecorationCode":"Default",

"RenderingTypeId":1,

"DecorationName":"Default",

"DisplayOrder":1,

"Id":77,

"IsSelected":true,

"RecolorLimit":null,

"Effects":null,

"TexturedImage":null,

"RestrictedFeatures":null

}

]

}

]

},

"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": "Data mismatch.",

  "Data": null,

  "ErrorCode": "242"

}

Did you find it helpful? Yes No

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