Difference between revisions of "Create Job Attachment"
From MyMobileWorkers API
(→Summary) |
(→Summary) |
||
| Line 29: | Line 29: | ||
| − | The create job attachments method accepts an file to add as an attachement, the job_number of the job that the attachment references. | + | The create job attachments method accepts an file to add as an attachement, the job_number of the job that the attachment references. an an optional comment. |
| − | If validate_only is set the jobs will only be validated | + | If validate_only is set the jobs will only be validated and not actually inserted. This can be used to check an entire dataset for errors before submitting. |
== Example curl request == | == Example curl request == | ||
Revision as of 12:58, 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. an an optional comment.
If validate_only is set the jobs will only be validated and 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"}