Process promo code decisions

The Promo Code decision would execute the discount rule defined behind the given promo code, which is configured from the Zephr console. The decision request would require a list of relevant products with its pricing data, typically it would have come from a Dynamic Offer decision response. The Promo Code decision would generate decision response like a regular Dynamic Offer, but with the discount output according to the Promo Code's discount rule.

Alternatively, if configured and the feature is enabled, this api can execute a dynamic offer rule that is linked to this promo code. Selected products are not required for executing promo codes using this method. Parameters supplied to the dynamic offers decisions api can also be supplied to this api for this promo code flow (session, foreign_keys, etc)

SecurityCookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Request
Request Body schema: application/json
promo_code
string

The Promo Code, generated from the Zephr console

Array of objects or null (promo-code-decision-request-selected-product)
session
string or null

Zephr Session ID, required for trials

foreign_keys
object or null

Foreign system and ID used to identify the user

ip
string or null

Client IP address, defaults to request IP

user_agent
string or null

Client user agent

jwt
string or null

A Json Web Token, may include identity or product holding claims

path
string or null

Request path, required for trials if used

Responses
200

OK

400

Bad Request

404

Not Found

post/zephr/public/decisions/v1/promo-codes
Request samples
application/json
{
  • "promo_code": "string",
  • "selected_products": [
    ],
  • "session": "string",
  • "foreign_keys": { },
  • "ip": "string",
  • "user_agent": "string",
  • "jwt": "string",
  • "path": "string"
}
Response samples
application/json
{
  • "products": [
    ],
  • "tagline": "string",
  • "custom": { },
  • "outcomes": [
    ],
  • "errors": [
    ]
}