Promo Code Status

GET https://api.e-guma.ch/v1/promo_codes/{code}/status.json?apikey={api-key}

Parameters

AttributeDescription
code requiredThe alphanumeric code of the promo code. Please use url_encode for the code as it might contain special characters.
api-key required

Return

codeThe same code as you provided as parameter
is_validTrue if the promo code can be used
discount_typeEither percentage or amount
valueThe discount, either as a percentage or an amount
messageMessage why the promo code can't be used

Example

GET https://api.e-guma.ch/v1/promo_codes/123456/charge_status.json?apikey=510e32c594d84816a4af9df1
{
  "is_valid": true,
  "code": "123456",
  "discount_type": "percentage",
  "value": 15,
  "message": ""
}