Title | Approve owner |
---|---|
Headers | Authorization=Bearer token |
Description | Access rights: administrator |
URL | /api/owners/approve |
Method | POST |
Params | id=owner id |
Data Params | example {"id": "1"} |
Success Response | example {"success":true} |
Last active
April 22, 2016 08:57
-
-
Save daryailyushina/115c2c55487311f51383 to your computer and use it in GitHub Desktop.
Title | Change password |
---|---|
URL | /api/users/passwordChange |
Method | POST |
Headers | Authorization=Bearer token Content-type: application/json |
Params | password=current password newPassword=new password |
Data Params | example { "password": "password", "newPassword": "pass" } |
Success Response | example { "token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9" } |
Title | Coupon add/edit photo |
---|---|
Description | Access rights: oner, admin, employee |
URL | /api/coupons/{id}/photoEditing |
Method | POST |
Headers | Authorization=Bearer token |
Params | multipartfile |
Data Params | example { "file":"image.jpg" } |
Success Response | example { "success": "true" } |
Title | Coupon cancellation |
---|---|
URL | /api/owners/couponCancellation/{couponId} |
Method | POST |
Description | Access rights: oner, admin |
Headers | Authorization=Bearer token |
Success Response | example {"entity":{ "newPrice":140, "id":19, "title":"Test title", "price":200, "discount":30, "count":5, "timeAvailable":"2000-07-01T16:30:00+0000", "status":"closed", "startDate":"2000-07-01T12:00:00+0000", "verificationCode":"545krte", "category":"food", "shop":{ "id":14, "name":"name", "address":{ "location":"442 Strand, London WC2R 0QU, United Kingdom", "lat":51.508872, "lng":-0.125346 }, "description":"The best shop", "openingHours":[{ "openTime":"09:00 am", "closeTime":"11:30 pm", "day":"Wednesday" }, ... { "openTime":"09:00 am", "closeTime":"00:30 pm", "day":"Friday" }], "phoneNumber":"+23423423424" }, "description":"description" } } |
Title | Coupons list/Coupons Search |
---|---|
URL | /api/coupons |
Method | GET |
Headers | Authorization=Bearer token Content-type: application/json |
Params | customerfilter[category]=category - optionalfilter[tracking]=true - for option "tracked" - optionalno parameters for option "all" owner filter[month]=month - optionalfilter[owner]=true filter[status]=coupon_status("pending","inProgress","finished") search filter[title]=shop or coupon title - optionalget distance from shop position=user current position - optional("lng lat") |
Data Params | optional example { "filter[status]": "finished", "filter[ownerId]": "2", "position": "27.5133915 53.9129273"} |
Success Response | example [ { "newPrice":140, "availableCount":5, "id":25, "title":"Test titjjle", "price":200, "discount":30, "count":5, "timeAvailable":"2016-02-05T14:50:04+0000", "status":"finished", "startDate":"2000-07-01T12:00:00+0000", "verificationCode":"545krte", "category":"food", "shop":{ "id":28, "name":"shop", "address":{ "location":"442 Strand, London WC2R 0QU, United Kingdom", "point":"SRID=4326;POINT(27.5130862 53.9192823)", "shopDistance":"707.617763355" }, "description":"The best shop ttt", "openingHours":[{ "openTime":"00:00 am", "closeTime":"00:30 pm", "day":"Monday" },{ ... ],"file":{ "image":"/uploads/shop/28.jpg", "filePath":"http://104.131.56.228/uploads/coupon/25.jpg" }}, "file":{ "image":"/uploads/coupon/25.jpg", "filePath":"http://104.131.56.228/uploads/coupon/25.jpg" }, "description":"description" }] |
Title | Create coupon |
---|---|
Description | Access rights: oner, admin, employee |
URL | /api/coupons |
Method | POST |
Headers | Authorization=Bearer token Content-type: application/json |
Params | title=title price=price newPrice=newPrice discount=discount - (1..100) count=count startDate=DateTime verificationCode=verificationCode category=category timeAvailable=DateTime description=description |
Data Params | example { "title":"Test title", "price":"200", "discount":"30", "count":"5", "startDate":"2016-01-01T12:00:00+0000", "verificationCode":"545krte", "category":"food", "timeAvailable":"2016-07-01T16:30:00+0000", "description": "description" } |
Success Response | example { "entity": { "id": 12, "title": "title", "newPrice": 140, "price": 200, "discount": 30, "count": 5, "timeAvailable": "2000-07-01T16:30:00+0000", "status": "closed", "startDate": "2000-07-01T12:00:00+0000", "verificationCode": "545krte", "category": "food", "description": "description" } "shop": { "id": 1, "name": "name", "address": {}, "description": "shop description", "openingHours": [], "phoneNumber": "+23486424" } } } |
Title | Create shop |
---|---|
Description | Access rights: owner |
URL | /api/shops |
Method | POST |
Headers | Authorization=Bearer token Content-type: application/json |
Params | name=name description=description phoneNumbers=array of phoneNumbers("phoneNumbers":[{"phoneNumber":"+234242343"}, {"phoneNumber":"+111111111"}]) address:{location=address} - valid address string category=category opening hours - for 7 days openTime=time - string closeTime=time - string day=dayName |
Data Params | example { "name": "name", "description": "description", "category":"Food", "phoneNumbers":[{"phoneNumber":"+234242343"}, {"phoneNumber":"+111111111"}], "address":{"location":"442 Strand, London WC2R 0QU, United Kingdom"}, "openingHours": [{ "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Monday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Sunday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Tuesday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Wednesday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Thursday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Friday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Saturday" }] } |
Success Response | example { "id": 47, "name": "name", "category": "Food", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "point":"POINT(-0.1253459 51.5088718)" }, "description": "shop description", "openingHours": [{ "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Monday" }, ... { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Saturday" } ], "phoneNumbers":[{"phoneNumber":"+234242343"}, {"phoneNumber":"+111111111"}], } |
Title | Customer old coupons list |
---|---|
URL | customers/oldCoupons |
Method | GET |
Headers | Authorization=Bearer token |
Success Response | example [ { "status": "realized", "coupon": { "newPrice": 140, "id": 9, "title": "Test title", "price": 200, "discount": 30, "count": 4, "timeAvailable": "2000-07-01T16:30:00+0000", "status": "active", "startDate": "2000-07-01T12:00:00+0000", "verificationCode": "545krte", "category": "food", "shop": { "id": 13, "name": "llee0hidlole", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "The best shop", "openingHours": [], "phoneNumber": "+23423423424", "file": "/uploads/shop/13.jpg" }, "description": "description" } }, {} ] |
Title | Edit coupon |
---|---|
Description | Access rights: oner, admin, employee |
URL | /api/coupons/{id} |
Method | PUT |
Headers | Authorization=Bearer token Content-type: application/json |
Params | title=title - changeble price=price - changeble newPrice=newPrice - changeble discount=discount - (1..100) - changeble count=count - changeble startDate=DateTime - changeble verificationCode=verificationCode - changeble category=category timeAvailable=DateTime - changeble description=description - changeble |
Data Params | example { "title":"Test title", "price":"200", "discount":"30" , "count":"5", "startDate":"2016-01-01T12:00:00+0000", "verificationCode":"545krte", "category":"food", "timeAvailable":"2016-07-01T16:30:00+0000", "description": "description" } |
Success Response | example { "entity": { "id": 12, "title": "title", "newPrice": 140, "price": 200, "discount": 30, "count": 5, "timeAvailable": "2000-07-01T16:30:00+0000", "status": "closed", "startDate": "2000-07-01T12:00:00+0000", "verificationCode": "545krte", "category": "food", "description": "description" } "shop": { "id": 1, "name": "name", "address": {}, "description": "shop description", "openingHours": [], "phoneNumber": "+23486424" } } } |
Title | Change employee to admin |
---|---|
URL | /api/owners/employeeToAdmin |
Method | POST |
Description | Access rights: oner |
Headers | Authorization=Bearer token Content-type: application/json |
Params | employeeId=id |
Data Params | example { "employeeId":"2" } |
Success Response | example { "id":2, "username":"userName", "email":"email@test.com", "login":"email@test.com", "role":"admin", "favouriteShops":[], "age":23, "birthDate":"1992-07-01T00:00:00+0000", "sex":"male", "discr":"customer" } |
Title | User favourite shops |
---|---|
URL | /api/users/favouriteShops |
Method | GET |
Headers | Authorization=Bearer token |
Success Response | example [{ "shop":{ "id":4, "name":"llee0ooohdlole", "address":{ "location":"442 Strand, London WC2R 0QU, United Kingdom", "lat":51.508872, "lng":-0.125346 }, "description":"The best shop", "openingHours": [{ "openTime":"09:00 am", "closeTime":"11:30 pm", "day":"Monday"}, ... ], "phoneNumber":"+23423423424" }, "activeCoupons":0 }, { "shop":{ ... }, "activeCoupons":0 }, ... ] |
Title | Find user by id |
---|---|
URL | /api/users/{id} |
Method | GET |
Headers | Authorization=Bearer token |
Success Response | example { "entity": { "id": 4, "username": "username", "email": "email@test.com", "role": "customer", "favourite_shops": [], "coupons": [], "birth_date": "1991-09-08T00:00:00+0000", "sex": "male", "discr": "customer" } } |
Title | Get coupons list |
---|---|
Headers | Authorization=Bearer token |
Description | Access rights: administrator |
URL | /api/coupons/list |
Method | GET |
Params | page=number - currect page string=search_text - optional |
Data Params | example {"page": "1"} |
Success Response | example { "coupons": [ { "id": 39, "title": "Test title", "businessId": 14, "businessName": "shop_name", "email": "aa@test.local" }, ... ], "totalCount": 29 } |
Title | Get customers list |
---|---|
Headers | Authorization=Bearer token |
Description | Access rights: administrator |
URL | /api/customers/list |
Method | GET |
Params | page=number - currect page string=search_text - optional |
Data Params | example {"page": "1"} |
Success Response | example { "customers": [ { "id":48, "username":"bbgg", "email":"bbgg@test.com", "birthDate":"1990-07-01T00:00:00+0000", "sex":"male" }, {}, ...], "totalCount":12 } |
Title | Get owners list |
---|---|
Headers | Authorization=Bearer token |
Description | Access rights: administrator |
URL | /api/owners/list |
Method | GET |
Params | filter=unApproved - show unAprroved owners filter=approved - show aprroved owners filter=all - show all owners page=number - currect page string=search_text - optional |
Data Params | example { "filter": "all", "page": "1" } |
Success Response | example [{ "id": 56, "email": "sss@net", "status": "unApproved", "organizationNumber": "55555", "businessName": null }, { "id": 50, "email": "test@intellectsoft.net", "status": "approved", "organizationNumber": "66666", "businessName": "grdu6ugrd" },... ] |
Title | Login/ Facebook login |
---|---|
URL | /api/sessions |
Method | POST |
Headers | Content-type: application/json |
Params | simple loginidentity=email password=pass facebook login identity=token provider=facebook |
Data Params | simple login example { "identity": "email", "password": "pass" } facebook login example { "identity": "CAAYHq69nKZBEBAOBNak7ZA…", "provider":"facebook" } |
Success Response | example { "token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9" } |
Title | Owner add employee |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/owners/employeeAdding |
Method | POST |
Params | employeeId=id |
Data Params | example { "employeeId": "2", } |
Success Response | example { "entity": { "id": 2, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "employee", "favouriteShops": [], "age": 20, "birthDate": "1995-07-01T00:00:00+0000", "sex": "female", "owner": { "id": 33, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "owner", "favouriteShops": [], "organizationNumber": "hrthth546", "address": "London 24-14", "discr": "owner" }, "discr": "customer" } } |
Title | Approve pending coupon |
---|---|
Description | Access rights: owner, admin |
URL | api/owners/couponApproval/{id} |
Method | POST |
Headers | Authorization=Bearer token |
Success Response | example { "success": "true" } |
Title | Get shop |
---|---|
URL | /api/owners/shops |
Description | Access rights: oner, admin, employee |
Method | GET |
Headers | Authorization=Bearer token |
Success Response | example { "entity":{ "id":4, "name":"rtert", "address":{ "latitude":51.5088718, "longitude":-0.1253459, "location":"442 Strand, London WC2R 0QU, United Kingdom", "point":"SRID=4326;POINT(-0.1253459 51.5088718)" }, "description":"rtertret", "openingHours":[{ "openTime":"1:00 AM","closeTime":"7:00 AM","day":"Monday"}, ... ], "phoneNumbers":[ {"phoneNumber":"2342343242"} ], "file":{ "image":null }, "category":"Health" }, "rating":null, "followers":1, "statistics":{ "averageAge":26 ,"young":0, "middleAge":100, "adult":0, "male":100, "female":0 } } |
Title | Owner remove admin |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/owners/removeAdmin |
Method | POST |
Params | adminId=id |
Data Params | example { "adminId": "2", } |
Success Response | example { "id":12, "username":"bfb", "email":"bvb@test.com", "login":"bvb@test.com", "role":"employee", "favouriteShops":[], "age":30, "birthDate":"1985-07-01T00:00:00+0000", "sex":"women", "discr":"customer" } |
Title | Owner remove employee |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/owners/removeEmployee |
Method | POST |
Params | employeeId=id |
Data Params | example { "employeeId": "2", } |
Success Response | example { "id": 2, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "employee", "favouriteShops": [], "age": 20, "birthDate": "1995-07-01T00:00:00+0000", "sex": "female", "owner": { "id": 33, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "owner", "favouriteShops": [], "organizationNumber": "hrthth546", "address": "London 24-14", "discr": "owner" }, "discr": "customer" } |
Title | Owner show employee list |
---|---|
Headers | Authorization=Bearer token |
URL | /api/owners/employeeList |
Method | GET |
Success Response | example [{ "id": 12, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "admin", "favouriteShops": [], "age": 30, "birthDate": "1985-07-01T00:00:00+0000", "sex": "female", "discr": "customer" }, { "id": 2, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "employee", "favouriteShops": [], "age": 23, "birthDate": "1992-07-01T00:00:00+0000", "sex": "male", "discr": "customer" }] |
Title | Send push notification |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | api/push/notification |
Method | POST |
Params | message=message |
Success Response | example {'success' : true} |
Title | QR code generator |
---|---|
URL | /qrcode/{shop_id}.{extension} |
Method | GET |
Success Response | QR code |
Title | Register device |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/push/deviceRegistration |
Method | POST |
Params | token=device_token |
Success Response | example {'success' : true} |
Title | Remove coupon |
---|---|
Headers | Authorization=Bearer token |
Description | Access rights: administrator |
URL | /api/coupons/{id} |
Method | DELETE |
Success Response | example {"success":true} |
Title | Reset password |
---|---|
Description | automaticly generate new password and send it to user via email |
URL | /api/users/passwordResetting |
Method | POST |
Headers | Content-type: application/json |
Params | email=user_email |
Data Params | example { "email": "email@gmail.com" } |
Success Response | example { "success":"true" } |
Title | User set shop rating |
---|---|
URL | /api/users/shopRating |
Method | POST |
Headers | Authorization=Bearer token Content-type: application/json |
Params | shopId=id rating: rating(1, ..., 5) |
Data Params | example { "shopId":"14", "rating":"5" } |
Success Response | example { "success": true } |
Title | Shop add/edit photo |
---|---|
Description | Access rights: oner, admin |
URL | /api/shops/photoEditing |
Method | POST |
Headers | Authorization=Bearer token |
Params | multipartfile |
Data Params | example { "file":"image.jpg" } |
Success Response | example { "success": "true" } |
Title | Shop update |
---|---|
URL | /api/shops |
Method | PUT |
Headers | Authorization=Bearer token Content-type: application/json |
Params | name=name description=description phoneNumbers=array category=category address:{location=address} - valid address string opening hours - for 7 days openTime=time - string closeTime=time - string day=dayName |
Data Params | example { "name": "name", "category": "Food", "description": "description", "phoneNumbers":["+234242343","+4444444"], "address":{"location":"442 Strand, London WC2R 0QU, United Kingdom"}, "openingHours": [{ "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Monday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Sunday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Tuesday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Wednesday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Thursday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Friday" }, { "openTime": "09:00 am", "closeTime": "11:30 pm", "day": "Saturday" }] } |
Success Response | example { "id":37, "name":"name", "address":{ "location":"442 Strand, London WC2R 0QU, United Kingdom", "point":"POINT(-0.1253459 51.5088718)", "shopDistance":"1874756.5809971"}, "description":"description", "openingHours":[{ "openTime":"00:00 am", "closeTime":"00:30 pm", "day":"Monday"}, ... ], "phoneNumbers":["+234242343","+4444444"], "file":{"image":"/uploads/shop/37.jpg", "filePath":"http://104.131.56.228/uploads/shop/37.jpg"}, "category":"Food" } |
Title | Show coupon info and statistics |
---|---|
Description | СustomersInfo statistics shows only for coupons with status “realized” |
URL | /api/coupons/{id} |
Method | GET |
Headers | Authorization=Bearer token Content-type: application/json |
Success Response | example { "entity":{ "newPrice":1020, "availableCount":11, "id":25, "title":"Title", "price":1200, "discount":15, "count":11, "timeAvailable":"2016-02-29T09:16:04+0000", "status":"inProgress", "startDate":"2016-03-04T09:16:04+0000", "verificationCode":"3333333", "category":"food", "shop":{ "id":28, "name":"shop", "address":{ "location":"442 Strand, London WC2R 0QU, United Kingdom", "point":"SRID=4326;POINT(27.5130862 53.9192823)", "shopDistance":"707.617763355" }, "description":"The best shop", "openingHours":[{ "openTime":"00:00 am", "closeTime":"00:30 pm", "day":"Monday"},... ], "file":{}},"file":{ "image":"/uploads/coupon/25.jpg", "filePath":"http://104.131.56.228/uploads/coupon/25.jpg" }, "description":"description" }, "statistics": { "customersInfo": { "averageAge": 0, "young": 0, "middleAge": 0, "adult": 0, "male": 0, "female": 0 }, "couponsInfo": { "tracking": 2, "realized": 0, "expiresCount": 5, "expiresTime": -495571268 } } } |
Title | Show shop |
---|---|
URL | /api/shops |
Method | GET |
Headers | Authorization=Bearer token |
Params | show all shops by distancefilter[lat]=current_lat_coordinate filter[lng]=current_lng_coordinate filter[radius]=distance in metres get shop by "id" filter[id]=shop_id get shop statistics filter[id]=shop_id filter[owner]=true |
Data Params | show all shops by distance example { "filter[lng]": "27.5133915", "filter[lat]": "53.9129273", "filter[radius]": "500", } get shop by id example { "filter[id]": "14", } |
Success Response | "show all shops by distance" - example [{ "id": 25, "name": "me", "address": { "location": "vulica Biruzova 10\u0410, Minsk", "point": "SRID=4326;POINT(27.5133915 53.9129273)" }, "description": "The best shop", "openingHours": [{ "openTime": "00:00 am", "closeTime": "00:30 pm", "day": "Monday" }, ... ], "phoneNumber": "+23423423424tt" }, { "id": 26, "name": "shopName", "address": { ... } ] "get shop by id" example {"entity":{ "id":14, "name":"shop_name", "address":{ "location":"442 Strand, London WC2R 0QU, United Kingdom" }, "description":"The best shop", "openingHours":[{ "openTime":"09:00 am", "closeTime":"11:30 pm", "day":"Wednesday" }, ... ], "phoneNumber":"+23423423424444" }, "rating":[{ "rating":"3.7500000000000000" }] } "get shop statistics {"entity":{ "id":24, "name":"alatan", "address":{ "latitude":53.9050381, "longitude":27.5600181, "location":"vulica Internacyjana\u013anaja 33\u0412, Minsk 220030", "point":"SRID=4326;POINT(27.5600181 53.9050381)" }, "description":"The best shop ttt", "openingHours":[{ "openTime":"00:00 am","closeTime":"00:30 pm","day":"Monday"}, ... ], "phoneNumbers":null, "file":{ "image":null }, "category":null }, "rating":null, "followers":0, "statistics":{ "averageAge":0, "young":0, "middleAge":0, "adult":0, "male":0, "female":0 } } |
Title | Show usesr settings |
---|---|
Headers | Authorization=Bearer token |
URL | /api/users |
Method | GET |
Success Response | example { "entity": { "id": 2, "username": "name", "email": "email@test.com", "role": "customer", "favouriteShops": [], "age": 25, "birthDate": "1990-07-01T00:00:00+0000", "sex": "male", "discr": "customer" } } |
Title | UnApprove owner |
---|---|
Headers | Authorization=Bearer token |
Description | Access rights: administrator |
URL | /api/owners/unApprove |
Method | POST |
Params | id=owner id |
Data Params | example {"id": "1"} |
Success Response | example {"success":true} |
Title | User follow shop |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/users/shopFollowing |
Method | POST |
Params | shopId=id |
Data Params | example { "shopId": "id" } |
Success Response | example { "id": 33, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "owner", "favouriteShops": [{ "id": 4, "name": "name", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "description", "openingHours": [], "phoneNumber": "+23423423424" }, { "id": 7, "name": "name", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "description", "openingHours": [], "phoneNumbers": [] }], "organizationNumber": "hrthth546", "category": "Food", "address": "London 24-14", "discr": "owner" } |
Title | User realize coupon |
---|---|
URL | /api/users/couponRealization |
Method | POST |
Headers | Authorization=Bearer token Content-type: application/json |
Params | verificationCode=shop_id or coupon verificationCode, depends on realization way couponId=10 |
Data Params | example { "verificationCode":"1(or 21321jk4hj)", "couponId":"10" } |
Success Response | example { "entity": { "status": "realized", "coupon": { "newPrice": 140, "id": 9, "title": "Test title", "price": 200, "discount": 30, "count": 4, "timeAvailable": "2000-07-01T16:30:00+0000", "status": "active", "startDate": "2000-07-01T12:00:00+0000", "verificationCode": "545krte", "category": "food", "shop": { "id": 13, "name": "llee0hidlole", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "The best shop", "openingHours": [], "phoneNumber": "+23423423424", "file": "/uploads/shop/13.jpg" }, "description": "description" } } } |
Title | User registration |
---|---|
URL | /api/users |
Method | POST |
Headers | Content-type: application/json |
Params | customerusername=username password=password email=email@test.com role=customer sex=male/female birthDate=Y-M-d owner username=username password=pass email=email@test.com role=owner address=address organizationNumber=organizationNumber |
Data Params | customer example { "username": "username", "password": "pass", "email":"email@test.com", "role": "customer", "sex":"male", "birthDate":"1990-07-01" } owner example { "username": " username ", "password": "pass", "email": "email@test.com", "role": "owner", "address":"address", "organizationNumber":"organizationNumber" } |
Success Response | example { "token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9" } |
Title | User stop tracking coupon |
---|---|
URL | /api/users/couponStopTracking/{coupon_id} |
Method | POST |
Headers | Authorization=Bearer token |
Success Response | example {"success": true} |
Title | User track coupon |
---|---|
URL | /api/users/couponTracking/{coupon_id} |
Method | GET |
Headers | Authorization=Bearer token |
Success Response | example { "entity": { "status": "tracking", "coupon": { "newPrice": 140, "id": 9, "title": "Test title", "price": 200, "discount": 30, "count": 4, "timeAvailable": "2000-07-01T16:30:00+0000", "status": "active", "startDate": "2000-07-01T12:00:00+0000", "verificationCode": "545krte", "category": "food", "shop": { "id": 13, "name": "llee0hidlole", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "The best shop", "openingHours": [], "phoneNumber": "+23423423424", "file": "/uploads/shop/13.jpg" }, "description": "description" } } } |
Title | User unfollow shop |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/users/shopUnfollow |
Method | POST |
Params | shopId=id |
Data Params | example { "shopId": "id" } |
Success Response | example { "id": 33, "username": "name", "email": "email@test.com", "login": "email@test.com", "role": "owner", "favouriteShops": [{ "id": 4, "name": "name", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "description", "openingHours": [], "phoneNumber": "+23423423424" }, { "id": 7, "name": "name", "address": { "location": "442 Strand, London WC2R 0QU, United Kingdom", "lat": 51.508872, "lng": -0.125346 }, "description": "description", "openingHours": [], "phoneNumbers": [] }], "organizationNumber": "hrthth546", "category": "Food", "address": "London 24-14", "discr": "owner" } |
Title | User update settings |
---|---|
Headers | Authorization=Bearer token Content-type: application/json |
URL | /api/users |
Method | PUT |
Params | username=username email=email optional organizationNumber=organizationNumber - if user has role owner |
Data Params | example { "username": "name", "email": "email@test.com", "organizationNumber": "3545654" - optional } |
Success Response | example { "id":12, "username":"bfb", "email":"bvb@test.com", "login":"bvb@test.com", "role":"customer", "favouriteShops":[], "age":30, "birthDate":"1985-07-01T00:00:00+0000", "sex":"women", "discr":"customer" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment