Incorrect/Unclear Documentation for[].values in Policy Updater

matthewpoermatthewpoer Posts: 15Expensify Customer Expensify Newcomer

The documentation for the API's Policy Updater functionality needs correction and adjustment in regards to specifying the values for a new dropdown-type report field.

API Documentation:

There are two curl examples for policy-updater that demonstrate the creation of dropdown-type custom report fields (reportFields) with pre-defined values. The first shows the values referenced as strings, which works great.


The other examples show the values specified as JSON Objects. The documentation describes and shows these JSON Objects with the keys value, externalId and enabled. I cannot get this method to work. In fact, when I copy-and-paste the example from the sidebar into my console (replacing the credentials and policy ID reference), it doesn't appear to be valid JSON.


The JSON is valid once I adjust the closing tags.


The API consistently returns this error message when I attempt the JSON Objects way:

{"responseMessage":"Value at index 0 for report field at index 0 is invalid","responseCode":410}

I'm not sure I understand the need/use case for using JSON Objects at all, so my recommendation would be to remove this second example and adjust the documentation to list[].values an array of strings.



Sign In or Register to comment.