Updating the supplier product variant details


#1

I’ve been speaking to Calum about how to update cost prices for particular product variants now that we have more complicated supplier integration in Veeqo.

I managed to get it to work successfully by POSTing to: https://api.veeqo.com/supplier_product_variants

The JSON data structure is as follows:

{
	"supplier_product_variant": {
		"product_variant_id": ":variant_id",
		"supplier_id": "supplier_id",
		"cost": "cost_price",
		"reference_number": "reference_number"
	}
}

I just realised that I could update the reference number via the API which is awesome and so added that in. I presume we can use this as a field for the supplier code we have for this particular product?

Also, I can see some extra data in the endpoint, like “default_supplier” - are we able to push a “true” or “false” up to this? Or is this not advised?

Wasn’t sure how to categorise this as it’s a different endpoint. Having great fun playing with the API! :smiley:


#2

I’d give default_supplier a go but be prepared for some unexpected behaviour. There a reason why these end points are undocumented at the moment!

Let me know how you get on!