Skip to navigation

Manage Time-Window Rotating Product

View as Markdown

Configures an existing product as a time-window rotating product, or changes the selection rules of an existing one.

Selection rules must meet these conditions:

  • There is at least one rule.
  • At least one starting_date is at or before the current time.
  • No two rules share a starting_date. Rules may share a product.
  • Each starting_date is ISO 8601 with a timezone offset. Dates are stored in UTC.

A malformed date, or one without an offset, returns 400; other violations return 422. Either way, no selection rules are created, updated or deleted. cyclical_rotation_enabled isn’t supported for time-window rotation and returns 422.

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