Skip to main content

Update Product Inner Pack

PUT 

/api/v2/products/:product/inner-pack

Save a product's inner pack, or remove it by sending quantity null (or every field empty). Sizes without a quantity are not an inner pack, so they remove it too. data is null and message is "Inner pack cleared" after a removal.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: a Personal Access Token in the Authorization header with the products:write scope. Requires permission to edit products.

Body fields (all optional, nullable):

  • quantity (integer, 1-100000): units in one inner pack. When the product has a case quantity, the inner pack must be smaller than it and divide it evenly (24 takes 2, 3, 4, 6, 8 or 12). Any quantity is accepted when the product has no case quantity.
  • gtin (string): the inner pack's GTIN, 8, 12, 13 or 14 digits.
  • weight (number, >0, max 100000): one sealed inner pack.
  • weight_unit: lb | kg (default lb).
  • length, width, height (number, >0, max 1000): one sealed inner pack.
  • dimension_unit: in | cm (default in).

Response fields:

  • quantity: units in one inner pack.
  • case_quantity: the product's case quantity (units in the master carton), or null when it has none.
  • inners_per_case: case_quantity / quantity, or null when the product has no case quantity or the inner pack no longer divides it.
  • divides_case: false when the case quantity has since changed to a number the inner pack does not divide evenly. Packing then ignores the inner pack until one of them is corrected.
  • gtin: the inner pack's own GTIN (8, 12, 13 or 14 digits), or null.
  • weight / weight_unit, length / width / height / dimension_unit: one sealed inner pack. A carton that holds exactly one inner pack uses these for its weight and size.

Request​

Responses​

OK

Response Headers
    Content-Type