{"consumes":["application/json","x-www-form-urlencoded"],"definitions":{"CreateServiceForm":{"description":"CreateServiceForm create service","properties":{"description":{"type":"string","x-go-name":"Description"},"duration":{"description":"Length of service; Indicate how long a service will be used in seconds.\nExample 3600","format":"int64","type":"integer","x-go-name":"Duration"},"name":{"description":"A service name.","type":"string","x-go-name":"Name"}},"required":["name"],"type":"object","x-go-package":"sprite/aappoint/internal/handler"},"CreateShopForm":{"description":"CreateShopForm create shop","properties":{"description":{"description":"A shop description","type":"string","x-go-name":"Description"},"email":{"description":"Shop contact email for displaying to the customer","format":"email","type":"string","x-go-name":"Email"},"latitude":{"type":"string","x-go-name":"Latitude"},"longitude":{"type":"string","x-go-name":"Longitude"},"name_en":{"description":"A shop name in English","type":"string","x-go-name":"NameEn"},"name_th":{"description":"A shop name in Thai","type":"string","x-go-name":"NameTh"},"phone":{"description":"Shop contact phone for displaying to the customer","type":"string","x-go-name":"Phone"},"service_type":{"$ref":"#/definitions/ServiceType"}},"required":["name_en","name_th","service_type"],"type":"object","x-go-package":"sprite/aappoint/internal/handler"},"InvitationType":{"description":"InvitationType [`invitation-admin`, `invitation-agent`]","type":"string","x-go-package":"sprite/aappoint/internal"},"Notification":{"description":"Notification data item\nNotification is shared with invitation data","properties":{"created_at":{"format":"date-time","type":"string","x-go-name":"CreatedAt"},"id":{"format":"int32","type":"integer","x-go-name":"ID"},"name":{"type":"string","x-go-name":"Name"},"note":{"type":"string","x-go-name":"Note"},"shop_id":{"format":"int32","type":"integer","x-go-name":"ShopID"},"status":{"type":"string","x-go-name":"Status"},"updated_at":{"format":"date-time","type":"string","x-go-name":"UpdatedAt"},"user_id":{"type":"string","x-go-name":"UserID"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"RolePage":{"description":"RolePage a pagination object","properties":{"roles":{"items":{"$ref":"#/definitions/UserRole"},"type":"array","x-go-name":"UserRoles"},"total":{"description":"Total result","format":"int64","type":"integer","x-go-name":"Total"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"Service":{"description":"Service a Service table","properties":{"created_at":{"format":"date-time","type":"string","x-go-name":"CreatedAt"},"description":{"type":"string","x-go-name":"Description"},"duration":{"format":"int32","type":"integer","x-go-name":"Duration"},"id":{"format":"int32","type":"integer","x-go-name":"ID"},"name":{"type":"string","x-go-name":"Name"},"shop_id":{"format":"int32","type":"integer","x-go-name":"ShopID"},"status":{"type":"string","x-go-name":"Status"},"updated_at":{"format":"date-time","type":"string","x-go-name":"UpdatedAt"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"ServiceType":{"description":"ServiceType [`Dentist`, `Gym`]","type":"string","x-go-package":"sprite/aappoint/internal"},"Shop":{"description":"Shop a Shop table","properties":{"available":{"items":{"type":"string"},"type":"array","x-go-name":"Available"},"created_at":{"format":"date-time","type":"string","x-go-name":"CreatedAt"},"description":{"type":"string","x-go-name":"Description"},"email":{"type":"string","x-go-name":"Email"},"id":{"format":"int32","type":"integer","x-go-name":"ID"},"latitude":{"type":"string","x-go-name":"Latitude"},"longitude":{"type":"string","x-go-name":"Longitude"},"name_en":{"type":"string","x-go-name":"NameEn"},"name_th":{"type":"string","x-go-name":"NameTh"},"not_available":{"items":{"type":"string"},"type":"array","x-go-name":"NotAvailable"},"note":{"type":"string","x-go-name":"Note"},"owner_id":{"type":"string","x-go-name":"OwnerID"},"phone":{"type":"string","x-go-name":"Phone"},"service":{"description":"A list of shop providig services","items":{"$ref":"#/definitions/Service"},"type":"array","x-go-name":"Service"},"service_type":{"$ref":"#/definitions/ServiceType"},"status":{"description":"A shop status such as `request`, `operate`, `pending`, and `discontinue`","type":"string","x-go-name":"Status"},"updated_at":{"format":"date-time","type":"string","x-go-name":"UpdatedAt"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"ShopConfig":{"description":"ShopConfig shop config","properties":{"service_type":{"description":"List of suggest shop service type.","items":{"$ref":"#/definitions/ServiceType"},"type":"array","x-go-name":"ServiceType"}},"type":"object","x-go-package":"sprite/aappoint/internal/handler"},"ShopDocument":{"description":"ShopDocument shop documents","properties":{"created_at":{"format":"date-time","type":"string","x-go-name":"CreatedAt"},"filename":{"type":"string","x-go-name":"Filename"},"id":{"format":"int32","type":"integer","x-go-name":"ID"},"shop_id":{"format":"int32","type":"integer","x-go-name":"ShopID"},"size":{"format":"int64","type":"integer","x-go-name":"Size"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"SignUpForm":{"description":"SignUpForm the sign up request parameter","properties":{"client_id":{"description":"A request client ID","type":"string","x-go-name":"ClientID"},"email":{"description":"A user email. This email can be linked to Facebook, if user already signed-in with Facebook.","format":"email","type":"string","x-go-name":"Email"},"first_name":{"type":"string","x-go-name":"FirstName"},"last_name":{"type":"string","x-go-name":"LastName"},"password":{"description":"A user password.","format":"password","type":"string","x-go-name":"Password"},"phone_no":{"type":"string","x-go-name":"PhoneNo"}},"required":["client_id","email","password"],"type":"object","x-go-package":"sprite/aappoint/internal/handler"},"TokenInfo":{"description":"TokenInfo Response Token","properties":{"access_token":{"description":"The access token issued by the authorization server.","type":"string","x-go-name":"AccessToken"},"expires_in":{"description":"The lifetime in seconds of the access token","type":"string","x-go-name":"ExpiresIn"},"refresh_token":{"description":"The refresh token, which can be used to obtain new access tokens using the same authorization grant","type":"string","x-go-name":"RefreshToken"},"token_type":{"description":"The type of the token issued","type":"string","x-go-name":"TokenType"},"user_id":{"description":"The ID of access token owner","type":"string","x-go-name":"UserID"}},"type":"object","x-go-package":"sprite/aappoint/docs"},"UpdateShopAvailability":{"description":"UpdateShopAvailability update shop availability form","properties":{"available":{"description":"Available when shop is available in cron format","items":{"type":"string"},"type":"array","x-go-name":"Available"},"not_available":{"description":"NotAvailable when shop is not available in cron format","items":{"type":"string"},"type":"array","x-go-name":"NotAvailable"}},"type":"object","x-go-package":"sprite/aappoint/internal/handler"},"UpdateShopForm":{"description":"UpdateShopForm update shop","properties":{"description":{"description":"A shop description","type":"string","x-go-name":"Description"},"email":{"description":"Shop contact email for displaying to the customer","format":"email","type":"string","x-go-name":"Email"},"latitude":{"type":"string","x-go-name":"Latitude"},"longitude":{"type":"string","x-go-name":"Longitude"},"name_en":{"description":"A shop name in English","type":"string","x-go-name":"NameEn"},"name_th":{"description":"A shop name in Thai","type":"string","x-go-name":"NameTh"},"note":{"description":"Reference note for approval","type":"string","x-go-name":"Note"},"phone":{"description":"Shop contact phone for displaying to the customer","type":"string","x-go-name":"Phone"},"service_type":{"$ref":"#/definitions/ServiceType"}},"required":["name_en","name_th","service_type"],"type":"object","x-go-package":"sprite/aappoint/internal/handler"},"User":{"description":"User data item","properties":{"created_at":{"format":"date-time","type":"string","x-go-name":"CreatedAt"},"email":{"description":"User contact email","format":"email","type":"string","x-go-name":"Email"},"first_name":{"description":"User first name","type":"string","x-go-name":"FirstName"},"id":{"description":"User ID","type":"string","x-go-name":"ID"},"last_name":{"description":"User last name","type":"string","x-go-name":"LastName"},"notifications":{"items":{"$ref":"#/definitions/Notification"},"type":"array","x-go-name":"Notifications"},"phone_no":{"description":"User contact phone","type":"string","x-go-name":"PhoneNo"},"roles":{"items":{"$ref":"#/definitions/UserRole"},"type":"array","x-go-name":"UserRoles"},"updated_at":{"format":"date-time","type":"string","x-go-name":"UpdatedAt"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"UserRole":{"description":"UserRole data itme","properties":{"created_at":{"format":"date-time","type":"string","x-go-name":"CreatedAt"},"roles":{"format":"int32","type":"integer","x-go-name":"Roles"},"updated_at":{"format":"date-time","type":"string","x-go-name":"UpdatedAt"},"user":{"$ref":"#/definitions/User"},"user_id":{"type":"string","x-go-name":"UserID"}},"type":"object","x-go-package":"sprite/aappoint/internal/store"},"addOrCreateUserForm":{"properties":{"email":{"description":"User contact email address","type":"string","x-go-name":"Email"},"first_name":{"description":"User first name.","type":"string","x-go-name":"FirstName"},"last_name":{"description":"User last name.","type":"string","x-go-name":"LastName"},"password":{"description":"User password","type":"string","x-go-name":"Password"},"phone_no":{"description":"User contact phone number","type":"string","x-go-name":"PhoneNo"},"role":{"$ref":"#/definitions/InvitationType"},"user_ids":{"description":"Existing user ID list. If this field presents, the rest will be ignored","items":{"type":"string"},"type":"array","x-go-name":"UserIDs"}},"type":"object","x-go-package":"sprite/aappoint/docs"}},"info":{"description":"This is a documentation of Aappoint API server.\n# Client Authorization\nBefore making a API request, you need to exchange the Client ID and Client Secret with Authorization\nserver for User Access Token. Some API without need users granted permission e.g. `POST /signup` need to be authenticated by client\nThe client authorization can be done by standard BASIC authentication\n```\nAuthorization: Basic base64(${client_id}:${client_secret})\n```\n\n# Authentication\nAappoint API using OAuth2 with user credentail flow.\n\nThe `grant_type=password` is required for exchanging user password with the user access token. For example\n```\nPOST /auth/token\nAuthorization: Basic base64(${client_id}:${client_secret})\n\ngrant_type=password&username=${username}&password=${password}\n```\n\nThe `grant_type=facebook` is required for exchanging Facebook access token with the user access token. For example\n```\nPOST /auth/token\nAuthorization: Basic base64(${client_id}:${client_secret})\n\ngrant_type=facebook&username=${fb_id}&password=${fb_access_token}\n```\n\nSample response\n```\n{\n\"access_token\":\"HJWJB8V3NG2RWEG0IXUJLA\",\n\"expires_in\":86400,\n\"refresh_token\":\"PSEHU2C_VISLZJH82S946W\",\n\"token_type\":\"Bearer\"\n}\n```\n\n# Refresh Token\nThe user access token will be expired in 24 hours after generated. Clients need to use refresh token to\nrenew the access token after it's expired. The refresh token can be alive at most 24 days.\n```\nPOST /oauth/token\nAuthorization: base64(${client_id}:${client_secret})\n\ngrant_type=refresh_token&refresh_token=PSEHU2C_VISLZJH82S946W\n```","title":"API documentation of AAPPoint.","version":"0.01","x-logo":{"url":"http://www.aappoint.me/wp-content/uploads/2019/03/Logo-FB-AAppoint.jpg"}},"paths":{"/invite/{notiid}":{"post":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Accept the invitation from shop owner to be a member of shop.","operationId":"accept-noti","produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Accept Invitation.","tags":["Notification"]}},"/me":{"get":{"description":"View the current user detail.","operationId":"get-me","produces":["application/json"],"responses":{"200":{"description":"User","schema":{"$ref":"#/definitions/User"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Me.","tags":["User"]}},"/notification/{notiid}":{"delete":{"description":"Delete a notification item from user. This is also use for decline the invitation.","operationId":"delete-noti","produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Delete Notification.","tags":["Notification"]}},"/shop":{"post":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Any users can create a new shop. When a shop is created, it automatically assign role Shop Owner to the customer who send a request.\nShop status will be set to `request`","operationId":"create-shop","parameters":[{"description":"A `service_type` can be retreive from `GET /shop-config`.","in":"body","name":"Body","schema":{"$ref":"#/definitions/CreateShopForm"}}],"produces":["application/json"],"responses":{"200":{"description":"Shop","schema":{"$ref":"#/definitions/Shop"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Create Shop.","tags":["Shop"]}},"/shop-config/":{"get":{"description":"Return a list of shop configuration.","operationId":"shop-config","produces":["application/json"],"responses":{"200":{"description":"ShopConfig","schema":{"items":{"$ref":"#/definitions/ShopConfig"},"type":"array"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Shop Config.","tags":["Shop"]}},"/shop/":{"get":{"description":"Return a list of all available shops","operationId":"list-shop","produces":["application/json"],"responses":{"200":{"description":"Shop","schema":{"items":{"$ref":"#/definitions/Shop"},"type":"array"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"List Shop.","tags":["Shop"]}},"/shop/{shopid}":{"delete":{"description":"Only shop owner can delete shop.","operationId":"delete-shop","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"}],"produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Delete Shop.","tags":["Shop"]},"get":{"description":"Retreive the shop detail.\nAny users can retrieve a shop detail. Some information will be filtered out.","operationId":"get-shop","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"}],"produces":["application/json"],"responses":{"200":{"description":"Shop","schema":{"$ref":"#/definitions/Shop"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Shop.","tags":["Shop"]},"put":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Update shop detail. Only shop owner can edit shop detail.","operationId":"update-shop","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"in":"body","name":"Body","schema":{"$ref":"#/definitions/UpdateShopForm"}}],"produces":["application/json"],"responses":{"200":{"description":"Shop","schema":{"$ref":"#/definitions/Shop"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Update Shop.","tags":["Shop"]}},"/shop/{shopid}/calendar":{"get":{"operationId":"get-shop-calendar","parameters":[{"description":"From date in EPOCH format","format":"int64","in":"query","name":"From","type":"integer"},{"description":"To date in EPOCH format","format":"int64","in":"query","name":"To","type":"integer"}],"produces":["application/json"],"responses":{"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Shop Calendar.","tags":["Shop"]}},"/shop/{shopid}/doc":{"get":{"description":"Return a list of all documents from this shop","operationId":"list-shop-document","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"}],"produces":["application/json"],"responses":{"200":{"description":"ShopDocument","schema":{"items":{"$ref":"#/definitions/ShopDocument"},"type":"array"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"List Shop Document.","tags":["Shop"]},"post":{"consumes":["multipart/form-data","multipart/mixed"],"description":"Upload documentation to shop for getting approval. Only shop owner can upload the documents.","operationId":"upload-shop-doc","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"description":"Files to be uploaded","in":"formData","name":"files[]","type":"file","x-go-name":"Files"}],"produces":["application/json"],"responses":{"200":{"description":"ShopDocument","schema":{"items":{"$ref":"#/definitions/ShopDocument"},"type":"array"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Upload Document.","tags":["Shop"]}},"/shop/{shopid}/doc/{docid}":{"delete":{"description":"Only shop owner can delete shop document.","operationId":"delete-shop-document","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"description":"DocumentID a document ID","in":"path","name":"docid","required":true,"type":"string","x-go-name":"DocumentID"}],"produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Delete Shop Document.","tags":["Shop"]}},"/shop/{shopid}/schedule":{"get":{"operationId":"get-shop-schedule","produces":["application/json"],"responses":{"200":{"description":"UpdateShopAvailability","schema":{"$ref":"#/definitions/UpdateShopAvailability"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Shop Schedule.","tags":["Shop"]},"put":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Set shop availability. Only shop owner can set the shop availablity.\nThe shop availability must be specify in cron format with or without minute field.\nIf minute filed is specified, the value must be a range of 0 and 30 minute. For example:\n`0 * * * *`, `30 * * * *`, `0,30 * * * *`, or `*/30 * * * *`.\nIf minute field is not specified, the system automatic use `*/30` as the value.\nExample:\n\n8AM to 5PM every weekday\n```\nPUT /shop/{shopid}/schedule\n\n{ \"available\": [\"8-16 * * 1-5\"] }\n```\n\n8AM to 5PM every weekday and 9AM to 4PM every saturday\n```\nPUT /shop/{shopid}/schedule\n\n{ \"available\": [\"8-16 * * 1-5\", \"9-15 * * 6\"] }\n```\n\n8AM to 5PM everyday except 2nd monday of month\n```\nPUT /shop/{shopid}/schedule\n\n{ \"available\": [\"8-16 * * *\"], \"not_available\": [\"* * * 1#2\"] }\n```","operationId":"set-shop-schedule","parameters":[{"in":"body","name":"Body","schema":{"$ref":"#/definitions/UpdateShopAvailability"}}],"produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Set Shop Schedule.","tags":["Shop"]}},"/shop/{shopid}/service":{"get":{"description":"Return a list of service available under this shop.\nOnly shop owner can get a list.","operationId":"list-shop-service","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"}],"produces":["application/json"],"responses":{"200":{"description":"Service","schema":{"items":{"$ref":"#/definitions/Service"},"type":"array"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"List Shop Service.","tags":["Service"]},"post":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Create a new service on shop.\nOnly Shop Owner can create service. Service is uniqued and belong to only Shop.","operationId":"create-shop-service","parameters":[{"description":"A `service_type` can be retreive from `GET /shop-config`.","in":"body","name":"Body","schema":{"$ref":"#/definitions/CreateServiceForm"}}],"produces":["application/json"],"responses":{"200":{"description":"Service","schema":{"$ref":"#/definitions/Service"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Create Shop Service.","tags":["Service"]}},"/shop/{shopid}/service/{serviceid}":{"delete":{"description":"Delete service from a shop.\nOnly shop owner can get a list.","operationId":"delete-shop-service","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"description":"ServiceID a service ID","in":"path","name":"serviceid","required":true,"type":"string","x-go-name":"ServiceID"}],"produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Delete Shop Service.","tags":["Service"]},"get":{"description":"Return a shop service detail\nOnly shop owner can get a list.","operationId":"get-shop-service","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"description":"ServiceID a service ID","in":"path","name":"serviceid","required":true,"type":"string","x-go-name":"ServiceID"}],"produces":["application/json"],"responses":{"200":{"description":"Service","schema":{"$ref":"#/definitions/Service"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Shop Service.","tags":["Service"]}},"/shop/{shopid}/user":{"get":{"description":"Return a list of users under this shop.","operationId":"list-shop-user","produces":["application/json"],"responses":{"200":{"description":"RolePage","schema":{"$ref":"#/definitions/RolePage"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"List Shop User.","tags":["Shop"]},"post":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Create or add existing users to this shop. If existing users is adding to the shop, the notification will be sent\nto the user. He/she must accept the invitation before able to join the shop.\nTo accept inviation, use `POST /invite/{notificationid}`\n![User Invitation Flow](./docs/resources/invite_users.png)","operationId":"create-shop-user","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"in":"body","name":"Body","schema":{"$ref":"#/definitions/addOrCreateUserForm"}}],"produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Add Shop Admin.","tags":["Shop"]}},"/shop/{shopid}/user/{userid}":{"delete":{"description":"Remove a user from shop. User removed from shop is still able to login as normal user.","operationId":"remove-shop-user","parameters":[{"description":"ShopID a shop ID","in":"path","name":"shopid","required":true,"type":"string","x-go-name":"ShopID"},{"description":"UserID an user ID","in":"path","name":"userid","required":true,"type":"string","x-go-name":"UserID"}],"produces":["application/json"],"responses":{"200":{"$ref":"#/responses/ok"},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Remove Shop User.","tags":["Shop"]}},"/signup":{"post":{"consumes":["application/json","x-www-form-urlencoded"],"description":"Create an new account on the system.","operationId":"signup","parameters":[{"description":"SignUp request","in":"body","name":"Body","schema":{"$ref":"#/definitions/SignUpForm"}}],"produces":["application/json"],"responses":{"200":{"description":"TokenInfo","schema":{"$ref":"#/definitions/TokenInfo"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"basic":[]}],"summary":"Signup.","tags":["Signup"]}},"/token":{"get":{"description":"View the access token detail","operationId":"get-token","produces":["application/json"],"responses":{"200":{"description":"TokenInfo","schema":{"$ref":"#/definitions/TokenInfo"}},"400":{"$ref":"#/responses/invalidRequest"},"403":{"$ref":"#/responses/accessDenied"}},"security":[{"oauth2":[]}],"summary":"Get Token.","tags":["User"]}}},"produces":["application/json"],"responses":{"accessDenied":{"description":"AccessDenied when the owner of given access token does not have a permission. Or access token is invalid.","schema":{"properties":{"code":{"type":"string","x-go-name":"Code"},"message":{"type":"string","x-go-name":"Message"}},"type":"object"}},"create-shop":{"description":"Shop Detail","schema":{"$ref":"#/definitions/Shop"}},"create-shop-service":{"description":"Shop Detail","schema":{"$ref":"#/definitions/Service"}},"errorResponse":{"description":"ErrorResponse generic error response from API","schema":{"properties":{"code":{"type":"string","x-go-name":"Code"},"message":{"type":"string","x-go-name":"Message"}},"type":"object"}},"get-me":{"description":"Access Token","schema":{"$ref":"#/definitions/User"}},"get-shop-schedule":{"schema":{"$ref":"#/definitions/UpdateShopAvailability"}},"get-token":{"description":"Access Token","schema":{"$ref":"#/definitions/TokenInfo"}},"invalidRequest":{"description":"InvalidRequest the error when given parameters is invalid.","schema":{"properties":{"code":{"type":"string","x-go-name":"Code"},"message":{"type":"string","x-go-name":"Message"}},"type":"object"}},"list-shop-user":{"description":"Shop user","schema":{"$ref":"#/definitions/RolePage"}},"ok":{"description":"OK when command successfully sent","schema":{"properties":{"code":{"type":"string","x-go-name":"Code"}},"type":"object"}},"shop-config":{"description":"Shop Configuration.","schema":{"$ref":"#/definitions/ShopConfig"}},"signup":{"description":"Access Token","schema":{"$ref":"#/definitions/TokenInfo"}},"upload-shop-doc":{"description":"Document detail","schema":{"$ref":"#/definitions/ShopDocument"}}},"schemes":["https"],"securityDefinitions":{"basic":{"type":"basic"},"oauth2":{"authorizationUrl":"/oauth2/auth","flow":"password","in":"header","tokenUrl":"/oauth2/token","type":"oauth2"}},"swagger":"2.0","host":"virtserver.swaggerhub.com","basePath":"/kobin3/AAppointAPI/0.01"}