Product PUT

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/product-service/product/{ID}

Refer to our documentation on URI syntax for more information on how to construct URIs.

Description

This message allows you to update Products in Brightpearl. "Brightpearl" is the only supported Sales Channel.

Note: As part of adding protection against concurrent product updates, we recommend end users to send product version along with the product PUT request inside an 'if-match' header. In the Brightpearl system we check if the current product version matches the version the end user has sent, if it matches then will proceed further with the update or else an 412 precondition failed exception is thrown. The product version can be obtained by performing product GET request and accessing field 'version'.

Product Groups

When updating a Product over API, if a product with the same name exists then a new product-group will be created. The existing product and the product you are updating will be added to this new group product-group. If many products with the same name already exist then the product you are updating will be added to this product-group.

Product Variations

It is possible to update products with variations using this message. The validation you will need to be aware of is:

  • Option ID must exist
  • Option value ID must exist
  • Option value must be available for the option
  • Option must be available for the specified product type
  • Product cannot already exist in the product group with same option and option value combination
  • You can't have more than 4 options per product group

Field Description Required Default
brandId The ID of the brand for this product. False
collectionId The ID of the collection for this product. False The collection must belong to the product's brand.
productTypeId The ID of the product type. False Defaults to the Default Product Type ID configured in products Setup.
identity This section represents external identifying attributes of a product. False
identity.sku A Stock-Keeping Unit you wish to identify this product by. Max 32 characters. False
identity.ean International Article Number (formerly European Article Number) which identifies this product. Max 14 characters. False
identity.upc The Universal Product Code which identifies this product. Max 12 characters. False
identity.isbn The International Standard Book Number which identifies this product. Max 13 characters. False
identity.mpn The Manufacturing Product Number. Max 100 characters. False
identity.barcode A barcode number which identifies this product. Max 32 characters. False
stock This section is used to specify physical details about the product such as its weight and dimensions. False
stock.stockTracked Specifies if the product is stock tracked. False false
stock.weight Specifies details about the weight of the product. False
stock.weight.magnitude Specifies the weigth of the product. Currently no weight unit is specified within Brightpearl. We assume you use the same for all products. False
stock.dimensions.width Specifies the width of the product. The field is used when calculating the volume of the product. False
stock.dimensions.length Specifies the length of the product. The field is used when calculating the volume of the product. False
stock.dimensions.height Specifies the height of the product. The field is used when calculating the volume of the product. False
financialDetails This section specifies financial details of the product. True if your Brightpearl account is in VAT mode, False if in Sales Tax (taxable will default to false).
financialDetails.taxable When using Sales Tax this option specifies whether the product is taxable. False false.
financialDetails.taxCode This section is used when your Brightpearl account is in VAT Tax mode. It is used to specify the tax class for the product. You can either specify the ID or Code. False
financialDetails.taxCode.id Specifies the id for the tax code of this product. False.
financialDetails.taxCode.code Specifies the code for the tax code for this product. False.
salesChannels This section specifies a list of sales channels False
salesChannels.salesChannelName This specifies the name for the sales channel. Must be "Brightpearl". False
salesChannels.productName This specifies the name for the product. Max 128 characters. False
salesChannels.productCondition This specifies the condition of the product. Possible values are: 'new', 'used' and 'refurbished'. False New
salesChannels.categories This section specifies which product categories this product is a member of. False
salesChannels.categories.categoryCode This specifies the code of a category. False
salesChannels.description This section specifies the description of the product. This section is optional however if you include it you must include all sub attributes. False
salesChannels.description.languageCode The 2 letter ISO 3166-2 country code for the language of this description. False
salesChannels.description.text The body of the description. Can be HTML but must be well formed. Maximum 65,535 bytes when encoded as UTF-8. False
salesChannels.description.format The format of the body. Possible values: 'PLAINTEXT','HTML_FRAGMENT' and 'HTML_DOCUMENT'. False
salesChannels.shortDescription This section specifies the short description of the product. This section is optional however if you include it you must include all sub attributes. False
salesChannels.shortDescription.languageCode The 2 letter ISO 3166-2 country code for the language of this short description. False
salesChannels.shortDescription.text The body of the short description. Can be HTML but must be well formed. Maximum 65,535 bytes when encoded as UTF-8. False
salesChannels.shortDescription.format The format of the body. Possible values: 'PLAINTEXT','HTML_FRAGMENT' and 'HTML_DOCUMENT'. False
variations This field lists the options and option values that define the variation for this product. False
variations.optionId Specifies the ID of the Option this variation is for. Not required if no variations specified. False
variations.optionValueId Specifies the ID of the Option value this variation is for. Not required if no variations specified. False
seasonIds Specifies the IDs of the seasons for this product. Takes one or more integers. False
nominalCodeStock Specifies the IDs of the seasons for this product. Takes one or more integers. False
nominalCodePurchases Specifies the IDs of the seasons for this product. Takes one or more integers. False
nominalCodeSales Specifies the IDs of the seasons for this product. Takes one or more integers. False
composition Composition of the product i.e. is a bundle False
composition.bundleComponents Details the component products of the bundle. False
composition.bundleComponents.productId The productId of the bundle component product. True if we supply bundleComponents, False if we don't supply bundleComponents
composition.bundleComponents.productQuantity The quantity of bundle component product. True if we supply bundleComponents, False if we don't supply bundleComponents

