Create item using Classic ASP

Comments

11 comments

  • Carl-Fredrik Herö

    I would guess the problem is date formatting, Podio needs the date in the ISO8601 format, i.e. 2014-04-09, not 2014-4-9.

    0
    Comment actions Permalink
  • Adrian Jones

    Hi Carl-Fredrik - Thanks for your reply. Good suggestion, but it's not that I'm afraid!

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    I saw some more things you need to try, almost all fields take an array of values (even it's a single value) and dates have start and end date. Example: "deadline-date": [{"start_date": "2014-04-10"}]

    0
    Comment actions Permalink
  • Adrian Jones

    Thanks Carl-Frederik - OK I'll have to have a look at that. Do you know if there is a full listing of the fields/arrays required anywhere? I saw the description for the php object but it's pretty hard to follow.

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    I know, the documentation on how to format the request could be better. I use https://developers.podio.com/doc/items and https://developers.podio.com/doc/items/add-new-item-22362 to figure out how the data should be formatted. But I do not need to understand it since I'm using the PHP library.

    I believe you will soon get some answers from the Podio staff that will clear things up.

    0
    Comment actions Permalink
  • Adrian Jones

    Thanks again for your help Carl-Frederik. I've now added in an array for the date field, so my JSON now looks like this:

    {"fields":{"Title":"NM131482-Seminars","category":3,"status":2,"deadline-date":[{"startDate":"2014-10-04"}],"strategy-reference":2551097,"progress":10,"last-update":"2014-04-09","responsibly-person":659257}}{"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/item\/app\/7661778\/","query_string":"","method":"POST"},"error_description":"Invalid value null (null): must be object","error":"invalid_value"}

    But as you can see, it's still failing.

    Anyone from Podio - feel free to jump in any time!

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    Hey! We getting somewhere, not the same error message! I think you need to change the "last update" as well. And the deadline-date needs to be "start_date", not "StartDate".

    0
    Comment actions Permalink
  • Carl-Fredrik Herö

    You could try to insert one field at a time, that way you can drill down and know which field is triggering the error.

    0
    Comment actions Permalink
  • Adrian Jones

    Thanks for your great suggestions - I corrected the the start date syntax, but still no good. The "last update" field is actually just a text field in the target app, so I kept that the way it is. Following your second suggestion, I dropped all the fields except the "Title" and it still fails, which means there must be something fundamentally wrong with my approach. I'm going to escalated this to a support ticket. If I get anywhere, I will post the answer here for the benefit of everyone.

    0
    Comment actions Permalink
  • Jarrett Barnett

    Based on your last error, I would 1) investigate the object you've sending, and 2) verify all required params are provided and not null

    0
    Comment actions Permalink
  • Adrian Jones

    Bit disappointed to learn that Podio does not support API problems. What would be REALLY helpful for me is if someone could post an example of a well-formed JSON post so I can see exactly what the API is expecting to see. From the error message I'm getting, it's clearly not seeing the post as an object in the correct format. I am pretty much stumped with this now and could really do with some help from the wider community.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk