Validations
Validate Count

Count how many customers will be eligible for a Coupon

API Endpoint

> /api/validate/count

Code

import axios from "axios";
let response = await axios.request({
    url: "https://your-website.com/api/validate/count",
    method: "POST",
    headers: {
        Authorization: "Bearer abcdefghijklmnopqrstuvwxyz0123456789",
        "Content-Type": "application/json",
    },
    data: JSON.stringify({
        parameter: "Spent",
        compare: "greater",
        value: 1600,
    }),
});
console.log(response.data);

Response

{
  "message": "Count successful",
  "success": true,
  "data": 187
}