4 followers Follow

Javascript, Update Item field value

Can you give us an example of a properly formatted javascript request that works with the podio-js client library for updating an item's field value? 

The docs essentially run in circles and looking at the ruby/php code it seems that there is an options object that is not mentioned anywhere in the js library for put requests.

Here's what I'm trying to do:

router.get('/app/put/item/field', function(req, res) {
    .then(function(error, response, body) {
        var requestData = {
            "values": " some string 42"
    return podio.request('put', '/item/{item_id}/value/{field_id}', requestData);
    .then(function(responseData) {
    .catch(function(err) {



Brian Keppinger

Official comment


Hi Brian,

I can spot 2 problems with your code, so let's start with those:


You are returning the result of podio.request, but that will simply be undefined because it's an async operation and the result of that operation will be available to you in the callback (that you're missing there).


podio.request('put', '/item/{item_id}/value/{field_id}', requestData, function(reponse) {
    console.log('Hey there', response);


The url you're using will never work because you're not actually replacing the placeholders with real values.

Something like this will work:

var itemId = 12345;
var fieldId = 28987;
var url = '/item/' + item_id + '/value/' + field_id

Or, with the new fancy ES6 syntax (note backticks and dollar signs):

const itemId = 12345;
const fieldId = 28987;
const url = `/item/${item_id}/value/${field_id}`

podio.request('PUT', url, requestData, function(reponse) {
    console.log('Hey there', response);


Hope that helps, and for future reference you can take a look at the documentation for making API requests through the podio-js client.

Domenico Matteo
Comment actions Permalink

Please sign in to leave a comment.



How about for like Install Share? How do I convert this to Javascript: 

PodioAppMarketShare.phpPodioAppMarketShare::install( $share_id, $attributes = array() );

I know I have to use this: /app_store/{share_id}/install

but not sure how or where to place the space_id so Podio will know in what workspace it will be installed.


Thanks in advanced!

Tikboy 0 votes
Comment actions Permalink

You will still use a POST where `share_id` is the ID of your share (app or pack) and you can pass a payload as shown here:

"space_id": The id of the space the shared app should be installed to,
"dependencies": The list of ids of the dependent shares that should also be installed. If not specified, all dependencies will be installed
Domenico Matteo 0 votes
Comment actions Permalink