Create Voucher(s)

POST /ext/{siteid}/api/v1/voucher/

Path parameters

  • siteid string Required

    Site database ID

application/json

Body Required

  • Set speed to be unlimited in voucher

  • num_to_create integer Required

    Number of vouchers to create

  • num_devices integer Required

    Max devices allowed in this package

  • Set data to be unlimited in voucher

  • Allowed duration actual value

  • Type for time duration (1,'Minutes'),(2,'Hours'),(3,'Days')

  • speed_dl integer

    Download speed , 0 for unlimited ( only if speed_limit is True)

  • speed_ul integer

    Upload speed , 0 for unlimited ( only if speed_limit is True)

  • bytes_t integer

    Total allowed data in MB, 0 for unlimited ( only if data_limit is True)

  • batchid integer

    Optional Batch ID

  • notes string

    Internal comments

  • price number

    Price in decimal

Responses

POST /ext/{siteid}/api/v1/voucher/
curl \
 --request POST 'https://api.spotipo.com/ext/{siteid}/api/v1/voucher/' \
 --header "Authentication-Token: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"unlimited_speed":true,"num_to_create":42,"num_devices":42,"unlimited_data":true,"duration_val":42,"duration_type":42,"speed_dl":42,"speed_ul":42,"bytes_t":42,"batchid":42,"notes":"string","price":42.0}'
Request examples
{
  "unlimited_speed": true,
  "num_to_create": 42,
  "num_devices": 42,
  "unlimited_data": true,
  "duration_val": 42,
  "duration_type": 42,
  "speed_dl": 42,
  "speed_ul": 42,
  "bytes_t": 42,
  "batchid": 42,
  "notes": "string",
  "price": 42.0
}