1

I am attempting to update a Podio field (category field) value using a PUT call. I have tried dozens of variations on the below, but using what I found on the Podio developer site, I'm placing a PUT call using the following info:

PUT http://api.podio.com/item/{item_id}/value/{field_id} (These are correct)
Content-Type: application/json; charset=utf-8
Authorization: OAuth2 {access_token} (Again, this is correct)

"prequal-sent": 1

I have tried many different variations on the JSON itself, but the above is what the App Developer section says should would.

My issue is that no matter what I do, Podio just removes all of the data in that field and responds with a "success" response. So I know I'm authorized, and accessing the correct field, I just can't figure out the JSON to actually make it work. Any help would be greatly appreciated.

Marc F
  • 13
  • 2

1 Answers1

2

There are, probably, 2 changes needed to make it working:
1. Body of your request need to be in json format
2. Value should be an array but not single index

PUT https://api.podio.com/item/{item_id}/value/ 
Content-Type: application/json; charset=utf-8
Authorization: OAuth2 {access_token}

{"prequal-sent": [2]}

I've tried it on app which has single category field which is called 'Category' with external-id as 'category', which allows multiple options selected, and this command works great for me:

curl 
    -H "Content-Type: application/json" 
    -H "Authorization: OAuth2 <myauth>" 
    -X PUT 
    -d '{"category":[1,3]}' 
    "https://api.podio.com/item/<item-id>/value/"
Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19
  • I appreciate the response. I gave it a shot with no luck. I also tried: {"value": [2]} {"id": [2]} And a couple other variations with no luck. – Marc F Sep 21 '16 at 23:00
  • Could you try again with command line: curl -H "Content-Type: application/json" -H "Authorization: OAuth2 " -X PUT -d '{"prequal-sent":[1]}' "https://api.podio.com/item//value/" – Pavlo - Podio Sep 22 '16 at 02:15
  • I was able to resolve the issue using your example. Thank you so much. I've been working on this thing for days. The changes I made to make it work were to use https instead of http, and change from "http://api.podio.com/item/item_id/value/field_id" to "http://api.podio.com/item/item_id/value/" – Marc F Sep 22 '16 at 15:52