You can generate a voucher via our Classroom Distributor API via this URL
https://api.jollyclassroom.com/classroom.DistributorApi/CreateVoucher
Request
The request in JSON format looks like this:
{
“numberOfDays”: <The licence duration for the voucher in days>,
“distributorId”: <Your distributor serial identification>,
“apiKey”: <Your API key>
}
Side note:
The resulting URL would look like https://api.jollyclassroom.com/classroom.DistributorApi/CreateVoucher?numberOfDays=<The licence duration for the voucher in days>&distributorId=<Your distributor serial identification>&apiKey=<Your API key>
Response
The answer of the request would look as follows:
{
"voucher": {
"id": <Your voucher code>,
"properties": {
"code": <Your voucher code>,
"subscriptionDays": <The licence duration for the voucher in days>,
"customerCurrency": <Your currency>
},
"creationDate": {
"seconds": "1663059972",
"nanos": 94609000
},
"state": <The state of your voucher (pending or redeemed)
}
}
Side note: The voucher code can be either id or properties > code values.
Feel free to test our API here.
Comments
0 comments
Please sign in to leave a comment.