Updating Subscription Custom Field with invokeurl Not Working

Updating Subscription Custom Field with invokeurl Not Working

I'm trying to follow the API instructions as per this documentation:
https://www.zoho.com/subscriptions/api/v1/subscription/#update-custom-fields

  1. // Copy reference number to the PBX Domain custom field
  2. params = '{"label":"PBX Domain","value":"string"}';
  3. response = invokeurl
  4. [
  5. url :"https://subscriptions.zoho.com/api/v1/subscriptions/" + subID + "/customfields"
  6. type :POST
  7. parameters: params
  8. connection:"subscriptionsconnection"
  9. content-type:"application/json"
  10. ];
However, when I try to execute this, I get back the following (abridged) response:
  1. {
  2.    "code":0,
  3.    "message":"Custom Fields Updated Successfully.",
  4.    "data":[
  5.       {
  6.          "customfield_id":"240902000017851054",
  7.          "value":"",
  8.          "max_length":255,
  9.          "field_id":"240902000017851054",
  10.          "index":1,
  11.          "label":"PBX Domain",
  12.       }
  13.    ]
  14. }

As you can see, the value is coming back as empty even though I'm passing the label and a value. What's going on here? Why won't it update with the string value as provided in the json params in the body?

EDIT: I've also tried passing params as follows:

  1. params = '{"custom_fields":[{"value":"string","label":"PBX Domain"}]}';

And result is the same (value is not updated and returns empty). Also, I should mention, that field does already have a value in it and it’s being updated.  When using the GET method, I can see the value but with POST it does not update and returns empty.

Thanks!