Create Voucher(s)

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

Path parameters

  • siteid string Required

    Site database ID

Body Required

  • num_devices integer Required

    Max devices allowed in this package

  • batchid integer

    Optional Batch ID

  • price number

    Price in decimal

  • speed_ul integer

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

  • num_to_create integer Required

    Number of vouchers to create

  • bytes_t integer

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

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

  • notes string

    Internal comments

  • Set data to be unlimited in voucher

  • Allowed duration actual value

  • speed_dl integer

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

  • Set speed to be unlimited in voucher

Responses

POST /ext/{siteid}/api/v1/voucher/
curl \
 -X POST https://api.spotipo.com/ext/{siteid}/api/v1/voucher/ \
 -H "Authentication-Token: $API_KEY" \
 -d '{"num_devices":42,"batchid":42,"price":42.0,"speed_ul":42,"num_to_create":42,"bytes_t":42,"duration_type":42,"notes":"string","unlimited_data":true,"duration_val":42,"speed_dl":42,"unlimited_speed":true}'
Request example
{
  "num_devices": 42,
  "batchid": 42,
  "price": 42.0,
  "speed_ul": 42,
  "num_to_create": 42,
  "bytes_t": 42,
  "duration_type": 42,
  "notes": "string",
  "unlimited_data": true,
  "duration_val": 42,
  "speed_dl": 42,
  "unlimited_speed": true
}