Skip to main content

Colorway

ColorwayDelete ColorwayCurrentGet ColorwayCurrentSet ...

Updated over 2 months ago

ColorwayDelete

Delete an existing colorway.

Python C++ C# VS Server

Python

BwApi.ColorwayDelete(garmentId, colorwayId)

C++

BwApiColorwayDelete(garmentId, colorwayId);

C#

BwApi.ColorwayDelete(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayDelete",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

The colorway ID to delete

Error/success code (see BwApiErrorCodes enum).

ColorwayCurrentGet

Gets the current active colorway.

Python C++ C# VS Server

Python

BwApi.ColorwayCurrentGet(garmentId)

C++

BwApiColorwayCurrentGet(garmentId);

C#

BwApi.ColorwayCurrentGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayCurrentGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

colorwayId

Active colorway ID

Error/success code (see BwApiErrorCodes enum).

ColorwayCurrentSet

Sets the current colorway.

Python C++ C# VS Server

Python

BwApi.ColorwayCurrentSet(garmentId, colorwayId)

C++

BwApiColorwayCurrentSet(garmentId, colorwayId);

C#

BwApi.ColorwayCurrentSet(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayCurrentSet",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

Error/success code (see BwApiErrorCodes enum).

ColorwayClone

Clone a colorway.

Python C++ C# VS Server

Python

BwApi.ColorwayClone(garmentId, colorwayId)

C++

BwApiColorwayClone(garmentId, colorwayId);

C#

BwApi.ColorwayClone(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayClone",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

The colorway ID to clone

Out

newColorwayId

The ID of the cloned colorway

Error/success code (see BwApiErrorCodes enum).

ColorwayMaterialIds

Get a list of material IDs from the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayMaterialIds(garmentId, colorwayId)

C++

BwApiColorwayMaterialIds(garmentId, colorwayId);

C#

BwApi.ColorwayMaterialIds(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayMaterialIds",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

Out

materialIds

Array of int containing the material IDs

error/success code (see BwApiErrorCodes enum).

This function returns only front materials.

If you want the back materials use BwApiColorwayUsedMaterialIdsEx.

ColorwayMaterialIdsEx

Get a list of material IDs from the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayMaterialIdsEx(garmentId, colorwayId, materialsSide)

C++

BwApiColorwayMaterialIdsEx(garmentId, colorwayId, materialsSide);

C#

BwApi.ColorwayMaterialIdsEx(garmentId, colorwayId, materialsSide);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayMaterialIdsEx",
	"params": {
		"garmentId": "value",
		"colorwayId": "value",
		"materialsSide": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

In

materialsSide

The side of the materials

Out

materialIds

Array of int containing the material IDs

Error/success code (see BwApiErrorCodes enum).

Updating front material will update the back as well.

Updating back material before front material, will update only the back and unlink the materials.

ColorwayNameGet

Get the name of the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayNameGet(garmentId, colorwayId)

C++

BwApiColorwayNameGet(garmentId, colorwayId);

C#

BwApi.ColorwayNameGet(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayNameGet",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

Out

colorwayName

Name of the colorway

Error/success code (see BwApiErrorCodes enum).

ColorwayNameSet

Set the name of the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayNameSet(garmentId, colorwayId, colorwayName)

C++

BwApiColorwayNameSet(garmentId, colorwayId, colorwayName);

C#

BwApi.ColorwayNameSet(garmentId, colorwayId, colorwayName);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayNameSet",
	"params": {
		"garmentId": "value",
		"colorwayId": "value",
		"colorwayName": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

In

colorwayName

Name of the colorway

Error/success code (see BwApiErrorCodes enum).

ColorwayColorsInUse

Get the colors in use in the given colorway.

Python C++ C# VS Server

Python

BwApi.ColorwayColorsInUse(garmentId, colorwayId)

C++

BwApiColorwayColorsInUse(garmentId, colorwayId);

C#

BwApi.ColorwayColorsInUse(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayColorsInUse",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

Out

colors

JSON object as a string that represents a list of color object (see Schema/color.json schema)

Error/success code (see BwApiErrorCodes enum).

ColorwayColorsInUseUpdate

Replace a color from the color in use with another.

Python C++ C# VS Server

Python

BwApi.ColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor)

C++

BwApiColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor);

C#

BwApi.ColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayColorsInUseUpdate",
	"params": {
		"garmentId": "value",
		"colorwayId": "value",
		"srcColor": "value",
		"destColor": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

In

srcColor

The source color

In

destColor

The destination color

Error/success code (see BwApiErrorCodes enum).

ColorwayUsedMaterialIds

Get a list of material IDs in use from the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayUsedMaterialIds(garmentId, colorwayId)

C++

BwApiColorwayUsedMaterialIds(garmentId, colorwayId);

C#

BwApi.ColorwayUsedMaterialIds(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayUsedMaterialIds",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

Out

materialIds

Array of int containing the material IDs

Error/success code (see BwApiErrorCodes enum).

This function returns only front materials.

If you want the back materials use BwApiColorwayUsedMaterialIdsEx.

ColorwayUsedMaterialIdsEx

Get a list of material IDs in use from the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayUsedMaterialIdsEx(garmentId, colorwayId, materialsSide)

C++

BwApiColorwayUsedMaterialIdsEx(garmentId, colorwayId, materialsSide);

C#

BwApi.ColorwayUsedMaterialIdsEx(garmentId, colorwayId, materialsSide);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayUsedMaterialIdsEx",
	"params": {
		"garmentId": "value",
		"colorwayId": "value",
		"materialsSide": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

In

materialsSide

The side of the materials

Out

materialIds

Array of int containing the material IDs

Error/success code (see BwApiErrorCodes enum).

Updating front material will update the back as well.

Updating back material before front material, will update only the back and unlink the materials.

ColorwayThumbnailExtract

Extract the thumbnail of the given colorway ID.

Python C++ C# VS Server

Python

BwApi.ColorwayThumbnailExtract(garmentId, colorwayId, path)

C++

BwApiColorwayThumbnailExtract(garmentId, colorwayId, path);

C#

BwApi.ColorwayThumbnailExtract(garmentId, colorwayId, path);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayThumbnailExtract",
	"params": {
		"garmentId": "value",
		"colorwayId": "value",
		"path": {
			"download_data": {
				"url": "URL",
				"sha256": "SHA256",
				"name": "NAME"
			}
		}
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

In

path

Path to the thumbnail output

Error/success code (see BwApiErrorCodes enum).

If thumbnail doesn't exist, use BwApiColorwayThumbnailGenerate first.

If the garment has changed, you might want to call BwApiColorwayThumbnailGenerate first.

ColorwayThumbnailGenerate

Generate a thumbnail replacing existing thumbnail if one already exists.

Python C++ C# VS Server

Python

BwApi.ColorwayThumbnailGenerate(garmentId, colorwayId)

C++

BwApiColorwayThumbnailGenerate(garmentId, colorwayId);

C#

BwApi.ColorwayThumbnailGenerate(garmentId, colorwayId);

VS Server

{
	"id": "API processing order number",
	"function": "ColorwayThumbnailGenerate",
	"params": {
		"garmentId": "value",
		"colorwayId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

colorwayId

Existing colorway ID

Error/success code (see BwApiErrorCodes enum).

Did this answer your question?