Difference between revisions of "Create Jobs"
From MyMobileWorkers API
(Created page with "{| border="1" class="wikitable" ! Create Job ! |- ! URL | http://base_url/api_path/version/mobile_users |- ! Type | POST |- ! Params: | api_key |- ! | TODO |- ! Response | ...") |
|||
| Line 14: | Line 14: | ||
|- | |- | ||
! | ! | ||
| − | | | + | | file |
|- | |- | ||
! Response | ! Response | ||
| Line 20: | Line 20: | ||
|} | |} | ||
| + | == JSON Parameters == | ||
| − | == | + | {| border="1" class="wikitable" |
| − | + | |+ The JSON file is passed in the post as the "file" | |
| + | ! Field | ||
| + | ! Expected Data | ||
| + | ! Required | ||
| + | |- | ||
| + | ! job_number | ||
| + | | varchar(45) <br />* must be unique|| ✓ | ||
| + | |- | ||
| + | ! Row heading A | ||
| + | | Cell B | ||
| + | | Cell C | ||
| + | |} | ||
== Example JSON == | == Example JSON == | ||
| Line 44: | Line 56: | ||
== Example curl request == | == Example curl request == | ||
| + | |||
| + | == Responses == | ||
Revision as of 09:35, 15 May 2013
| Create Job | |
|---|---|
| URL | http://base_url/api_path/version/mobile_users |
| Type | POST |
| Params: | api_key |
| file | |
| Response | JSON |
Contents |
JSON Parameters
| Field | Expected Data | Required |
|---|---|---|
| job_number | varchar(45) * must be unique |
✓ |
| Row heading A | Cell B | Cell C |
Example JSON
{"jobs":[{ "job_number":"SEJOB9", "address_1":"Rover Lane", "address_2":"Glasgow", "contact_name":"Joe Bloggs", "contact_number_1":"0770999999", "contact_number_2":"", "mobile_user":{"username":"MOB_01"}, "postcode":"G71 8TS","type":"repair", "timeslot":"2013-04-09 17:54:39", "special_instructions":"Door bell is faulty so knock on the door", "repair_description":"Replace U Bend" }]}