Promotion Code Validation SPI

POST Validate promotion code.

POST /merchant/spi/sample/endpoint/sa/promotionCodeValidation

Operation ID: validatePromoCode. Tags: Promotion Code Validation SPI.

Validate a provided promotion code by checking its validity and returning the associated promotion ID. If the promotion code is valid, the response returns the corresponding promotion ID. If the promotion code is invalid, the response returns an empty promotion ID. Merchants must implement this endpoint per this specification and then configure it in CMS under CMS > Store Management > Integration > Custom API Connectors > Create. Make sure to create the endpoint in CMS with the following details:

  1. Under API Config:
  2. Under JSON Config:
    • Integration Type: HTTP_POST
    • JSON Headers: Provide the header for the API. Headers can be Content-Type, Authorization attributes like clientId/password, for example: {"Content-Type":"application/json","client_id":"myClientId","client_secret":"myClientSecret"}.

Request body

Media type: application/json. Schema: PromoCodeValidationRequest.

Responses

  • default Default response.

    Media type: application/json. Schema: PromoCodeValidationResponse.