NAV
json

GoWeeWee API Introduction

Welcome to GoWeeWee API. You can use our API to access GoWeeWee API endpoints, which can get/post information in our database. You can view code response examples in the dark area to the right.

Successful response to end points is 200, all other responses are errors. Please scroll down to bottom of the page to view correspond error code.

All requests will staus and message, please refer to Errors section for more detail.

Data Dictionary

Following GoWeeWee dataset dictionary is suitable only for the US public restroom dataset.

Column Name Description Type Example
restroom_id Restroom identifier. String 20
restroom_name Name of the restroom. String Bryant Park
restroom_type Restroom type. Restaurant, Bar, Mall, etc. String Public
restroom_address Street address of restroom. String 33 Oak Ave.
restroom_city Restroom city. String Manhattan
restroom_state State of restroom in short code. String NY
restroom_country Restroom country in short code. String US
restroom_zipcode Restroom zip code in 5 digit format. String 10001
latitude Restroom latitude coordinate. String 36.714767
longitude Restroom longitude coordinate. String -121.662912
monday_opening_time Monday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
monday_closing_time Monday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
tuesday_opening_time Tuesday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
tuesday_closing_time Tuesday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
wednesday_opening_time Wednesday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
wednesday_closing_time Wednesday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
thursday_opening_time Thursday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
thursday_closing_time Thursday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
friday_opening_time Friday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
friday_closing_time Friday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
saturday_opening_time Saturday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
saturday_closing_time Saturday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
sunday_opening_time Sunday restroom opening time, if the value is 23:59:59, the restroom is closed for the day. Time 09:00:00
sunday_closing_time Sunday restroom closing time, if the value is 00:00:00, the restroom is closed for the day. Time 23:00:00
accessibility Wheelchair accessible. 0 for not accessible, 1 for accessible. String 1
baby_station Does restroom equipped with baby station? 0 for no, 1 for yes. String 1
stalls Single stall (privateroom) or multi-stalls (multistalls) restroom. String privateroom
unisex Restroom gender-neutral status. 0 for no, 1 for yes. String 1
note Special note for the restroom. String Restroom is located near the crossroad of 5th Ave. and 26th St.
created_date Restroom added date. Date 2021-05-19
last_update Date of when the restroom was last updated. Date 2021-05-22

Restrooms

Get Restroom Reviews

Get Restroom Reviews JSON response:

{
    "status": "200",
    "message": "success",
    "num_reviews": 2,
    "data": [
        {
            "rid": "826",
            "text": "It is so cool, coolest toilet ever seen",
            "review_date": "2019-03-27",
            "review_id": "09b948401-ef6a-1-999999-1f6fd1ca8022"
        },
        {
            "rid": "826",
            "text": "Clean and unique",
            "review_date": "2019-02-11",
            "review_id": "09b50501-ef6a-1-999999-1f6fd1ca8022"
        }
    ]
}

This endpoint gets reviews of a specified restroom.

HTTP Request

POST https://goweewee.com/api/v2/restrooms/get/ratings_reviews.php

URL Parameters

Parameter Type Description
rid (required) String Restroom identifier

Response Parameters

Parameter Type Description
status String request response code.
message String request response message.
num_reviews String Number of reviews for the restroom.
rid String Restroom identifier.
review_id String review identifier.
text Text Review.
review_date Date Date when review is posted.

Report a Restroom

Report a Restroom JSON response

{
    "status": "200",
    "message": "Report received, thank you."
}

This endpoint enables user to report a restroom that has problems.

HTTP Request

POST https://goweewee.com/api/v2/restrooms/post/report_restrooms.php

Query Parameters

Parameter Default Description
rid (required) NULL Restroom identifier
report_type (required) closed. A selection of report reasons concatenates with ".". For example. restroom closed. dirty restroom. Incorrect restroom hours., etc.
comment Comment about the specific reason for reporting the restroom.

Post Restroom Ratings and Review

Post Restroom Ratings and Reviews JSON response:

{
    "status": "200",
    "message": "Thank you for your ratings."
}

This endpoint post ratings and reviews to targeted restroom.

HTTP Request

POST https://goweewee.com/api/v2/restrooms/post/ratings_reviews.php

URL Parameters

Parameter Type Description
rid (required) String Restroom identifier
ratings (required) int Restroom ratings, from 1 to 5.
restroom_review String Review for target restroom.

Report Abusive Review

Report abusive review JSON response:

{
    "status": "200",
    "message": "Report received, thank you."
}

This endpoint enables user to report abusive reviews.

HTTP Request

POST https://goweewee.com/api/v2/restrooms/post/report_reviews.php

URL Parameters

Parameter Type Description
review_id (required) String Restroom review identifier
report_text (required) Text Comments on abusive review.

Errors

GoWeeWee API uses the following response error codes:

Error Code Meaning
400 Request failed -- Cannot connect to GoWeeWee server.
401 Query error -- database query execution error.
402 Restroom ratings error -- Ratings cannot be lower than one star.
403 Email error -- Cannot send email.
405 Identifier error -- Cannot find records from the provided restroom identifier.
406 Identifier error -- Cannot find records from the provided review identifier.