+ Add Question

How to update due_date with the 1.0 API

DS

Hi, I'm trying to update the due date of an item programmatically but it does not seem to be taking. I am not interested in updating via the date_string as it would impact all repeating items versus that particular task.

For instance:
curl -X POST -d "token=REDACTED" -d "due_date=2014-2-23T3:59" -d "id=130710373" https://todoist.com/API/updateItem
{"due_date": "Sun 09 Mar 2014 23:59:59", "assigned_by_uid": 1210909, "is_archived": 0, "labels": [], "sync_id": null, "in_history": 0, "has_notifications": 0, "date_added": "Sun 09 Mar 2014 15:31:21 +0000", "indent": 1, "children": null, "content": "Download snow mine", "is_deleted": 0, "user_id": 1210909, "due_date_utc": "Mon 10 Mar 2014 03:59:59 +0000", "id": 130710373, "priority": 1, "item_order": 68, "responsible_uid": null, "project_id": 110716080, "collapsed": 0, "checked": 0, "date_string": "today"}

What am I missing?

thanks!

All responses

David Trey staff
Replied on Mar 11, 2014 - 12:48 UTC

Hello Dave,

Please try to use date_string instead of due_date and if that won't help, let me know and I'll pass it to the developers.


Best regards,
David

DS
Dave Snigier premium
Replied on Mar 11, 2014 - 13:28 UTC

Thanks for the reply David. Updating the date_string does work, but I cannot use the date string in this case as it would override my recurring tasks.

David Trey staff
Replied on Mar 11, 2014 - 13:53 UTC

Dave,

Thanks, I'll ask the devs about it, though in general we always recommend to use the new SyncAPI instead.


Best regards,
David

David Trey staff
Replied on Mar 13, 2014 - 17:41 UTC

Dave,

According to our developers, you should send the same date_string, but change the due_date.


Best regards,
David

DS
Dave Snigier premium
Replied on Mar 14, 2014 - 00:01 UTC

Thanks David,
I tried that, but to no avail:
➜ curl -X POST -d 'token=REDACTED' -d 'id=130828990' -d 'due_date=2014-3-16T23:59' -d 'date_string=every friday' https://todoist.com/API/updateItem

{
"due_date": "Fri 14 Mar 2014 23:59:59",
"assigned_by_uid": 1210909,
"is_archived": 0,
"labels": [],
"sync_id": null,
"in_history": 0,
"has_notifications": 0,
"date_added": "Mon 10 Mar 2014 21:09:40 +0000",
"indent": 1,
"children": null,
"content": "Submit insurance claim for gym membership",
"is_deleted": 0,
"user_id": 1210909,
"due_date_utc": "Sat 15 Mar 2014 03:59:59 +0000",
"id": 130828990,
"priority": 4,
"item_order": 67,
"responsible_uid": null,
"project_id": 110716080,
"collapsed": 0,
"checked": 0,
"date_string": "every friday"
}

Brendon Wadey staff
Replied on Mar 14, 2014 - 00:48 UTC

Dave,

I have passed this to the devs.

Regards,
Brendon.

Amir Salihefendic staff
Replied on Apr 03, 2014 - 15:03 UTC

Hi Dave

Please try to supply the same date_string, but a different due date.

Regards,
Amir