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.

Thanks!

      Zoho Developer Community







                                Zoho Desk Resources

                                • Desk Community Learning Series


                                • Digest


                                • Functions


                                • Meetups


                                • Kbase


                                • Resources


                                • Glossary


                                • Desk Marketplace


                                • MVP Corner


                                • Word of the Day



                                    Zoho Marketing Automation
                                            • Sticky Posts

                                            • Zoho Billing will discontinue support for older browser versions soon

                                              Hello users, Starting from May 15, 2024, Zoho Billing will no longer support the following browser versions: Browsers Version Restrictions Firefox Browser Versions older than 100 Google Chrome Versions older than 100 Microsoft Edge Versions older than
                                            • 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 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

                                                                          Tips

                                                                        • Functions

                                                                          Functions

                                                                        • Meetups

                                                                          Meetups

                                                                        • Kbase

                                                                          Kbase

                                                                        • Resources

                                                                          Resources

                                                                        • Digest

                                                                          Digest

                                                                        • CRM Marketplace

                                                                          CRM Marketplace

                                                                        • MVP Corner

                                                                          MVP Corner





                                                                            Design. Discuss. Deliver.

                                                                            Create visually engaging stories with Zoho Show.

                                                                            Get Started Now