Updating Subscription Custom Field with invokeurl Not Working
I'm trying to follow the API instructions as per this documentation:
- // Copy reference number to the PBX Domain custom field
- params = '{"label":"PBX Domain","value":"string"}';
- response = invokeurl
- [
- url :"https://subscriptions.zoho.com/api/v1/subscriptions/" + subID + "/customfields"
- type :POST
- parameters: params
- connection:"subscriptionsconnection"
- content-type:"application/json"
- ];
However, when I try to execute this, I get back the following (abridged) response:
- {
- "code":0,
- "message":"Custom Fields Updated Successfully.",
- "data":[
- {
- "customfield_id":"240902000017851054",
- "value":"",
- "max_length":255,
- "field_id":"240902000017851054",
- "index":1,
- "label":"PBX Domain",
- }
- ]
- }
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:
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
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
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
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
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.