Promotions
Examples
Product promotions

Product Promotion Code Samples

Buy one and get one free

Example request
{
  "name": "Buy one and get one free",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "action": {
        "gift_item": {
          "product_id": 130,
          "quantity": 1
        }
      },
      "apply_once": false,
      "stop": false,
      "currency_code": "AUD",
      "condition": {
        "cart": {
          "items": {
            "products": [
              130
            ]
          },
          "minimum_quantity": 1
        }
      }
    }
  ],
  "notifications": [
    {
      "type": "UPSELL",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "ELIGIBLE",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "APPLIED",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    }
  ],
  "stop": false,
  "status": "ENABLED",
  "start_date": "2019-02-06T05:00:00+00:00",
  "end_date": "2019-02-09T04:59:59+00:00"
}

Buy (X units) of product A and get (Y units) of product B for $ or % off per unit

Example request
{
  "name": "Buy two X and get 10% off Y",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "action": {
        "cart_items": {
          "discount": {
            "percentage_amount": "10"
          },
          "strategy": "LEAST_EXPENSIVE",
          "as_total": false,
          "include_items_considered_by_condition": false,
          "items": {
            "products": [
              130
            ]
          },
          "quantity": 1
        }
      },
      "apply_once": false,
      "stop": false,
      "condition": {
        "cart": {
          "items": {
            "products": [
              129
            ]
          },
          "minimum_quantity": 1
        }
      }
    }
  ],
  "notifications": [
    {
      "type": "UPSELL",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "ELIGIBLE",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "APPLIED",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    }
  ],
  "stop": false,
  "status": "ENABLED"
}

Get $ or % off product X

Example request
{
  "name": "Spend 100 dollars and get 10% off small orbit",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "action": {
        "cart_items": {
          "discount": {
            "percentage_amount": "10"
          },
          "strategy": "LEAST_EXPENSIVE",
          "as_total": false,
          "include_items_considered_by_condition": false,
          "items": {
            "products": [
              130
            ]
          },
          "quantity": 1
        }
      },
      "apply_once": true,
      "stop": false,
      "condition": {
        "cart": {
          "minimum_spend": "100"
        }
      }
    }
  ],
  "notifications": [
    {
      "type": "UPSELL",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "ELIGIBLE",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "APPLIED",
      "content": "",
      "locations": [
        "CART_PAGE"
      ]
    }
  ],
  "stop": false,
  "status": "ENABLED"
}

Take X% off the most expensive item in the cart

Example request
{
  "name": "Apply 20% off most expensive cart item",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "action": {
        "cart_items": {
          "discount": {
            "percentage_amount": "20"
          },
          "quantity": 1,
          "strategy": "MOST_EXPENSIVE",
          "as_total": false
        }
      },
      "apply_once": true,
      "stop": false
    }
  ],
  "notifications": [
    {
      "type": "UPSELL",
      "content": "<div>&nbsp;</div>",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "ELIGIBLE",
      "content": "<div>&nbsp;</div>",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "APPLIED",
      "content": "<div>&nbsp;</div>",
      "locations": [
        "CART_PAGE"
      ]
    }
  ],
  "stop": false,
  "current_uses": 0,
  "max_uses": null,
  "start_date": "2019-01-31T05:00:00+00:00",
  "end_date": null,
  "status": "ENABLED"
}

Buy X product variant and get X product variant free

Example request
{
  "name": "Buy X product variant and get X product variant free",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "action": {
        "gift_item": {
          "variant_id": 151,
          "quantity": 1
        }
      },
      "apply_once": false,
      "stop": false,
      "currency_code": "GBP",
      "condition": {
        "cart": {
          "items": {
            "variants": [
              139
            ]
          },
          "minimum_quantity": 2
        }
      }
    }
  ],
  "notifications": [
    {
      "type": "UPSELL",
      "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "ELIGIBLE",
      "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
      "locations": [
        "CART_PAGE"
      ]
    },
    {
      "type": "APPLIED",
      "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
      "locations": [
        "CART_PAGE"
      ]
    }
  ],
  "stop": false,
  "status": "ENABLED"
}

Amount off

Example request
{
  "name": "US $50 off a specific product",
  "redemption_type": "AUTOMATIC",
  "currency_code": "USD",
  "rules": [
    {
      "apply_once": false,
      "condition": {
        "cart": {
          "items": {
            "products": [
              129
            ]
          },
          "minimum_quantity": 1
        }
      },
      "action": {
        "cart_items": {
          "discount": {
            "fixed_amount": "50"
          },
          "items": {
            "products": [
              130
            ]
          },
          "quantity": 1,
          "include_items_considered_by_condition": true
        }
      }
    }
  ]
}

Percentage off

Example request
{
  "name": "US 15% off a specific product",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "apply_once": false,
      "condition": {
        "cart": {
          "items": {
            "products": [
              129
            ]
          },
          "minimum_quantity": 1
        }
      },
      "action": {
        "cart_items": {
          "discount": {
            "percentage_amount": "75"
          },
          "items": {
            "products": [
              130
            ]
          },
          "quantity": 1,
          "include_items_considered_by_condition": true
        }
      }
    }
  ]
}

Buy three for the price of two

Example request
{
  "name": "Buy three for the price of two",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "apply_once": false,
      "condition": {
        "cart": {
          "items": {
            "products": [
              129
            ]
          },
          "minimum_quantity": 2
        }
      },
      "action": {
        "cart_items": {
          "discount": {
            "percentage_amount": "100"
          },
          "items": {
            "products": [
              130
            ]
          },
          "quantity": 1
        }
      }
    }
  ]
}

Buy extra-small or medium item and get free shipping to zone id 1 (Product Options Item Matcher)

Example request
{
  "name": "Buy extra-small or medium item and get free shipping to zone id 1",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "condition":{
        "cart":{
          "items": {
            "product_option": {
              "type": "string_match",
              "name": "Size",
              "values": [
                "XS",
                "M"
              ]
            }
          },
          "minimum_quantity": 1
        }
      },
      "action":{
        "shipping":{
          "free_shipping":true,
          "zone_ids":[
            1
          ]
        }
      }
    }
  ]
}

Buy extra-small blue or medium blue item and receive free shipping (Product Options Item Matcher)

Example request
{
  "name": "Buy extra-small blue or medium blue item and receive free shipping",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "condition": {
        "cart": {
          "items": {
              {
                "product_option": {
                  "type": "string_match",
                  "name": "Size",
                  "values": [
                    "XS",
                    "M"
                  ]
                }
              },
              {
                "product_option": {
                  "type": "string_match",
                  "name": "Color",
                  "values": [
                    "Blue"
                  ]
                }
              }
          },
          "minimum_quantity": 1
        }
      },
      "action": {
        "shipping": {
          "free_shipping": true,
          "zone_ids": [
            1
          ]
        }
      }
    }
  ]
}

Take 20% off all men's clothing (Product Custom Field Item Matcher)

Example request
{
  "name": "Apply 20% off all male clothing",
  "redemption_type": "AUTOMATIC",
  "rules": [
    {
      "action": {
        "cart_items": {
          "discount": {
            "percentage_amount": "20"
          },
          "items": {
            "product_custom_field": {
              "name": "Gender",
              "values": [
                "Mens"
              ]
            }
          }
        }
      }
    }
  ]
}
Did you find what you were looking for?