Get Stitch Count In Embroidery

GET Designer/Services/GetStitchCountInEmbroidery?websiteId={websiteId}&webApiClientKey={webApiClientKey}&clipartCode={ClipartCode}&imageuniqueName={imageuniqueName}&textJson={textJson}&height={Height}&width={Width}&isRemoveBackground={isRemoveBackground}


This api is used to get stitch and color count from clipart Code, user uploaded image and text.


The user of your e-commerce website can be registered or guest user. If the user is not registered with your website, it will be treated as a guest user.



Request Header Information

When any company gets registered with Artifi, Artifi will generate a special and unique key for that company which will be called as Private key.


NameDescriptions
token

This Private key will be provided by Artifi Administrator to Client.

This Private key will be used for client(company) authentication and will be called as token.



Request Information

Parameters


NameDescriptions
websiteId

This is the website with which clipart code is associated.

Admin user of Artifi can create one or more websites and assign products to each of the websites. The Id of the website with which user 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's(company) authentication and will be called as WebApiClientKey.


clipartCode [Optional Parameter]

It is an optional parameter which has default value as empty string.

Every clipart has clipart code associated with it.

It is used to get the details associated with the particular clipart.


imageuniqueName [Optional Parameter]

It is an optional parameter which has default value as empty string

Every uploaded user photo has imageuniqueName. Need to pass with image extenstion.

It is used to get the details associated with the particular user uploaded photo.


textJson [Optional Parameter]

It is an optional parameter which has default value as empty string

It will contain text property json.

It is used to get the details associated with the particular given json.

It should be pass by encode uri component.

Example: {"Text":"Artifi","TextAlign":"left","FontFamily":"impact","FontSize":26,"TextColor":"#cf21cf"}


height [Optional Parameter]

It is an optional parameter which has default value as clipart's height,

height will be used to calculate stitch count of clipart.


width [Optional Parameter]

It is an optional parameter which has default value as clipart's width,

height will be used to calculate stitch count of clipart.



isRemoveBackground [Optional Parameter]

It is an optional parameter which has default value false, it removes white background from clipart based on value set.

isRemoveBackground is a flag which can have only two values i.e., either true or false.



Response Information

Response body formats

application/json, text/json


Sample:
{
"Response":"Success",
"Message":"",
"Data":{"StitchCount":2908,"ColorCount":4,"ClipartCode":null,"ClipartName":null,"UserPhotoName":"7421343"},
"ErrorCode":null
}


FieldTypeDetails
StitchCountintStitch Count
ColorCountintColor Count
ClipartCodestringClipart Code
ClipartNamestringClipart Name
UserPhotoNamestringUserPhoto Name


On Failure

On failure, this method will return the following response based on parameters.


If the webApiClientKey is passed as null or not provided, then it will give the response.

{
    "Response": "Error",
    "Message": "Invalid webApiclientKey.",
    "Data": null,
    "ErrorCode": "226"
}
                            
If the ClipartCode does not exist, then it will give the response.
{
  "Response": "Error",
  "Message": "Invalid Clipart Code.",
  "Data": null,
  "ErrorCode": "248"
}


If the ImageuniqueName does not exist, then it will give the response.
{
  "Response": "Error",
  "Message": "User photo name is invalid.",
  "Data": null,
  "ErrorCode": ""
}


If the websiteId does not exist, then it will give the response.
{
    "Response": "Error",
    "Message": "Invalid webApiclientKey.",
    "Data": null,
    "ErrorCode": "226"
}


If the webApiClientKey does not exist, then it will give the message.
{
    "Response": "Error",
    "Message": "WebApiclientKey should not be empty or null.",
    "Data": null,
    "ErrorCode": "205"
}

Did you find it helpful? Yes No

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