[SOLVED] Failing to change data plan through REST API


#1

I’m trying to change the data plan for a number of links through the REST API but I can’t.
I’m using Postman to send the following POST request
https://dashboard.hologram.io/api/1/links/cellular//changeplan?apikey=
With a body:
“plan” : 202
“zone” : “global”

But it fails with the following message
{
“success”: false,
“error”: “Not enough money in account balance”
}

That would make sense if I didn’t have money in the account but I do, and when I go to the dashboard and then go to the device page I am able to change the plan to what I want using the balance I have in my account.


#2

Hmm, is this for devices that are on an organization? Can you try sticking &orgid=<orgid> in the URL? You can get the orgid under organization settings on the Dashboard. It’s possible it’s looking at the wrong org’s account balance.


#3

You’re right, explicitly adding the organisation id sorted that.
My guess is that it’s using the organisation id that the apikey belongs to.
Thanks


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.