{"swagger":"2.0","info":{"version":"2.0.0","title":"3degrees-api"},"host":"api.threedegreesapp.com:9443","schemes":["https"],"paths":{"/activity":{"get":{"description":"Get the recent activity for the logged-in user, in reverse chronological order","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"app_mode","in":"query","required":false,"type":"string","enum":["matchmaker","single"]},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"The paginated list of activity","schema":{"type":"array","items":{"$ref":"#/definitions/Activity"}}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}}}}},"/activity/{id}":{"get":{"description":"Get details about a specific activity entry","produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer"},{"name":"session-key","in":"header","required":true,"type":"string"}],"responses":{"200":{"description":"The activity entry","schema":{"$ref":"#/definitions/Activity"}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Activity not found for the id, or not owned by the logged-in user","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Set the activity as viewed by the user","produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer"},{"name":"session-key","in":"header","required":true,"type":"string"}],"responses":{"204":{"description":"Successfully marked the activity as viewed","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Activity not found for the id, or not owned by the logged-in user","schema":{"$ref":"#/definitions/Error"}}}}},"/auth":{"delete":{"description":"Logout the user by invalidating the session-key in the header. Other session-keys for the user may still be valid.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"}],"responses":{"204":{"description":"Successful logout; session-key will be invalidated","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Missing session-key","schema":{"$ref":"#/definitions/Error"}}}}},"/auth/{login_type}":{"put":{"description":"Login the user. The content in the request body is determined by login-type. email: password facebook: auth code","consumes":["text/plain"],"produces":["application/json"],"parameters":[{"name":"login_type","in":"path","required":true,"type":"string","enum":["email","facebook"]},{"name":"login_form","in":"body","required":true,"schema":{"$ref":"#/definitions/LoginForm"}}],"responses":{"200":{"description":"Successful login; response is the session-key to be used for future requests.","schema":{"$ref":"#/definitions/SessionKey"}},"403":{"description":"Unsuccessful login","schema":{"$ref":"#/definitions/Error"}}}}},"/auth/forgot-password/{email_address}":{"put":{"description":"Initiate the forgot-password process for accounts that use the email login type","produces":["application/json"],"parameters":[{"name":"email_address","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Forgot-password process initiated successfully.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"The user account does not use email+password login and thus cannot reset the password. Try an alternate login_type.","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"No user with the given email address exists.","schema":{"$ref":"#/definitions/Error"}}}}},"/connections/{username}":{"delete":{"description":"Remove the connection between the \"username\" user and the logged-in user","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Successful connection removal","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Accept a connection request from the \"username\" user to the logged-in user","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Successful connection acceptance","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Connection request does not exist","schema":{"$ref":"#/definitions/Error"}}}}},"/content/{content_type}":{"get":{"description":"Get static content. Current supported content-type: invite.message, tos, privacy-policy, faq.","produces":["application/json","text/html","text/plain"],"parameters":[{"name":"content_type","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"The content to display.","schema":{"$ref":"#/definitions/Content"}},"404":{"description":"content-type does not exist.","schema":{"$ref":"#/definitions/Error"}}}}},"/content/{content_type}/{language}":{"get":{"description":"Get static content. Current supported content-type: invite.message, tos, privacy-policy, faq.","produces":["application/json","text/html","text/plain"],"parameters":[{"name":"content_type","in":"path","required":true,"type":"string"},{"name":"language","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"The content to display.","schema":{"$ref":"#/definitions/Content"}},"404":{"description":"content-type does not exist.","schema":{"$ref":"#/definitions/Error"}}}}},"/matches":{"get":{"description":"Get the list of active matches for the logged-in user. Use the match_type parameter to determine which type of matches are returned: matches that were already accepted vs pending matches that must be accepted by one party. If page > 0 and the result list is empty, there are no more connected users to show.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"match_type","in":"query","required":false,"default":"accepted","type":"string","enum":["accepted","pending"]},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"List of matches","schema":{"type":"array","items":{"$ref":"#/definitions/Match"}},"headers":{"count":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"}}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/matches/{username}":{"delete":{"description":"Logged-in user declines a suggested match with the given username. Will notify the other single and all associated matchmakers.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Match successfully declined.","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Logged-in user accepts a suggested match with the given username. Will notify the other single and all associated matchmakers.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Match accepted by both parties. Show the date suggestion screen.","schema":{"$ref":"#/definitions/Status"}},"202":{"description":"Match accepted. Waiting on the other party to accept.","schema":{"$ref":"#/definitions/Status"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Match suggestion with the given username is not active","schema":{"$ref":"#/definitions/Error"}}}}},"/matches/{username}/dates":{"get":{"description":"Lists the dates (date and time) that the :username user has suggested to meet with the logged-in user.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"The list of the proposed dates.","schema":{"$ref":"#/definitions/Dates"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Match with the given username is not active","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Suggest times for dates with the matched user","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"dates","in":"body","required":true,"schema":{"$ref":"#/definitions/Dates"}}],"responses":{"204":{"description":"Dates successfully suggested","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Match with the given username is not active","schema":{"$ref":"#/definitions/Error"}}}}},"/matches/{username}/dates/{date}":{"put":{"description":"Accept the given date","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"date","in":"path","required":true,"type":"string","format":"date-time"}],"responses":{"204":{"description":"Dates successfully accepted","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Match with the given username is not active, or date was not suggested.","schema":{"$ref":"#/definitions/Error"}}}}},"/matchmakers":{"get":{"description":"Get the list of matchmakers for the logged-in user. If page > 0 and the result list is empty, there are no more connected users to show.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"Matchmakers list","schema":{"type":"array","items":{"$ref":"#/definitions/User"}},"headers":{"count":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"}}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/me":{"get":{"description":"Get the logged-in user's information.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"}],"responses":{"200":{"description":"The full user object","schema":{"$ref":"#/definitions/PrivateUser"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Update the logged-in user's record.","consumes":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"user","in":"body","required":true,"schema":{"$ref":"#/definitions/UserForm"}}],"responses":{"204":{"description":"Successful update.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/me/image":{"post":{"description":"Upload an image for the logged-in user. Will automatically set the user's image URL to the URL where the image is saved. Only JPG and PNG are supported.","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"image","in":"formData","required":true,"type":"file"}],"responses":{"200":{"description":"The URL of the uploaded image","schema":{"$ref":"#/definitions/Image"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}},"413":{"description":"Image too large","schema":{"$ref":"#/definitions/Error"}}}}},"/me/is-single":{"delete":{"description":"Toggle the \"single\" flag to false. All users are considered available to be matchmakers.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"}],"responses":{"204":{"description":"Successful update; user can now only be viewed as a matchmaker.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Toggle the \"single\" flag to true. All users are considered available to be matchmakers.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"}],"responses":{"204":{"description":"Successful update; user can now be viewed as a single.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/me/match-with/{gender}":{"put":{"description":"Set the gender preference that the single would like to be paired with. Set to empty string for any gender.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"gender","in":"path","required":true,"type":"string","enum":["any","female","male"]}],"responses":{"204":{"description":"Successful update; user setting has been changed.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/me/password":{"put":{"description":"Set password for the logged-in user.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"password_form","in":"body","required":true,"schema":{"$ref":"#/definitions/PasswordForm"}}],"responses":{"200":{"description":"Successful update; user password has been changed.","schema":{"$ref":"#/definitions/SessionKey"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/messages/{username}":{"get":{"description":"Get the messages sent between the logged in user and the \"username\" user, ordered reverse chronologically","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"The messages sent between the two users","schema":{"type":"array","items":{"$ref":"#/definitions/Message"}},"headers":{"count":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"}}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"User does not exist","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Send a message from the logged in user to the \"username\" user","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"message","in":"body","required":true,"schema":{"$ref":"#/definitions/MessageForm"}}],"responses":{"204":{"description":"Message sent successfully","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"User does not exist","schema":{"$ref":"#/definitions/Error"}}}}},"/messages/{username}/image":{"post":{"description":"Upload an image to be sent from logged-in user to the username user. Only JPG and PNG are supported.","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"image","in":"formData","required":true,"type":"file"}],"responses":{"200":{"description":"The URL of the uploaded image","schema":{"$ref":"#/definitions/Image"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}},"413":{"description":"Image too large","schema":{"$ref":"#/definitions/Error"}}}}},"/singles":{"get":{"description":"Get the list of singles for the logged-in user. If page > 0 and the result list is empty, there are no more connected users to show.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"Singles list","schema":{"type":"array","items":{"$ref":"#/definitions/User"}},"headers":{"count":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"}}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}}}}},"/singles/{username}":{"patch":{"description":"For matchmaker mode only. Mark the logged-in matchmaker's connected single as having been viewed next to the match_username user. Fails if either party is not a single.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"match_username","in":"body","required":true,"schema":{"$ref":"#/definitions/UserName"}}],"responses":{"204":{"description":"Match logged","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Connected username or match_username is not exposed as a single","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Single is not connected to the logged-in user","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"For matchmaker mode only. Set-up the logged-in matchmaker's connected single with the match_username user. Fails if either party is not a single. All matchmakers connected to the single will be notified of the match. Both singles in the match will also be notified of the match.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"match_username","in":"body","required":true,"schema":{"$ref":"#/definitions/UserName"}}],"responses":{"204":{"description":"Match logged","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Connected username or match_username is not exposed as a single","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Single is not connected to the logged-in user","schema":{"$ref":"#/definitions/Error"}}}}},"/subscriptions/{type}":{"delete":{"description":"Delete the subscription to the given subscription type.","produces":["application/json"],"parameters":[{"name":"type","in":"path","required":true,"type":"string","enum":["ios_push"]}],"responses":{"204":{"description":"Unsubscribe successful.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Subscription type does not exist.","schema":{"$ref":"#/definitions/Error"}}}},"get":{"description":"Get the status of the subscription to the given subscription type.","produces":["application/json"],"parameters":[{"name":"type","in":"path","required":true,"type":"string","enum":["ios_push"]}],"responses":{"204":{"description":"Subscription is active.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Subscription is not active.","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Add the subscription to the given subscription type.","produces":["application/json"],"parameters":[{"name":"type","in":"path","required":true,"type":"string","enum":["ios_push"]},{"name":"metadata","in":"body","schema":{"$ref":"#/definitions/SubscriptionMetadata"}}],"responses":{"204":{"description":"Subscribe successful.","schema":{"$ref":"#/definitions/Empty"}},"400":{"description":"Unknown error","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Subscription type does not exist.","schema":{"$ref":"#/definitions/Error"}}}}},"/supported-versions/{version}":{"get":{"description":"Check to see if the given version is supported by the app.","produces":["application/json"],"parameters":[{"name":"version","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Version is supported.","schema":{"$ref":"#/definitions/Empty"}},"404":{"description":"Version is not supported.","schema":{"$ref":"#/definitions/Error"}}}}},"/users":{"get":{"description":"Search for users","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"matchmaker","description":"Find only singles connected to this matchmaker (username).","in":"query","type":"string"},{"name":"query","description":"Text to search for. Will look at the user's name and username.","in":"query","type":"string"},{"name":"singles_only","description":"Use this to filter only singles or matchmakers.","in":"query","type":"boolean"},{"name":"exclude_my_connections","description":"Set to true if the logged-in user's connections should not be included in the results.","in":"query","type":"boolean"},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"Search results. May be an empty array.","schema":{"type":"array","items":{"$ref":"#/definitions/User"}},"headers":{"count":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"}}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}}}},"put":{"description":"Create a user. Either PrivateUser or fb-auth-code is required (see UserForm defintion for details). For user profile updates, see PUT /me.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":false,"type":"string"},{"name":"UserForm","in":"body","required":false,"schema":{"$ref":"#/definitions/UserForm"}}],"responses":{"200":{"description":"User creation successful. Logged-in key in the response","schema":{"$ref":"#/definitions/SessionKey"}},"400":{"description":"Invalid user information","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"User already exists and the current session does not have permission to edit the user","schema":{"$ref":"#/definitions/Error"}}}}},"/users/{username}":{"get":{"description":"Get user details","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"username","in":"path","required":true,"type":"string"},{"name":"session-key","in":"header","required":false,"type":"string"}],"responses":{"200":{"description":"Public user details","schema":{"$ref":"#/definitions/User"}},"404":{"description":"User does not exist","schema":{"$ref":"#/definitions/Error"}}}}},"/users/{username}/connections":{"put":{"description":"Add a connection request from the logged-in user to the \"username\" user","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Successful connection request","schema":{"$ref":"#/definitions/Empty"}},"403":{"description":"Inactive login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"User does not exist","schema":{"$ref":"#/definitions/Error"}}}}},"/users/{username}/potential-matches":{"get":{"description":"List of other singles that the given user could be matched with. The given user must be directly connected to the logged-in user; the potential matches will be the singles of the matchmakers in the logged-in user's network.","produces":["application/json"],"parameters":[{"name":"session-key","in":"header","required":true,"type":"string"},{"name":"username","in":"path","required":true,"type":"string"},{"name":"age_from","description":"Filter the results to only results within this age range.","in":"query","required":false,"type":"integer"},{"name":"age_to","description":"Filter the results to only results within this age range.","in":"query","required":false,"type":"integer"},{"name":"gender","in":"query","required":false,"type":"string","enum":["female","male"]},{"name":"matchmaker","description":"Find only singles connected to this matchmaker (username).","in":"query","required":false,"type":"string"},{"name":"limit","in":"query","required":false,"type":"integer","default":100},{"name":"page","in":"query","required":false,"type":"integer","default":0}],"responses":{"200":{"description":"The list of users to be matched with the given user.","schema":{"type":"array","items":{"$ref":"#/definitions/User"}},"headers":{"count":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"}}},"403":{"description":"Expired login","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"User does not exist or is not connected to the logged-in user.","schema":{"$ref":"#/definitions/Error"}}}}}},"definitions":{"Activity":{"type":"object","description":"An entry in a user's activity list","required":["icon","id","message","timestamp"],"properties":{"attributes":{"$ref":"#/definitions/ActivityAttributes"},"icon":{"description":"The URL of the icon to show next the activity entry","type":"string"},"id":{"description":"A unique identifier for this activity","type":"integer"},"message":{"description":"The text that describes the activity that was performed","type":"string"},"origin_user":{"$ref":"#/definitions/BaseUser"},"response_message":{"description":"The text that describes the action a user took when responding to an activity. Optional.","type":"string"},"responses":{"description":"The ways to respond to the activity","type":"array","items":{"$ref":"#/definitions/ActivityResponse"}},"timestamp":{"type":"string","format":"date-time"},"viewed_at":{"type":"string","format":"date-time"}}},"ActivityAttributes":{"type":"object","description":"Contains metadata necessary for responding to various activities. Essentially a strongly-typed map.","properties":{"id":{"description":"A generic id; what it represents depends on the ActivityResponseType.","type":"integer"},"username":{"description":"The username of a users to respond to.","type":"string"}}},"ActivityResponse":{"type":"object","description":"The model that defines the actions that can be taken for a given Activity entry","required":["activity_response_type","text"],"properties":{"text":{"description":"The text to show when presenting the response","type":"string"},"activity_response_type":{"type":"string","description":"The different types of responses to activities","enum":["connection_request_accept","connection_request_decline","date_accepted_chat","date_suggested_view","match_suggested_view","match_suggested_second_degree_view","match_accepted_chat","match_accepted_by_me_suggest","message_received_view"]},"response_message":{"description":"The text that describes the action a user took when responding to an activity. Optional.","type":"string"}}},"BaseUser":{"type":"object","description":"Used when not all user attributes are necessary","required":["first_name","last_name"],"properties":{"first_name":{"type":"string","description":"User's first name"},"image":{"type":"string","description":"The root image for the user. Can be resized by appending WxH"},"last_name":{"type":"string","description":"User's last name"},"username":{"type":"string","description":"Unique username for the user; used in URLs"}}},"Content":{"type":"object","description":"The JSON-formatted content returned for the endpoint","required":["content"],"properties":{"content":{"type":"array","items":{"type":"string"}}}},"Dates":{"type":"object","description":"An array of dates","required":["dates"],"properties":{"dates":{"type":"array","items":{"type":"string","format":"date-time"}}}},"Education":{"type":"object","properties":{"degree":{"type":"string"},"school":{"type":"string"}}},"Employment":{"type":"object","properties":{"company":{"type":"string"},"title":{"type":"string"}}},"Empty":{"type":"object"},"Height":{"type":"object","required":["amount","unit"],"properties":{"amount":{"type":"integer","format":"int32"},"unit":{"type":"string","enum":["cm","in"]}}},"Image":{"type":"object","properties":{"url":{"type":"string"}}},"Location":{"type":"object","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"}}},"LoginForm":{"type":"object","properties":{"facebook":{"type":"object","properties":{"access_token":{"type":"string","description":"Either access_token or auth_code is required."},"auth_code":{"type":"string","description":"Either access_token or auth_code is required."}}},"email":{"type":"object","required":["email_address","password"],"properties":{"email_address":{"type":"string"},"password":{"type":"string"}}}}},"Match":{"type":"object","description":"Represents a match with the current user. Could potentially add a second user to this model, but that's not needed at the moment and is implied to be the currently logged-in user.","required":["matchmaker_username","user"],"properties":{"matchmaker_username":{"type":"string","description":"The username of the person who suggested the match. This user will only be directly connected to one single in the match."},"user":{"$ref":"#/definitions/User"}}},"Message":{"type":"object","required":["message","recipient","sender","timestamp"],"properties":{"message":{"type":"string"},"message_type":{"type":"string","description":"The type of message represented by the message property. For image, this is the url where the image is located. The message should be displayed differently for each different type of message.","enum":["image","text"]},"recipient":{"description":"The username of the user who received the message","type":"string"},"sender":{"description":"The username of the user who sent the message","type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"MessageForm":{"type":"object","properties":{"message":{"type":"string"}}},"PasswordForm":{"type":"object","required":["password"],"properties":{"password":{"type":"string"}}},"PrivateUser":{"type":"object","allOf":[{"$ref":"#/definitions/User"},{"type":"object","required":["email_address","password"],"properties":{"email_address":{"type":"string","description":"Email address of the user, used as the unique login identifier","pattern":"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,}$"},"password":{"type":"string"}}}]},"SessionKey":{"type":"object","required":["key"],"properties":{"key":{"type":"string"},"start_page":{"type":"string"}}},"Status":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["accepted","pending"]}}},"SubscriptionMetadata":{"type":"object","properties":{"device_token":{"type":"string","description":"Required for ios_push subscriptions"}}},"User":{"type":"object","description":"A 3 Degrees user","allOf":[{"$ref":"#/definitions/BaseUser"},{"type":"object","required":["is_single"],"properties":{"bio":{"type":"string"},"dob":{"type":"string","format":"date"},"education":{"$ref":"#/definitions/Education"},"employment":{"$ref":"#/definitions/Employment"},"gender":{"type":"string","enum":["female","male"]},"height":{"$ref":"#/definitions/Height"},"is_single":{"type":"boolean","description":"If True, user will be available to be matched up by matchmakers"},"location":{"$ref":"#/definitions/Location"},"match_with_gender":{"type":"string","enum":["female","male"]},"matchmakers":{"type":"array","description":"The user's matchmakers","items":{"$ref":"#/definitions/BaseUser"}},"singles":{"type":"array","description":"The user's singles","items":{"$ref":"#/definitions/BaseUser"}}}}]},"UserForm":{"type":"object","properties":{"fb_access_token":{"type":"string","description":"When specified, the user will be created/updated based on the FB account settings"},"fb_auth_code":{"type":"string","description":"When specified, the user will be created/updated based on the FB account settings"},"user":{"$ref":"#/definitions/PrivateUser"}}},"UserName":{"type":"object","properties":{"username":{"type":"string"}}},"Error":{"type":"object","properties":{"type":{"type":"string","description":"The class of the error"},"message":{"type":"string"}}}}}