Difference between revisions of "Create Jobs"
From MyMobileWorkers API
| Line 31: | Line 31: | ||
|- | |- | ||
! job_number | ! job_number | ||
| − | | varchar(45) <br />* must be unique|| ✓ | + | | varchar(45) <br /><span style="font-size:80%; font-weight:normal">* must be unique</span>|| ✓ |
|- | |- | ||
! address_1 | ! address_1 | ||
| Line 67: | Line 67: | ||
|- | |- | ||
! mobile_user | ! mobile_user | ||
| − | | "{"username":"<username>"} <br />*nested JSON object|| ✓ | + | | "{"username":"<username>"} <br /><span style="font-size:80%; font-weight:normal">*nested JSON object</span>|| ✓ |
| + | |- | ||
| + | ! customer <br /><span style="font-size:80%; font-weight:normal">(must be a valid customer in mmw)</span> | ||
| + | | varchar(45) || | ||
|- | |- | ||
! colspan="3" | Repair Only Fields | ! colspan="3" | Repair Only Fields | ||
Revision as of 10:14, 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
| Standard Fields | ||
|---|---|---|
| Field | Expected Data | Required |
| job_number | varchar(45) * must be unique |
✓ |
| address_1 | varchar(45) | ✓ |
| address_2 | varchar(45) | |
| address_3 | varchar(45) | |
| address_4 | varchar(45) | |
| postcode | varchar(45) | ✓ |
| contact_name | varchar(45) | ✓ |
| contact_number_1 | varchar(45) | ✓ |
| contact_number_2 | varchar(45) | |
| timeslot | datetime | ✓ |
| special_instructions | text | |
| type (type of job) |
"repair","podc","gassafe" | ✓ |
| mobile_user | "{"username":"<username>"} *nested JSON object |
✓ |
| customer (must be a valid customer in mmw) |
varchar(45) | |
| Repair Only Fields | ||
| product | varchar(255) | |
| fault | varchar(255) | |
| Gas Safe Only Fields | ||
| special_instructions | text | |
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" }]}