Example 1

Product put.

Request URI

/product/1007

Request body

{
	"brandId": 34344,
	"collectionId": 5,
	"productTypeId": 1,
	"identity": {
		"sku": "SKU0001",
		"ean": "12323423",
		"upc": "543534563",
		"isbn": "54353453",
		"barcode": "45453"
	},
	"stock": {
		"stockTracked": true,
		"weight": {
			"magnitude": 4324.54
		},
		"dimensions": {
			"width": "2.25",
			"length": "2.25",
			"height": "8.50"
		}
	},
	"financialDetails": {
		"taxable": false,
		"taxCode": {
			"id": 7,
			"code": "T20"
		}
	},
	"salesChannels": [
		{
			"salesChannelName": "Brightpearl",
			"productName": "new name",
			"productCondition": "new",
			"categories": [
				{
					"categoryCode": "276"
				},
				{
					"categoryCode": "295"
				}
			],
			"description": {
				"languageCode": "en",
				"text": "

Some description

", "format": "HTML_FRAGMENT" }, "shortDescription": { "languageCode": "en", "text": "

Some description

", "format": "HTML_FRAGMENT" } } ], "seasonIds": [ 1, 2, 3 ], "nominalCodeStock": "1000", "nominalCodePurchases": "5000", "nominalCodeSales": "4000" }

Response

{
}

Example 2

updating a product with two options defined.

Request URI

/product/1007

Request body

{
	"brandId": 74,
	"productTypeId": 4,
	"financialDetails": {
		"taxCode": {
			"id": 1
		}
	},
	"salesChannels": [
		{
			"salesChannelName": "Brightpearl",
			"productName": "Product B",
			"productCondition": "new",
			"categories": [
				{
					"categoryCode": "276"
				}
			]
		}
	],
	"variations": [
		{
			"optionId": 2,
			"optionValueId": 8
		},
		{
			"optionId": 1,
			"optionValueId": 7
		}
	],
	"seasonIds": [
		1,
		2,
		3
	]
}

Response

{
}

Example 3

Bundle product put.

Request URI

/product/1007

Request body

{
	"brandId": 34344,
	"collectionId": 5,
	"productTypeId": 1,
	"identity": {
		"sku": "SKU0001",
		"ean": "12323423",
		"upc": "543534563",
		"isbn": "54353453",
		"barcode": "45453"
	},
	"stock": {
		"stockTracked": true,
		"weight": {
			"magnitude": 4324.54
		}
	},
	"financialDetails": {
		"taxable": false,
		"taxCode": {
			"id": 7,
			"code": "T20"
		}
	},
	"salesChannels": [
		{
			"salesChannelName": "Brightpearl",
			"productName": "Product B",
			"productCondition": "new",
			"categories": [
				{
					"categoryCode": "276"
				},
				{
					"categoryCode": "295"
				}
			],
			"description": {
				"languageCode": "en",
				"text": "

Some description

", "format": "HTML_FRAGMENT" }, "shortDescription": { "languageCode": "en", "text": "

Some description

", "format": "HTML_FRAGMENT" } } ], "seasonIds": [ 1, 2, 3 ], "composition": { "bundle": true, "bundleComponents": [ { "productId": 1698, "productQuantity": 1 }, { "productId": 1250, "productQuantity": 1 } ] } }

Response

{
}