0

To successfully search the device/event endpoint for device.device_report_product_code, you must search using = instead of : like this:

https://api.fda.gov/device/event.json?search=device.device_report_product_code="HQF"

But the API documentation (to my knowledge) doesn't document the required use of = for device.device_report_product_code. Furthermore, if you use : instead of =, you don't get an error. You get "No results found!", which is what this query returns:

https://api.fda.gov/device/event.json?search=device.device_report_product_code:"HQF"

Yet HQF is a valid 3-letter device code. Can someone explain when = must be used and why : (which I thought meant "contains") returned no matches?

1 Answer 1

0

This is a very strange bug - the API should be erroring with the use of an equal sign there. We'll open a bug report and investigate. In the meantime, the ':' version does return results and should be what is used.

Regards,

Violet Wren

openFDA Tech Lead

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.