Work with Per-Unit Product Pricing

Several OCAPI documents now include properties related to per-unit product pricing. The Data API and Shop API products and product_search resources consume and return these documents.

Why: Grocery customers require this functionality to easily present per-unit pricing to their shoppers.

How: We added these fields:

  • price_per_unit—The price of one unit. For example: If a product is 2 pounds of celery, its unit is 1 pound, and its price is $1.50, then its price_per_unit is $0.75.

    For a parent product, such as a variation master or set, this value is the lowest price_per_unit among its child products.

  • price_per_unit_max—For a parent product, such as a variation master or set, this value is the highest price_per_unit among its child products.
  • unit_measure—For products sold by a measurement such as weight or volume, the amount included in one unit. For example: 1 pound of celery or 32 ounces of soup.
  • unit_quantity—For products sold by quantity, the quantity included in one unit. For example: one bell pepper or three ears of corn.

For detailed information about which documents include these fields, see the OCAPI 20.8 Changes since 20.4 topic in the Infocenter.