GET
https://api.octopush.com/v1/public/wallet/check-creditsEncoding : UTF-8
Authentication
Your “api-key” and “api-login” must be added in the headers.
Definition
This web service allows you to consult the quantity of credits (unit shipments) you have for each type of service/product we offer, and for the countries you indicate in the request.
Special parameters
| Field | Type | Description |
|---|---|---|
| country_codes[] | array | (optional) List of country codes you want your credit to be displayed for. |
Curl Example
curl -X GET \ 'https://api.octopush.com/v1/public/wallet/check-credits?country_codes[]=FR&country_codes[]=ES&country_codes[]=GB' \ -H 'Content-Type: application/json' \ -H 'api-key: ************' \ -H 'api-login: ******@email.org' \ -H 'cache-control: no-cache'
Command to copy/paste
curl -X GET 'https://api.octopush.com/v1/public/wallet/check-credits?country_codes[]=FR&country_codes[]=ES&country_codes[]=GB' -H 'Content-Type: application/json' -H 'api-login: ******@email.org' -H 'api-key: ************' -H 'cache-control: no-cache'
Server response in JSON
Success : 200 OK
{
"ES" : {
"premium_sms": 5,
"vocal_sms": 0,
"low_cost_sms": 0,
"hlr": 87
},
"FR": {
"premium_sms": 10,
"vocal_sms": 0,
"low_cost_sms": 21,
"hlr": 87
},
"GB": {
"premium_sms": 5,
"vocal_sms": 0,
"low_cost_sms": 0,
"hlr": 87
}
}