Changing the status of an issue

Any authenticated user can change the status of an issue from Open to Closed and Closed to Open. Only government employees can change the status from Open to Acknowledged and Acknowledged to Closed. To check if the current user has this permission visit the current user page. Issues are Archived after being Closed for 7 days. The status can not change for Archived issues.

Close an Issue

Changing the status of an issue is similar to adding a comment on an issue.

POST /issues/<issue_id>/close

Required Parameters

Optional Parameters

Example

$ curl -i \
       --header "Content-Type: application/json" \
       --data '{"comment": "Pothole is gone"}' \
       https://seeclickfix.com/api/v2/issues/1/close

Response

Status: 201 Created
{
  "moderated": false,
  "comment": "Pothole is gone",
  "created_at": "2015-02-11T21:14:16-05:00",
  "updated_at": "2015-02-11T21:14:16-05:00",
  "commenter": {
    "avatar": {
      "full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
      "square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
    },
    "civic_points": 10,
    "id": 1,
    "name": "Jeffb",
    "role": "Verified Official",
    "witty_title": "Street Smart"
  },
  "issue": {
    "status": "Closed",
    "rating": 2
  },
  "media": {
    "video_url": "null",
    "image_full": "null",
    "image_square_100x100": "null"
  }
}

Example, with media

If you want to attach a image to your comment, you must use multipart form data not json.

$ curl -i \
       --header "Content-Type: multipart/form-data" \
       --data "comment=Pothole+is+gone" \
       --data "image=@photo.png" \
       https://seeclickfix.com/api/v2/issues/1/close

Reopen an Issue

Changing the status of an issue is similar to adding a comment on an issue.

POST /issues/<issue_id>/open

Required Parameters

Optional Parameters

Example

$ curl -i \
       --header "Content-Type: application/json" \
       --data '{"comment": "Pothole is back!"}' \
       https://seeclickfix.com/api/v2/issues/1/open

Media can be attached the same way as closing comments

Response

Status: 201 Created
{
  "moderated": false,
  "comment": "Pothole is back!",
  "created_at": "2015-02-12T10:24:52-05:00",
  "updated_at": "2015-02-12T10:24:52-05:00",
  "commenter": {
    "avatar": {
      "full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
      "square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
    },
    "civic_points": 10,
    "id": 1,
    "name": "Jeffb",
    "role": "Verified Official",
    "witty_title": "Street Smart"
  },
  "issue": {
    "status": "Open",
    "rating": 2
  },
  "media": {
    "video_url": "null",
    "image_full": "null",
    "image_square_100x100": "null"
  }
}

Acknowledge an Issue

Changing the status of an issue is similar to adding a comment on an issue.

POST /issues/<issue_id>/acknowledge

Required Parameters

Optional Parameters

Example

$ curl -i \
       --header "Content-Type: application/json" \
       --data '{"comment": "We have seen the pothole."}' \
       https://seeclickfix.com/api/v2/issues/1/acknowledge

Media can be attached the same way as closing comments

Response

Status: 201 Created
{
  "moderated": false,
  "comment": "a closing comment",
  "created_at": "2015-02-12T10:26:59-05:00",
  "updated_at": "2015-02-12T10:26:59-05:00",
  "commenter": {
    "avatar": {
      "full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
      "square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
    },
    "civic_points": 10,
    "id": 1,
    "name": "Jeffb",
    "role": "Verified Official",
    "witty_title": "Street Smart"
  },
  "issue": {
    "status": "Acknowledged",
    "rating": 2
  },
  "media": {
    "video_url": "null",
    "image_full": "null",
    "image_square_100x100": "null"
  }
}