I'm trying to post a job to an odesk account using their API. Unfortunately, I'm having trouble doing so.
I was able to get authenticated and GET my jobs, but when I tried POSTing a job, it returns a 400 error.
Here is response body.
HTTP Error 400: Bad Request
Exception at POST https://www.odesk.com/api/hr/v2/jobs.json
Server: nginx
Date: Thu, 11 Oct 2012 21:38:08 GMT
Content-Type: application/json
X-Odesk-Error-Code: 4
X-Odesk-Error-Message: Parameter job_data is missing or invalid
Last-Modified: Thu, 11 Oct 2012 21:38:08 GMT
Accept-Ranges: bytes
Cache-Control: no-store
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Transfer-Encoding: chunked
Connection: close
I'm also using python-odesk. I followed this to the T, and I got the above error. https://github.com/odesk/python-odesk/blob/master/examples/get_create_update_jobs.py
There was a discussion on this: https://www.odesk.com/community/node/19676 But I don't think it's solved.
I'm even trying to send through Postman and I get a: "Not all required params were filled"
I've tried the following packets to send to odesk. Assume XXXXXX is a valid buyer_team__reference.
data = {
'buyer_team__reference': XXXXXX,
'title': 'Test job from API',
'job_type': 'hourly',
'description': 'this is test job, please do not apply to it',
'visibility': 'invite-only',
'category': 'Web Development',
'subcategory': 'Web Programming',
'budget': 10,
'duration': 7,
}
or
data = {
'job_data': {
'buyer_team__reference': XXXXXX,
'title': 'Test job from API',
'job_type': 'hourly',
'description': 'this is test job, please do not apply to it',
'visibility': 'invite-only',
'category': 'Web Development',
'subcategory': 'Web Programming',
'budget': 10,
'duration': 7,
}
}
Note: I've tried many variations of this similar packet, but with no success.
If someone has experience in odesk API in any language, any help would be great.
Thanks.