Trouble with API filtering on a field called STATUS

Comments

3 comments

  • Official comment
    Casper Fabricius

    Hi Joshua,

    If "107670015" is indeed the ID of the field you are filtering by, I can tell you that it's external id is "approved", not "STATUS". The app this field belong to does not have any fields with an external id of "STATUS" or "status".

    So you simply get that error message from the API because the external id "STATUS" is not an existing field in the app.

    Comment actions Permalink
  • Joshua Hay

    Hi Casper,

    You are correct - in actual fact it's the fields with external-id of "approved" that are causing me grief. I believe due to a conflict with the "approved : true/false" boolean field on the app item.

    Fatal error: Uncaught PodioBadRequestError: "Invalid value for rating of type approved. Value was 4, but must be between 0 and 1"

    0
    Comment actions Permalink
  • Casper Fabricius

    Hi Joshua,

    Podio does not have a "boolean" type field. The "approved" field is a category type field with two options: True (id: 0) and false (id: 1). When you post your values to the API, you must use a valid category option id. In this case, you are posting a value of "4", but only "0" and "1" are valid option ids for the "approved" field.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk