|
1 |
| -# POST requests.:format |
| 1 | +# Create a New Service Request |
2 | 2 |
|
3 | 3 | Create a service request in the City's database. Once a service request has been processed by the City (this can take an undetermined amount of time), you should be able to call the GET service_request_id method (tokens/:token_id.:format) to get back the service_request_id for a SR. Therefore, it is nesseary to poll the GET service_request_id method until an SR id is returned. Because the Chicago endpoint may return service requests with no token and no service_reqeust_id in calls to GET service_requests while recently submitted SRs are still being processed by City systems, users of the GET service_requests method should ignore any service requests returned by the API until they have a service_request_id.
|
4 | 4 |
|
5 |
| -| Resource Information | | |
6 |
| -|----------------------|----------------------| |
7 |
| -| Method Name | Post Service Request | |
8 |
| -| Requires API key? | No | |
9 |
| -| Response Formats | JSON, XML | |
10 |
| -| HTTP Methods | GET | |
11 |
| -| JSONP | POST | |
| 5 | +| Resource Information | | |
| 6 | +|----------------------|-----------------------| |
| 7 | +| Method | POST requests.:format | |
| 8 | +| Requires API key? | Yes | |
| 9 | +| Response Formats | JSON, XML | |
| 10 | +| HTTP Methods | POST | |
12 | 11 |
|
13 | 12 | ## Arguments
|
14 | 13 |
|
15 |
| -| Argument | Required | Description | |
16 |
| -|--------------------|----------|-----------------------------------------------------------| |
17 |
| -| `jurisdiction_id` | optional | This is currently optional on Chicago's Open311 endpoint. | |
18 |
| -| `service_code` | required | This is obtained from GET Service List method. | |
| 14 | +| Argument | Required | Description | |
| 15 | +|--------------------|----------|------------------------------------------------------------------------------------------------------------------------| |
| 16 | +| `jurisdiction_id` | optional | Optional, but if it is included, it must be set to `cityofchicago.org` | |
| 17 | +| `service_code` | required | This is obtained from GET Service List method. | |
19 | 18 | | `attribute` | required | This takes the form of attribute[code]=value where multiple code/value pairs can be specified as well as multiple values for the same code in the case of a multivaluelist datatype (attribute[code1][]=value1&attribute[code1][]=value2&attribute[code1][]=value3) - see example. - This is only required if the service_code requires a service definition with required fields. |
|
20 | 19 | | `lat` | required | lat & long both need to be sent even though they are sent as two separate parameters. lat & long are required. |
|
21 | 20 | | `long` | required | lat & long both need to be sent even though they are sent as two separate parameters. lat & long are required. |
|
22 |
| -| `address_string` | required | This should be written from most specific to most general geographic unit, eg address number or cross streets, street name, neighborhood/district, city/town/village, county, postal code. | |
23 |
| -| `address_id` | optional | The internal address ID used by a jurisdiction's master address repository or other addressing system. | |
24 |
| -| `email` | optional | The email address of the person submitting the request. | |
25 |
| -| `device_id` | optional | The unique device ID of the device submitting the request. This is usually only used for mobile devices. | |
26 |
| -| `account_id` | optional | The unique ID for the user account of the person submitting the request. | |
27 |
| -| `first_name` | optional | The given name of the person submitting the request. | |
28 |
| -| `last_name` | optional | The family name of the person submitting the request. | |
29 |
| -| `phone` | optional | The phone number of the person submitting the request. | |
30 |
| -| `description` | optional | A full description of the request or report being submitted. | |
31 |
| -| `media_url` | optional | A URL to media associated with the request, eg an image. | |
| 21 | +| `address_string` | required | This should be written from most specific to most general geographic unit, eg address number or cross streets, street name, neighborhood/district, city/town/village, county, postal code. | |
| 22 | +| `address_id` | optional | The internal address ID used by a jurisdiction's master address repository or other addressing system. | |
| 23 | +| `email` | optional | The email address of the person submitting the request. | |
| 24 | +| `device_id` | optional | The unique device ID of the device submitting the request. This is usually only used for mobile devices. | |
| 25 | +| `account_id` | optional | The unique ID for the user account of the person submitting the request. | |
| 26 | +| `first_name` | optional | The given name of the person submitting the request. | |
| 27 | +| `last_name` | optional | The family name of the person submitting the request. | |
| 28 | +| `phone` | optional | The phone number of the person submitting the request. | |
| 29 | +| `description` | optional | A full description of the request or report being submitted. | |
| 30 | +| `media_url` | optional | A URL to media associated with the request, eg an image. | |
32 | 31 |
|
33 | 32 | ## Response Parameters
|
34 | 33 |
|
35 |
| -| Argument | Description | |
36 |
| -|----------|------------------------------------------------------------------------| |
| 34 | +| Argument | Description | |
| 35 | +|----------|------------------------------------------------------------------------------------------------------------------------------------------------------| |
37 | 36 | | `token` | If returned, use this to call GET service_request_id from a token to discover what the service_request_id is after it is created by the City system. |
|
0 commit comments