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:

  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.


                        Zoho Marketing Automation

                                • Sticky Posts

                                • Introducing Developer Space in Zoho Subscriptions

                                  Hello devs! At Zoho Subscriptions, we're constantly looking for ways to empower the developer community. Our goal is to provide you with the tools you need to integrate Zoho Subscriptions with your other platforms, and we also want to make it easy to

                                Manage your brands on social media

                                        Zoho TeamInbox Resources

                                          Zoho DataPrep Resources

                                            Zoho CRM Plus Resources

                                              Zoho Books Resources

                                                Zoho Subscriptions Resources

                                                  Zoho Desk Resources

                                                    Zoho Projects Resources

                                                      Zoho Sprints Resources

                                                        Qntrl Resources

                                                          Zoho Creator Resources

                                                            Zoho WorkDrive Resources

                                                              Zoho Campaigns Resources

                                                                Zoho CRM Resources

                                                                • CRM Community Learning Series

                                                                  CRM Community Learning Series

                                                                • Tips


                                                                • Functions


                                                                • Meetups


                                                                • Kbase


                                                                • Resources


                                                                • Digest


                                                                • CRM Marketplace

                                                                  CRM Marketplace

                                                                • MVP Corner

                                                                  MVP Corner

                                                                • Word of the Day

                                                                  Word of the Day

                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now