Skip to content

Manage Promotion

Request

This endpoint allows a third-party system to create, update, or deactivate SKU-level promotions on the Keeta platform.

Notes:

  • The request is processed asynchronously, and the processing result will be notified via webhook.
  • Keeta identifies a promotion by the combination of sku, conditions.startTime, and conditions.endTime.
  • When conditions is omitted, the promotion becomes effective after creation and remains effective until it is updated or deactivated.
  • Set discount[].active to false to remove the specified SKUs from the promotion.
  • Only STRIKETHROUGH promotions are currently supported.
  • Only one promotion can be active for the same SKU at any given time.
  • Only SKU-level daily inventory limits and per-order purchase limits are supported.
Security
OAuth2ClientCredentials and Signature
Path
chainIdstringrequired

Unique identifier of the chain.

Example:5508400
Bodyapplication/jsonrequired
vendorsArray of strings, non-emptyrequired

Identifiers of the vendors that participate in the promotion.

Example:
[ "12345", "67890" ]
typestringrequired

This field represents the promotion type. Only STRIKETHROUGH is currently supported.

Value:"STRIKETHROUGH"
Example:"STRIKETHROUGH"
promotionNamestring

Unique name used to identify and manage the promotion on the Keeta platform.

Example:"Energy drinks 0.5l on sale"
conditionsobject(PromotionConditions)

Optional promotion validity period. When this object is omitted, the promotion becomes effective after creation and remains effective until it is updated or deactivated. The start time and end time need to be either both provided or both omitted.

discountArray of objects, [ 1 .. 20000 ] items(DiscountItem)required

A list of SKU-level discount configurations. A single request can contain up to 20,000 discount items.

PUT
/v1/promotion/chains/{chainId}
curl -i -X PUT \
  'https://open.mykeeta.com/api/open/grocery/v1/promotion/chains/{chainId}' \
  -H 'Authorization: Bearer <YOUR_TOKE_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Signature: YOUR_API_KEY_HERE' \
  -d '{
        "vendors": ["12345", "67890"],
        "type": "STRIKETHROUGH",
        "promotionName": "Energy drinks 0.5l on sale",
        "conditions": {
          "startTime": "2024-03-05T15:59:59Z",
          "endTime": "2024-03-05T16:59:59Z"
        },
        "discount": [
          {
            "discountSubtype": "PERCENTAGE",
            "discountValue": 10,
            "sku": [
              {"skuId": "23927", "originalPrice": 100},
              {"skuId": "84665"}
            ],
            "active": true,
            "orderLimit": 2,
            "dailyLimit": 100
          }
        ]
      }'

Responses

The asynchronous promotion job for the specified vendors was created successfully.

Bodyapplication/json
jobIdstringrequired

Job identifier. Can be used as a query parameter to get the job status

Example:"id_123456"
jobStatusstringrequired

Job status. Always equal to QUEUED due to the asynchronous nature of this endpoint.

Value:"QUEUED"
Example:"QUEUED"
Response
{ "jobId": "id_123456", "jobStatus": "QUEUED" }