Get Product Design List

Get


/api/3/Design/GetProductDesignList?websiteId={websiteId}&webApiClientKey={webApiClientKey}&productCode={productCode}&userId={userId}&orderStatus={orderStatus}&pageSize={pageSize}&pageIndex={pageIndex}&isLoadByProductCode={isLoadByProductCode}


The Get Product Design List API retrieves a list of customized designs for a specific product, based on the product's code and other parameters.

This is particularly useful for fetching user-specific designs, including drafts, saved designs, and designs associated with orders or 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.

productCode

This method returns the list of fonts that are available to a particular product. The code of that product should be specified in this parameter.

userId

This is 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

orderStatus

This is the string of the order status to be updated in Artifi. Below are the orderStatus parameters that need to be passed in the string. 

  • Placed: This parameter is used for checkout.

  • InProgress: This parameter is used for Add to Cart.

  • Draft: This parameter is used for Save Design.

  • Email: This parameter is used for Send Email.

This value needs to be provided from Artifi. Constant only having 'orderStatus_' as a suffix of the key.

pageSize

These are optional parameters

If these parameters are not passed then the user would get all the customized product data collection in the ascending order.

If PageIndex and PageSize are passed then only the related list would load.

pageIndex

These are optional parameters

If these parameters are not passed then the user would get all the customized product data collection in the ascending order.

If PageIndex and PageSize are passed then only the related list would load

isLoadByProductCode


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": "Get product design list successfully.",

  "Data": {

    "DesignList": [

      {

        "Sku": null,

        "Name": "",

        "ImageUniqueName": "34c64764-2a28-4b64-8785-6a25a8ac8d3f.png",

        "DesignId": 1081344

      },

      {

        "Sku": null,

        "Name": "",

        "ImageUniqueName": "bf539e08-c953-4ed4-b5c0-725b2b6f83b6.png",

        "DesignId": 875700

      }

    ],

    "TotalCount": 2

  },

  "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 User Id:  

{

  "Response": "Error",

  "Message": "Invalid user id.",

  "Data": null,

  "ErrorCode": "227"

 }


Invalid website id:

 {

  "Response": "Error",

  "Message": "Invalid website id.",

  "Data": null,

  "ErrorCode": "221,234"

 }

Did you find it helpful? Yes No

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