Services relating to cities

Supported Formats

json

POST /api/v2/rp/cities/:id/users
Register a user account.

Supported Formats

json

Errors

Code Description
401 Unauthorized
422 Unprocessable Entity

Params

Param name Description
token
required

The token for user authentication.

Validations:

  • Must be a String

user
required

The new user.

Validations:

  • Must be a Hash

user[first_name]
required

The new user's first name.

Validations:

  • Must be a String

user[last_name]
required

The new user's last name.

Validations:

  • Must be a String

user[email]
required

The new user's email address.

Validations:

  • Must be a String

user[password]
required

The new user's password.

Validations:

  • Must be a String


POST /api/v2/rp/cities/:id/users/assign
Assign a user to the city's organization.

Supported Formats

json

Errors

Code Description
401 Unauthorized
404 Not Found
422 Unprocessable Entity

Params

Param name Description
token
required

The token for user authentication.

Validations:

  • Must be a String

user
required

The user.

Validations:

  • Must be a Hash

user[email]
required

The user's email address.

Validations:

  • Must be a String


GET /api/v2/rp/cities
All cities

Supported Formats

json

Errors

Code Description
401 Unauthorized
422 Unprocessable Entity

Params

Param name Description
token
required

The token for user authentication.

Validations:

  • Must be a String

per_page
optional

The number of results per page (max 100). Default: 50

Validations:

  • Must be a Integer

page
optional

Page number of the results to fetch. Default: 1

Validations:

  • Must be a Integer


GET /api/v2/rp/cities/:id
All submissions for city.

Supported Formats

json

Errors

Code Description
401 Unauthorized
422 Unprocessable Entity

Params

Param name Description
token
required

The token for user authentication.

Validations:

  • Must be a String

per_page
optional

The number of results per page (max 100). Default: 50

Validations:

  • Must be a Integer

page
optional

Page number of the results to fetch. Default: 1

Validations:

  • Must be a Integer

report_type
optional

Specifies the audit report type for the results.

Validations:

  • Must be a String

status
optional

Specifies the submission status for the results. Can be one of: “Received”, “Pending”, “Rejected”, “Complies”

Validations:

  • Must be a String

created_at
optional

Specifies the minimum date of submissions for the results. Must be an ISO 8601 date (YYYY-MM-DD).

Validations:

  • Must match regular expression /^[0-9]{4}-(?:1[0-2]|0[1-9])-(?:3[0-1]|2[0-9]|1[0-9]|0[1-9]){2}$/.