Update product
Replace a product's editable fields.
POST
/ bigblue.storeapi.v1.PublicAPI/ UpdateProductUpdates the product with the id in the request. Send the whole product. Fields
you leave out are cleared.
Fields that are updated
name, sku, description, options, barcode, value, tariff_number,
origin_country, customs_description, name_translations, non_returnable,
foldable and already_packaged.
Lot settings aren't updated
track_lots, track_lot_expiry and lot_expiry_threshold_days are ignored. The
request still returns 200. To change them, use the Bigblue app.
Dimensions are measured by the warehouse and can't be updated.
Request body
The full product. id identifies the product and can't change. name,
barcode and value are required.
Responses
productProductThe updated product.
{ "code": "invalid_argument", "msg": "barcode is required" }{ "code": "not_found", "msg": "product not found" }POST
/ bigblue.storeapi.v1.PublicAPI/ UpdateProduct{
"product": {
"id": "BGBL-ESPSRT-SMAL",
"sku": "ESP-SHIRT-S",
"name": "Espresso T-shirt, Small",
"options": [{ "name": "Size", "value": "Small" }],
"barcode": "3401579800127",
"value": { "amount": "27.90", "currency": "EUR" },
"tariff_number": "6109.10",
"origin_country": "PT",
"customs_description": "Cotton t-shirt",
"foldable": true
}
}{
"product": {
"id": "BGBL-ESPSRT-SMAL",
"sku": "ESP-SHIRT-S",
"name": "Espresso T-shirt, Small",
"weight": 210,
"width": 240,
"height": 30,
"depth": 180,
"barcode": "3401579800127",
"value": { "amount": "27.9", "currency": "EUR" },
"tariff_number": "6109.10",
"origin_country": "PT",
"customs_description": "Cotton t-shirt",
"foldable": true
}
}const { product } = await call('GetProduct', { id: 'BGBL-ESPSRT-SMAL' });
await call('UpdateProduct', {
product: { ...product, value: { amount: '27.90', currency: 'EUR' } },
});Starting from the current product keeps the fields you don't change.