Product Primary Supplier PUT

URI

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

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

Description

This message allows you to add a primary supplier to a product.

Example 1

Add a supplier to a product as primary supplier.

Request URI

/primary-supplier/201/product

Request body

{
	"productIds": [
		1007
	]
}

Response

{
	"response": {
		"resourceStatuses": {
			1007: 200
		},
		"resourceErrors": {
			1007: [
			]
		}
	}
}

Example 2

Add a supplier to multiple products as primary supplier.

Request URI

/primary-supplier/201/product

Request body

{
	"productIds": [
		1007,
		1008
	]
}

Response

{
	"response": {
		"resourceStatuses": {
			1007: 200,
			1008: 200
		},
		"resourceErrors": {
			1007: [
			],
			1008: [
			]
		}
	}
}

Example 3

Try adding an invalid supplier 205 to an existing product 1007.

Request URI

/primary-supplier/205/product

Request body

{
	"productIds": [
		1007
	]
}

Response

{
	"errors": {
		"code": "PRDC-133",
		"message": "Invalid supplier ID : 205"
	}
}