Get the list of your active contracts
To have information on your active contracts, you have to send the following request to the API
GET /v2/contracts HTTP/1.1
Host: https://api.api2convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json
This request will return a response similar to this one:
{
"contracts": [
{
"contract_type": "prepaid",
"contract_creation_date": "2016-02-02 10:52:36",
"minutes_bought": 500,
"minutes_remaining": 471
},
{
"contract_type": "prepaid",
"contract_creation_date": "2016-10-28 13:55:08",
"minutes_bought": 500,
"minutes_remaining": 500
},
{
"contract_type": "prepaid",
"contract_creation_date": "2016-10-28 13:56:08",
"minutes_bought": 500,
"minutes_remaining": 500
},
{
"contract_type": "prepaid",
"contract_creation_date": "2016-10-28 14:16:40",
"minutes_bought": 500,
"minutes_remaining": 377
}
],
"minutes_remaining": 1848
}
For each active (e.g. not expired) contract, you receive information on the contract's type, when you bought it, how many minutes you bought and how many minutes are left. For your convenience, a separate field named "minutes_remaining" contains the total amount of minutes you can spend from all of your active contracts. If you have a contract invoiced monthly, you get a simpler answer because your minutes are unlimited, like in the following example:
{
"contracts": [
{
"contract_type": "invoice",
"contract_creation_date": "2016-09-29 11:20:39"
}
]
}