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 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!
I would like to update the cost prices for products variants via API. Is this a valid way to update the product cost price? Is there a way to find some documentation on this endpoint?
There’s no documentation on this part of the API I don’t think, we were told we are able to post to it but it’s not a supported endpoint! We didn’t do the “default_supplier” work in the end, and just pushed up cost prices and it works as expected.
You just need to get the correct product variant ID, and post an array up to https://api.veeqo.com/supplier_product_variants:
$fields[‘product_variant_id’] = $variantId;
$fields[‘supplier_id’] = $supplierId;
$fields[‘cost’] = $cost;
$fields[‘reference_number’] = $supplierRef;