SHARE
TWEET

Untitled

a guest Jun 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {"swagger":"2.0","info":{"version":"v1","title":"Atlantic API","description":"A simple example ASP.NET Core Web API","termsOfService":"None"},"paths":{"/api/Guest/SignupEmail":{"post":{"tags":["Guest"],"summary":"User's registration (after email)","description":"Method registers the user in the system (user will login through email\\password).\r\nAfter registration, the system sends the message for verify of account.\r\nSample request:\r\n            \r\n    POST /Todo\r\n    {\r\n       \"email\": \"sam@smith.com\",\r\n       \"password\": \"123456\",\r\n       \"repeatpassword\": \"123456\"\r\n    }","operationId":"SignupEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"signupVM","in":"body","description":"Registration model","required":false,"schema":{"$ref":"#/definitions/SignUpEmailVM"}}],"responses":{"200":{"description":"If user added and message sent"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/ConfirmEmail":{"get":{"tags":["Guest"],"summary":"Confirm the user's account","description":"Method confirms the user's account after registers.","operationId":"ConfirmEmail","consumes":[],"produces":["application/json"],"parameters":[{"name":"userId","in":"query","description":"User's id (in the system)","required":false,"type":"integer","format":"int32"},{"name":"token","in":"query","description":"Token for verification","required":false,"type":"string"}],"responses":{"200":{"description":"If User verified"},"400":{"description":"If token doesn't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/LoginEmail":{"post":{"tags":["Guest"],"summary":"Login (after login\\password)","description":"Method authenticates the user in the system if his account verified.\r\nSample request:\r\n            \r\n    POST /Todo\r\n    {\r\n       \"email\": \"sam@smith.com\",\r\n       \"password\": \"elate1234\"\r\n    }","operationId":"LoginEmail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loginVM","in":"body","description":"login model","required":false,"schema":{"$ref":"#/definitions/LoginEmailVM"}}],"responses":{"200":{"description":"if the user is authenticated","schema":{"$ref":"#/definitions/TokenVM"}},"400":{"description":"If model doesn't valid or user blocked","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/ResetPassword":{"post":{"tags":["Guest"],"summary":"Reset password after email","description":"Method generates the new password for the account and sends it on email if it exists.\r\nSample request:\r\n            \r\n    POST /Todo\r\n    {\r\n       \"email\": \"sam@smith.com\"\r\n    }","operationId":"ResetPassword","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"passwordVM","in":"body","description":"Model with email","required":false,"schema":{"$ref":"#/definitions/ResetPasswordVM"}}],"responses":{"200":{"description":"If message with new password sent"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/SendConfirmationCode":{"post":{"tags":["Guest"],"summary":"Send code (though phone number)","description":"Method sends the one-time code for authentification though phone-number.\r\nTemp one-time code: 11111.\r\nSample request:\r\n            \r\n    POST /Todo\r\n    {\r\n       \"Phonenumber\": \"12345678910\"\r\n    }","operationId":"SendConfirmationCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loginVM","in":"body","description":"login model","required":false,"schema":{"$ref":"#/definitions/ConfirmationCodeVM"}}],"responses":{"200":{"description":"If sms with code sent"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/LoginPhone":{"post":{"tags":["Guest"],"summary":"Login (though phone number)","description":"Method authenticates the user (though phone number) in the system. If his doesn't has an account -\r\n             we are adding his profile in the system and sending sms with one-time password. \r\n             Email for verify of his new account doesn't send.\r\n             Sample request:\r\n            \r\n                 POST /Todo\r\n                 {\r\n                    \"phonenumber\": \"12345678910\",\r\n                    \"code\": 11111\r\n                 }","operationId":"LoginPhone","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loginVM","in":"body","required":false,"schema":{"$ref":"#/definitions/LoginPhoneVM"}}],"responses":{"200":{"description":"If the user is authenticated"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/LoginSocial":{"post":{"tags":["Guest"],"summary":"Login (though social network)","description":"Method authenticates the user (though social network) in the system. If his doesn't has an account -\r\nwe are adding his profile in the system. Email for verify of his new account doesn't send.\r\nSample request:\r\n            \r\n    POST /Todo\r\n    {\r\n       \"SocialNetwork\": 2,\r\n       \"Token\": \"ddad312D4dsadaASD23E2Ddsdfs3456\"\r\n    }","operationId":"LoginSocial","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loginVM","in":"body","description":"login model","required":false,"schema":{"$ref":"#/definitions/LoginSocialVM"}}],"responses":{"200":{"description":"If the user is authenticated","schema":{"$ref":"#/definitions/TokenVM"}},"400":{"description":"If model doesn't valid or user blocked","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Guest/UpdateAccessToken":{"get":{"tags":["Guest"],"summary":"Get new access-token","description":"Method generates and returns new access-token by refresh-token.","operationId":"UpdateAccessToken","consumes":[],"produces":["application/json"],"parameters":[{"name":"refreshToken","in":"query","description":"User's refresh-token","required":false,"type":"string"}],"responses":{"200":{"description":"New access-token","schema":{"type":"string"}},"403":{"description":"If refresh-token isn't valid or expired."},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/GuestApartment/GetById":{"get":{"tags":["GuestApartment"],"summary":"Get full description of apartment","description":"The method gets full description of apartmnet, which include info about parking, payment,\r\n            rules and amenities in the apartment","operationId":"GetById","consumes":[],"produces":["application/json"],"parameters":[{"name":"apartmentId","in":"query","description":"The id of apartment","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Return full description of apartment","schema":{"$ref":"#/definitions/ApartmentFullVM"}},"400":{"description":"If parametrs don't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Description of server error","schema":{"type":"string"}}}}},"/api/GuestApartment/GetByParams":{"post":{"tags":["GuestApartment"],"summary":"Gets apartments","description":"The method gets collection of apartments with short description\r\n            \r\n            Sample request:\r\n            \r\n                POST /body\r\n                {\r\n                    \"MinPrice\" : 500,\r\n                    \"MaxPrice\" : null,\r\n                    \"HasFurniture\" : true,\r\n                    \"Type\" : [ 1, 3]\r\n                }","operationId":"GetByParams","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"filter","in":"body","required":false,"schema":{"$ref":"#/definitions/FilterApartmentViewModel"}}],"responses":{"200":{"description":"Return collection with apartments","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ApartmentVM"}}},"500":{"description":"Description of server error","schema":{"type":"string"}}}}},"/api/Profile/UpdateProfile":{"put":{"tags":["Profile"],"summary":"Update my profile","description":"The method updates user's profile in the account\r\n\r\nSample request:\r\n\r\n    POST /body\r\n    {\r\n        \"firstname\": \"Sam\",\r\n        \"secondname\": \"Smith\",\r\n        \"lastname\": null,\r\n        \"email\": \"samsmith@gmail.com\",\r\n        \"dob\": 813283200,\r\n        \"sex\": \"male\",\r\n        \"phoneNumber\": \"+7123456789\",\r\n        \"country\": \"Belarus\",\r\n        \"comment\": \"I'm on vacation until 06/01/2019\"\r\n    }","operationId":"UpdateProfile","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"userVM","in":"body","description":"The model of profile","required":false,"schema":{"$ref":"#/definitions/UpdateUserProfileVM"}}],"responses":{"200":{"description":"If profile updated"},"401":{"description":"Unauthorized"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorAPI"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Profile/UpdateAvatar":{"put":{"tags":["Profile"],"summary":"Update my avatar","description":"The method updates user's avatar in the account.","operationId":"UpdateAvatar","consumes":["multipart/form-data"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"avatarFile","in":"formData","description":"Image","required":false,"type":"file"}],"responses":{"200":{"description":"If avatar updated"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorAPI"}},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Profile/DeleteAvatar":{"delete":{"tags":["Profile"],"summary":"Delete my avatar","description":"The method deletes user's avatar in the account.","operationId":"DeleteAvatar","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[],"responses":{"200":{"description":"If avatar removed"},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Profile/Logout":{"get":{"tags":["Profile"],"summary":"Logout","description":"","operationId":"Logout","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"allDevies","in":"query","description":"","required":false,"type":"boolean"}],"responses":{"200":{"description":"If tokens removed"},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Profile/GetSettings":{"get":{"tags":["Profile"],"summary":"Get user's settings","description":"The method returns description of user's settings.","operationId":"GetSettings","consumes":[],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"If settings updated","schema":{"$ref":"#/definitions/ErrorModel"}},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}},"400":{"description":"If model doesn't valid"}}}},"/api/Profile/UpdateSettings":{"put":{"tags":["Profile"],"summary":"Update user's settings","description":"The method updates user's settings\r\n\r\nSample request\r\n\r\n    POST /body\r\n    {\r\n        \"Id\" : 1002,\r\n        \"HasPushNotifications\" : true\r\n    }","operationId":"UpdateSettings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"item","in":"body","description":"The model of settings","required":false,"schema":{"$ref":"#/definitions/UpdateUserSettingsVM"}}],"responses":{"200":{"description":"If settings updated"},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}},"400":{"description":"If model doesn't valid"}}}},"/api/Push/DeletePushToken":{"delete":{"tags":["Push"],"summary":"Delete FCM token","description":"The method deletes FCM-token","operationId":"DeletePushToken","consumes":[],"produces":["application/json"],"parameters":[{"name":"pushToken","in":"query","description":"FCM-token","required":false,"type":"string"}],"responses":{"200":{"description":"If token deleted"},"500":{"description":"Description of server error","schema":{"type":"string"}},"401":{"description":"Unauthorized"}}}},"/api/Push/AddPushToken":{"post":{"tags":["Push"],"summary":"Add FCM token","description":"The method adds the new FCM token for push-notifications\r\n            \r\n            Sample request:\r\n            \r\n                POST /body\r\n                {\r\n                    \"Token\" : \"4fsdfya89yhb2rwydiwkh\",\r\n                    \"DeviceId\" : \"328yhd398ey2oeh\"\r\n                }","operationId":"AddPushToken","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tokenVM","in":"body","description":"The model of token","required":false,"schema":{"$ref":"#/definitions/CreatePushTokenVM"}}],"responses":{"200":{"description":"If token added"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorAPI"}},"500":{"description":"Description of server error","schema":{"type":"string"}},"401":{"description":"Unauthorized"}}}},"/api/Site/SendFeedback":{"post":{"tags":["Site"],"summary":"Send feedback","description":"Method sends the feedback to the admin of service\r\n\r\nSample request:\r\n\r\n    POST /body\r\n    {\r\n       \"title\": \"Your service doesn't work!\",\r\n       \"name\": \"Sam smith\",\r\n       \"email\": \"sam@smith.com\",\r\n       \"message\" : \"Lorem ipsum dolor sit amet\"\r\n    }","operationId":"SendFeedback","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"feedbackVM","in":"body","description":"Model of feedback","required":false,"schema":{"$ref":"#/definitions/FeedbackVM"}}],"responses":{"200":{"description":"If message sent"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorAPI"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/Underground/GetUndergrounds":{"get":{"tags":["Underground"],"summary":"Get all stations","description":"The method gets list of stations from selected city","operationId":"GetUndergrounds","consumes":[],"produces":["application/json"],"parameters":[{"name":"cityId","in":"query","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Returns collection of stations","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/UndergroundViewModel"}}},"400":{"description":"If parametrs don't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/User/GetProfile":{"get":{"tags":["User"],"summary":"Get user's profile","description":"The method gets the full description of the user's profile","operationId":"GetProfile","consumes":[],"produces":["application/json"],"parameters":[{"name":"userId","in":"query","description":"The id of user","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"User profile","schema":{"$ref":"#/definitions/UserProfileVM"}},"400":{"description":"Ivalid data","schema":{"$ref":"#/definitions/ErrorAPI"}},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/UserApartment/Hidden":{"get":{"tags":["UserApartment"],"summary":"Hidden apartment","description":"Method hiddens user's apartment. It will be hidden from other users.","operationId":"Hidden","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"apartmentId","in":"query","description":"Id of appartment","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"If appartment hidden"},"400":{"description":"If parametrs don't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/UserApartment/Block":{"get":{"tags":["UserApartment"],"summary":"Block apartment","description":"Method blocks apartment","operationId":"Block","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"apartmentId","in":"query","description":"Id of appartment","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"If appartment blocked"},"400":{"description":"If parametrs don't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/UserApartment/Delete":{"delete":{"tags":["UserApartment"],"summary":"Delete apartment","description":"Method deletes user's apartment. It will be hidden from other users and owner.","operationId":"Delete","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"apartmentId","in":"query","description":"Id of appartment","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"If appartment deleted"},"400":{"description":"If parametrs don't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"401":{"description":"Unauthorized"},"500":{"description":"Server error","schema":{"type":"string"}}}}},"/api/UserApartment/CreateApartment":{"post":{"tags":["UserApartment"],"summary":"Add apartment","description":"Method adds new apartment","operationId":"CreateApartment","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"apartmentVM","in":"body","description":"Model of new apartment","required":false,"schema":{"$ref":"#/definitions/CreateApartmentVM"}}],"responses":{"200":{"description":"If appartment added"},"400":{"description":"Ivalid data","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}},"401":{"description":"Unauthorized"}}}},"/api/UserApartment/AddPhoto":{"post":{"tags":["UserApartment"],"summary":"Add new apartment's photo","description":"The method adds new photo to the description of apartment.","operationId":"AddPhoto","consumes":["multipart/form-data"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"Name","in":"formData","description":"Photo's name (for example: \"kitchen\")","required":true,"type":"string"},{"name":"Comment","in":"formData","description":"Comment to photo (for example: \"New big kitchen\")","required":true,"type":"string"},{"name":"Position","in":"formData","description":"Position on the page (for example: 2)","required":true,"type":"integer","format":"int32"},{"name":"IsMain","in":"formData","description":"Status","required":true,"type":"boolean"},{"name":"ApartmentId","in":"formData","description":"Id of apartment","required":true,"type":"integer","format":"int32"},{"name":"File","in":"formData","description":"Photo-file","required":true,"type":"file"}],"responses":{"200":{"description":"If photo added"},"400":{"description":"If model doesn't valid","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}},"401":{"description":"Unauthorized"}}}},"/api/UserApartment/Update":{"put":{"tags":["UserApartment"],"summary":"Update apartment","description":"Method updated full description of user's apartment","operationId":"Update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"apartmentVM","in":"body","description":"","required":false,"schema":{"$ref":"#/definitions/UpdateApartmentVM"}}],"responses":{"200":{"description":"If appartment updated"},"400":{"description":"Ivalid data","schema":{"$ref":"#/definitions/ErrorModel"}},"500":{"description":"Server error","schema":{"type":"string"}},"401":{"description":"Unauthorized"}}}},"/api/UserApartment/GetMyApartments":{"get":{"tags":["UserApartment"],"summary":"Get all user's apartments","description":"Method returns collection of user's apartments (short description)","operationId":"GetAllMyApartments","consumes":[],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Collection of apartment","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/ApartmentVM"}}},"500":{"description":"Server error","schema":{"type":"string"}},"401":{"description":"Unauthorized"}}}}},"definitions":{"SignUpEmailVM":{"description":"Model for registration of user after email\\password","required":["email","password","repeatPassword"],"type":"object","properties":{"email":{"description":"User's email\\login (It will be uniq)","pattern":"[a-zA-Z0-9@-_-.]{10,50}","type":"string"},"password":{"description":"User's password","pattern":"[a-zA-Z0-9!@#$%^&*-+=]{6,30}","type":"string"},"repeatPassword":{"description":"User's duplicate of password","pattern":"[a-zA-Z0-9!@#$%^&*-+=]{6,30}","type":"string"}}},"ErrorModel":{"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}},"LoginEmailVM":{"description":"Model for login of user after email\\password","required":["email","password"],"type":"object","properties":{"email":{"description":"User's email\\login","pattern":"[a-zA-Z0-9@-_-.]{10,50}","type":"string"},"password":{"description":"User's password","pattern":"[a-zA-Z0-9!@#$%^&*-+=]{6,30}","type":"string"}}},"TokenVM":{"description":"Model with tokens for JWT-auth","type":"object","properties":{"access_token":{"description":"Access token (short term)","type":"string"},"refresh_token":{"description":"Refresh token (long term)","type":"string"}}},"ResetPasswordVM":{"description":"Model for reset of password","required":["email"],"type":"object","properties":{"email":{"description":"User's email","pattern":"[a-zA-Z0-9@-_-.]{10,50}","type":"string"}}},"ConfirmationCodeVM":{"description":"Model for send confirmation code for login though phone number","required":["phoneNumber"],"type":"object","properties":{"phoneNumber":{"description":"User's phone number","type":"string"}}},"LoginPhoneVM":{"description":"Model for login though phone number","required":["phoneNumber","code"],"type":"object","properties":{"phoneNumber":{"description":"User's phone number","type":"string"},"code":{"format":"int32","description":"Confirmation one-time code","type":"integer"}}},"LoginSocialVM":{"description":"Model for login of user though social network","required":["socialNetwork","token"],"type":"object","properties":{"socialNetwork":{"description":"Option of social network","enum":["Facebook","Instagram","Vk","Google"],"type":"string"},"token":{"description":"Access-token of the social network, which gets the client though App","type":"string"}}},"ApartmentFullVM":{"description":"Model with full description of apartment","type":"object","properties":{"amenity":{"$ref":"#/definitions/AmenityVM","description":"Model of apartment amenity"},"parking":{"$ref":"#/definitions/ParkingVM","description":"Model with type of parking places"},"payment":{"$ref":"#/definitions/PaymentVM","description":"Model with description of payment"},"rule":{"$ref":"#/definitions/RuleVM","description":"User's rule"},"owner":{"$ref":"#/definitions/UserProfileVM","description":"Profile of owner"},"photos":{"description":"Collection of apartment photos","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/PhotoVM"}},"id":{"format":"int32","description":"The id of apartment","type":"integer"},"lat":{"description":"Latitude","type":"string"},"long":{"description":"Longitude","type":"string"},"address":{"description":"Address of apartment (City, street, house)","type":"string"},"floor":{"format":"int32","description":"Floor","type":"integer"},"apartmentType":{"description":"Type of appertment","enum":["Room","OneBedroomApartment","TwoBedroomApartment","ThreeBedroomApartment","FourBedroomApartment","MoreBedroomApartment","House","Studio"],"type":"string"},"currency":{"description":"Currency","enum":["USD","EUR","BYR","RUB"],"type":"string"},"price":{"format":"int32","description":"Cost per month","type":"integer"},"createTime":{"format":"int64","description":"Ad create time","type":"integer"},"updateTime":{"format":"int64","description":"Ad last modification time","type":"integer"},"lastUpTime":{"format":"int64","description":"Ad last 'UP' time","type":"integer"},"viewCount":{"format":"int32","description":"Count of view","type":"integer"},"isBlocked":{"description":"If admin blocked of apartment","type":"boolean"},"isHidden":{"description":"If owner hidden of apartment","type":"boolean"},"isDeleted":{"description":"If  owner deleted of apartment","type":"boolean"}}},"AmenityVM":{"description":"Model for apartment amenity","type":"object","properties":{"additional":{"$ref":"#/definitions/AdditionalVM"},"furniture":{"$ref":"#/definitions/FurnitureVM"},"technique":{"$ref":"#/definitions/TechniqueVM"}}},"ParkingVM":{"description":"Model for description of apartment's parking place (if exist)","type":"object","properties":{"hasFreeParking":{"enum":["NotSet","True","False"],"type":"string"},"hasPersonalParking":{"enum":["NotSet","True","False"],"type":"string"},"hasPaidParking":{"enum":["NotSet","True","False"],"type":"string"}}},"PaymentVM":{"description":"Model for description of payment rules","type":"object","properties":{"hasPrepayment":{"enum":["NotSet","True","False"],"type":"string"},"payerUtilities":{"enum":["Tenant","Owner"],"type":"string"},"comment":{"type":"string"}}},"RuleVM":{"description":"Model for description of rules","type":"object","properties":{"hasAnimal":{"enum":["NotSet","True","False"],"type":"string"},"hasChild":{"enum":["NotSet","True","False"],"type":"string"},"isFamily":{"enum":["NotSet","True","False"],"type":"string"},"isStudent":{"enum":["NotSet","True","False"],"type":"string"},"isMusician":{"enum":["NotSet","True","False"],"type":"string"},"isSmoking":{"enum":["NotSet","True","False"],"type":"string"},"isMan":{"enum":["NotSet","True","False"],"type":"string"},"isWoman":{"enum":["NotSet","True","False"],"type":"string"}}},"UserProfileVM":{"description":"Model with full description of user","type":"object","properties":{"id":{"format":"int32","description":"Id","type":"integer"},"firstname":{"description":"Firstname","type":"string"},"secondname":{"description":"Secondname","type":"string"},"lastname":{"description":"Lastname","type":"string"},"email":{"description":"Email","type":"string"},"dob":{"format":"int64","description":"Date of birthday","type":"integer"},"registrationDate":{"format":"int64","description":"Date of registration","type":"integer"},"sex":{"description":"Sex","enum":["NotSet","Male","Female"],"type":"string"},"phoneNumber":{"description":"Phone number","type":"string"},"country":{"description":"Country","enum":["Belarus","France"],"type":"string"},"comment":{"description":"Comment\\about me","type":"string"},"role":{"description":"Role","enum":["Admin","User"],"type":"string"},"pathToAvatar":{"description":"Link to the avatar","type":"string","readOnly":true}}},"PhotoVM":{"description":"Model with description of photo","type":"object","properties":{"id":{"format":"int32","description":"Photo's ID","type":"integer"},"name":{"description":"Photo's name (for example: \"kitchen\")","type":"string"},"comment":{"description":"Comment to photo (for example: \"New big kitchen\")","type":"string"},"position":{"format":"int32","description":"Position on the page (for example: 2)","type":"integer"},"isMain":{"description":"Status","type":"boolean"},"link":{"description":"Link on the photo","type":"string","readOnly":true}}},"AdditionalVM":{"description":"Model for additional features","type":"object","properties":{"hasDishes":{"enum":["NotSet","True","False"],"type":"string"},"hasLinens":{"enum":["NotSet","True","False"],"type":"string"},"hasSoundInsulation":{"enum":["NotSet","True","False"],"type":"string"}}},"FurnitureVM":{"description":"Model for apartment furtniture","type":"object","properties":{"hasBed":{"enum":["NotSet","True","False"],"type":"string"},"hasSofa":{"enum":["NotSet","True","False"],"type":"string"},"hasDinnerTable":{"enum":["NotSet","True","False"],"type":"string"},"hasWorkplace":{"enum":["NotSet","True","False"],"type":"string"},"hasCabinet":{"enum":["NotSet","True","False"],"type":"string"},"hasMirror":{"enum":["NotSet","True","False"],"type":"string"}}},"TechniqueVM":{"description":"Model for description techniques in the apartment","type":"object","properties":{"hasTV":{"enum":["NotSet","True","False"],"type":"string"},"hasWifi":{"enum":["NotSet","True","False"],"type":"string"},"hasFridge":{"enum":["NotSet","True","False"],"type":"string"},"hasWasher":{"enum":["NotSet","True","False"],"type":"string"},"hasWaterFilter":{"enum":["NotSet","True","False"],"type":"string"},"hasIron":{"enum":["NotSet","True","False"],"type":"string"},"hasIroningBoard":{"enum":["NotSet","True","False"],"type":"string"},"hasAirConditioning":{"enum":["NotSet","True","False"],"type":"string"},"hasHairDryer":{"enum":["NotSet","True","False"],"type":"string"},"hasVacuumCleaner":{"enum":["NotSet","True","False"],"type":"string"},"hasStove":{"enum":["NotSet","True","False"],"type":"string"},"hasOven":{"enum":["NotSet","True","False"],"type":"string"},"hasMicrowave":{"enum":["NotSet","True","False"],"type":"string"}}},"FilterApartmentViewModel":{"description":"The model for filtering of apartments","type":"object","properties":{"lat":{"description":"Latitude","type":"string"},"long":{"description":"Longitude","type":"string"},"minPrice":{"format":"int32","description":"Min price of apartment","type":"integer"},"maxPrice":{"format":"int32","description":"Max price of apartment","type":"integer"},"hasFurniture":{"description":"Furniture (something)","enum":["NotSet","True","False"],"type":"string"},"type":{"description":"Type of apartment","uniqueItems":false,"type":"array","items":{"enum":["Room","OneBedroomApartment","TwoBedroomApartment","ThreeBedroomApartment","FourBedroomApartment","MoreBedroomApartment","House","Studio"],"type":"string"}},"undergroundIds":{"description":"Id of underground","uniqueItems":false,"type":"array","items":{"format":"int32","type":"integer"}}}},"ApartmentVM":{"description":"Model with short description of appartment","type":"object","properties":{"id":{"format":"int32","description":"The id of apartment","type":"integer"},"lat":{"description":"Latitude","type":"string"},"long":{"description":"Longitude","type":"string"},"address":{"description":"Address of apartment (City, street, house)","type":"string"},"floor":{"format":"int32","description":"Floor","type":"integer"},"apartmentType":{"description":"Type of appertment","enum":["Room","OneBedroomApartment","TwoBedroomApartment","ThreeBedroomApartment","FourBedroomApartment","MoreBedroomApartment","House","Studio"],"type":"string"},"currency":{"description":"Currency","enum":["USD","EUR","BYR","RUB"],"type":"string"},"price":{"format":"int32","description":"Cost per month","type":"integer"},"createTime":{"format":"int64","description":"Ad create time","type":"integer"},"updateTime":{"format":"int64","description":"Ad last modification time","type":"integer"},"lastUpTime":{"format":"int64","description":"Ad last 'UP' time","type":"integer"},"viewCount":{"format":"int32","description":"Count of view","type":"integer"},"isBlocked":{"description":"If admin blocked of apartment","type":"boolean"},"isHidden":{"description":"If owner hidden of apartment","type":"boolean"},"isDeleted":{"description":"If  owner deleted of apartment","type":"boolean"},"photos":{"description":"Collection of apartment's photos","uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/PhotoVM"}}}},"UpdateUserProfileVM":{"description":"Model for update of user's profile","required":["email"],"type":"object","properties":{"firstname":{"description":"First name","type":"string"},"secondname":{"description":"User's second name","type":"string"},"lastname":{"description":"Last name","type":"string"},"email":{"description":"Email","pattern":"[a-zA-Z0-9@-_-.]{10,50}","type":"string"},"dob":{"format":"int64","description":"Date of birthday","type":"integer"},"sex":{"description":"Sex","enum":["NotSet","Male","Female"],"type":"string"},"phoneNumber":{"description":"Contact phone","type":"string"},"country":{"description":"Country (location)","enum":["Belarus","France"],"type":"string"},"comment":{"description":"Short comment about user","type":"string"}}},"ErrorAPI":{"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}},"UpdateUserSettingsVM":{"description":"Model for update of user's settigns","required":["id","hasPushNotifications"],"type":"object","properties":{"id":{"format":"int32","description":"Setting's Id","type":"integer"},"hasPushNotifications":{"description":"State of push notification (disabled or enabled)","type":"boolean"}}},"CreatePushTokenVM":{"description":"Model for add the new push token to the user's account","type":"object","properties":{"token":{"description":"FCM's token","type":"string"},"deviceId":{"description":"Id of user's device","type":"string"}}},"FeedbackVM":{"required":["title","name","email","message"],"type":"object","properties":{"title":{"description":"Message title","maxLength":50,"minLength":3,"type":"string"},"name":{"description":"User's name. It may be any name","maxLength":50,"minLength":3,"type":"string"},"email":{"description":"User's contact email","pattern":"[a-zA-Z0-9@-_-.]{10,50}","type":"string"},"message":{"description":"Message text","maxLength":1000,"minLength":10,"type":"string"}}},"UndergroundViewModel":{"description":"Model with description of metro station","type":"object","properties":{"id":{"format":"int32","description":"Id of underground","type":"integer"},"name":{"description":"Name of underground (for example: Vostok)","type":"string"},"line":{"description":"Line of underground (for example: Red, Blue)","type":"string"},"lat":{"description":"Latitude","type":"string"},"long":{"description":"Longitude","type":"string"}}},"CreateApartmentVM":{"description":"Model for add the new apartment","required":["lat","long","address","apartmentType","currency","price"],"type":"object","properties":{"lat":{"description":"Latitude","type":"string"},"long":{"description":"Longitude","type":"string"},"address":{"description":"Address of apartment (City, street, house)","maxLength":250,"minLength":10,"type":"string"},"floor":{"format":"int32","description":"Floor","maximum":200.0,"minimum":0.0,"type":"integer"},"apartmentType":{"description":"Type of appertment","enum":["Room","OneBedroomApartment","TwoBedroomApartment","ThreeBedroomApartment","FourBedroomApartment","MoreBedroomApartment","House","Studio"],"type":"string"},"currency":{"description":"Currency","enum":["USD","EUR","BYR","RUB"],"type":"string"},"price":{"format":"int32","description":"Cost per month","maximum":100000000.0,"minimum":0.0,"type":"integer"},"amenity":{"$ref":"#/definitions/AmenityVM","description":"Model of apartment amenity"},"parking":{"$ref":"#/definitions/ParkingVM","description":"Model with type of parking places"},"payment":{"$ref":"#/definitions/PaymentVM","description":"Model with description of payment"},"rule":{"$ref":"#/definitions/RuleVM","description":"User's rule"}}},"UpdateApartmentVM":{"required":["id","lat","long","address","floor","apartmentType","currency","price"],"type":"object","properties":{"id":{"format":"int32","description":"The id of apartment","type":"integer"},"lat":{"description":"Latitude","type":"string"},"long":{"description":"Longitude","type":"string"},"address":{"description":"Address of apartment (City, street, house)","maxLength":250,"minLength":10,"type":"string"},"floor":{"format":"int32","description":"Floor","maximum":200.0,"minimum":0.0,"type":"integer"},"apartmentType":{"description":"Type of appertment","enum":["Room","OneBedroomApartment","TwoBedroomApartment","ThreeBedroomApartment","FourBedroomApartment","MoreBedroomApartment","House","Studio"],"type":"string"},"currency":{"description":"Currency","enum":["USD","EUR","BYR","RUB"],"type":"string"},"price":{"format":"int32","description":"Cost per month","maximum":100000000.0,"minimum":0.0,"type":"integer"},"amenity":{"$ref":"#/definitions/AmenityVM","description":"Model of apartment amenity"},"parking":{"$ref":"#/definitions/ParkingVM","description":"Model with type of parking places"},"payment":{"$ref":"#/definitions/PaymentVM","description":"Model with description of payment"},"rule":{"$ref":"#/definitions/RuleVM","description":"User's rule"}}}},"securityDefinitions":{"Bearer":{"name":"Authorization","in":"header","type":"apiKey","description":"Please insert JWT with Bearer into field"}},"security":[{"Bearer":[]}]}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top