Difference between revisions of "Create Job Attachment"
From MyMobileWorkers API
(→Example curl request) |
(→Summary) |
||
| Line 18: | Line 18: | ||
|- | |- | ||
! | ! | ||
| − | | job_number || | + | | job_number || required |
|- | |- | ||
! | ! | ||
Revision as of 08:48, 21 May 2013
Contents |
Summary
| Create Job Attachment | ||
|---|---|---|
| URL | http://base_url/api_path/version/jobs/job/attachments/attachment | |
| Type | POST | |
| Params: | api_key | required |
| file | required | |
| job_number | required | |
| comment | required | |
| Response | JSON | |
The create job attachments method accepts an file to add as an attachement, the job_number of the job that the attachment references. ant an optional comment.
If validate_only is set the jobs will only be validated but not actually inserted. This can be used to check an entire dataset for errors before submitting.
Example curl request
curl -F api_key=YOUR KEY -F job_number=AJOBNUMBER -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/file.pdf "http://live.mymobileworkers.com:8080/api/1/jobs/job/attachments/attachment"
Responses
Example JSON
{"file":"tick.png","comment":"Transferred from API","created_at":"2013-05-20T14:42:37+00:00","job_status":"NEW"}