Skip to navigation

Manage Ordinal Rotating Product

View as Markdown

Configures an existing product as an ordinal rotating product, or changes the selection rules of an existing one. The product must be a standard or rotating product that isn’t a delivery product in another rotation; a standard product becomes rotating. Delivery products must be standard products other than the rotating product itself.

Selection rules must meet these conditions:

  • One rule has a starting_ordinal of 0: the product delivered in the checkout order.
  • Each starting_ordinal is a unique, non-negative integer.
  • cyclical_starting_ordinal is between 0 and the largest starting_ordinal. It applies only when cyclical_rotation_enabled is true, and is removed when cyclical rotation is turned off.

Malformed values return 400, and a request that would leave the rotation invalid returns 422. Either way, no selection rules are created, updated or deleted.

To read the rules later, call List or Retrieve with include_product_selection_rules=true.

This endpoint accepts the Application API Scope only. Storefront API Scope signatures are rejected.

Authentication

x-api-keystring

Application API Scope — server-to-server, sent in the x-api-key header. See Authentication.

Path parameters

product_idstringRequired
Merchant product ID

Request

This endpoint expects an object.
createlist of objectsOptional
Add new selection rules for your rotation
updatelist of objectsOptional
Update existing selection rules
deletelist of stringsOptional

Delete existing selection rules with public ids to be deleted , ex: [“85eae83c245111eeb185acde48001122”,“b3928a0c3c4211eeac2bacde48001122”]

configurationobjectOptional
Configures the rotation product

Response

200
public_idstringOptional
selection_rule_typestringOptional
product_selection_list_elementslist of objectsOptional
configurationobjectOptional