Updating Drop Down List Custom Fields via API | Community
Skip to main content

Updating Drop Down List Custom Fields via API

  • December 13, 2022
  • 1 reply
  • 0 views

I am trying to update the drop down list options for a custom field using the ZenDesk API. I am forming my statement as directed, but it is not working. I am not getting an error message, the API just returns the current list of fields.

This is my payload:

{"ticket_field":{"custom_field_options":[{"name":"NY-Office-New York Office","value":"newyorkoffice"},{"name":"IL-Retail-Adams Street","value":"adamsstreet"},{"name":"IL-Retail-Chicago Ridge","value":"chicagoridge"},{"name":"IL-Retail-Collinsville","value":"collinsville"},{"name":"IL-Retail-Fairview Heights","value":"fairviewheights"},{"name":"IL-Retail-Horizon Drive","value":"horizondrive"},{"name":"IL-Retail-Logan Square","value":"logansquare"},{"name":"IL-Retail-Midway Archer","value":"midwayarcher"},{"name":"IL-Retail-River North","value":"rivernorth"},{"name":"IL-Wholesale-Barry","value":"barry"},{"name":"MA-Retail-Friend Street","value":"friendstreet"},{"name":"MA-Retail-Newton","value":"newton"},{"name":"MA-Wholesale-Athol","value":"athol"},{"name":"MI-Retail-28th Street","value":"28thstreet"},{"name":"MI-Retail-Ann Arbor","value":"annarbor"},{"name":"MI-Retail-Battle Creek","value":"battlecreek"},{"name":"MI-Retail-Detroit","value":"detroit"},{"name":"MI-Retail-East Lansing","value":"eastlansing"},{"name":"MI-Retail-Morenci","value":"morenci"},{"name":"MI-Retail-Scribner","value":"scribner"},{"name":"MI-Wholesale-Lansing","value":"lansing"},{"name":"NJ-Retail-Fort Lee","value":"fortlee"},{"name":"NJ-Retail-Montclair","value":"montclair"},{"name":"NJ-Retail-Rochelle Park","value":"rochellepark"},{"name":"NJ-Wholesale-Franklin","value":"franklin"},{"name":"OH-Processing-Maricron Processing","value":"maricronprocessing"},{"name":"OH-Retail-Carroll","value":"carroll"},{"name":"OH-Retail-Coshocton","value":"coshocton"},{"name":"OH-Wholesale-Hemma","value":"hemma"},{"name":"PA-Retail-Scranton","value":"scranton"},{"name":"PA-Retail-Wayne","value":"wayne"},{"name":"PA-Wholesale-Smithfield","value":"smithfield"}]}}

I am using this endpoint:

~/ticket_fields/11206247835803

1 reply

Tipene
  • December 16, 2022
Hey James,
 
Thanks for reaching out!
 
Everything looks fine with your payload. Can you confirm that you're making a PUT request to the https://{subdomain}.zendesk.com/api/v2/ticket_fields/{id} endpoint?