Create Job Items
From MyMobileWorkers API
Contents |
Summary
| Create Job | ||
|---|---|---|
| URL | http://:base_url/:api_path/:version/jobs/job/items | |
| Type | POST | |
| Params: | api_key | required |
| file | required | |
| job_number | required | |
| Response | JSON | |
Job items can only be added to a PODC job.
This method is transactional. If one item fails validation, then no items will be created.
Returns a list of valid job items and a list of failed job items. Even if items are valid, they will not be created unless there are no failed items.
JSON Parameters
| Field | Expected Data | Required |
|---|---|---|
| name | varchar(45) | ✓ |
| type | "C","D" * Collect/Deliver |
✓ |
| quantity | int(4) | ✓ |
| notes | varchar(45) |
Example JSON
Example curl request
Responses
Example JSON
{ "result":"failed", "failed":[ { "item":{ "name":"item2", "type":null, "notes":null, }, "errors":[ { "error_code":"JBI002", "error_message":"Job item type is null" } ] } ], "valid":[ { "name":"item1", "type":"C", "notes":"notes", } ] }