v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Post Cart Promotions Code link API

This API is used to link the code of the cart promotion earned by the customer to the customer id.

post/api_gateway/v1/promotions/{code}/link

Path parameters

codestring required

Code assigned to the promotion which can be used for redemption

Request body

customerIdinteger

Unique id assigned to the customer

codestring

Code assigned to the promotion which can be used for redemption

modestring

The mode of promotion

Response

200

Example response

{
  "data": {
    "id": "string",
    "promotionId": "string",
    "promotionName": "string",
    "code": "string",
    "active": true,
    "mode": "DISCOUNT",
    "apiError": {
      "message": "string"
    },
    "restrictions": {
      "additionalProp1": [
        {
          "kpi": "REDEMPTION"
        }
      ],
      "additionalProp2": [
        {
          "kpi": "REDEMPTION"
        }
      ],
      "additionalProp3": [
        {
          "kpi": "REDEMPTION"
        }
      ]
    }
  },
  "errors": [
    {
      "message": "string"
    }
  ]
}