BigblueDevelopers

Update product

Replace a product's editable fields.

POST/bigblue.storeapi.v1.PublicAPI/UpdateProduct

Updates 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

productProductFormrequired

The full product. id identifies the product and can't change. name, barcode and value are required.

Responses

200The product was updated.
productProduct

The updated product.

400A field is invalid or the barcode is empty.
{ "code": "invalid_argument", "msg": "barcode is required" }
404No product with this ID exists.
{ "code": "not_found", "msg": "product not found" }
POST/bigblue.storeapi.v1.PublicAPI/UpdateProduct
Request
{
  "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
  }
}
200
{
  "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
  }
}
Get, change, update
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.