{ "swagger": "2.0", "info": { "description": "REST API for Creatly App", "title": "Creatly API", "contact": {}, "version": "1.0" }, "host": "localhost:8000", "basePath": "/api/v1/", "paths": { "/admins/auth/refresh": { "post": { "description": "admin refresh tokens", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-auth" ], "summary": "Admin Refresh Tokens", "parameters": [ { "description": "refresh info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.refreshInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/courses": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all courses", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-courses" ], "summary": "Admin Get All Courses", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create new course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-courses" ], "summary": "Admin Create New Courses", "parameters": [ { "description": "course info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createCourseInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.idResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/courses/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get course by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-courses" ], "summary": "Admin Get Course By ID", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Course" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-courses" ], "summary": "Admin Update Course", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true }, { "description": "course update info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updateCourseInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin delete course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-courses" ], "summary": "Admin Delete Course", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/courses/{id}/modules": { "post": { "security": [ { "AdminAuth": [] } ], "description": "admin update course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-modules" ], "summary": "Admin Create Module", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true }, { "description": "module info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createModuleInput" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/v1.idResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/courses/{id}/packages": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all course packages", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-packages" ], "summary": "Admin Get All Course Packages", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create package", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-packages" ], "summary": "Admin Create Package", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true }, { "description": "package info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createPackageInput" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/v1.idResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/lessons/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get lesson by Id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-lessons" ], "summary": "Admin Get Lesson By Id", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update lesson", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-lessons" ], "summary": "Admin Update Lesson", "parameters": [ { "type": "string", "description": "lesson id", "name": "id", "in": "path", "required": true }, { "description": "update info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updateLessonInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin delete lesson", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-lessons" ], "summary": "Admin Delete Lesson", "parameters": [ { "type": "string", "description": "lesson id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/media/videos/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "get video by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-media" ], "summary": "Get Video By ID", "parameters": [ { "type": "string", "description": "video id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.adminGetVideoResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/modules/{id}": { "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-modules" ], "summary": "Admin Update Module", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true }, { "description": "update info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updateModuleInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin update course", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-modules" ], "summary": "Admin Delete Module", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/modules/{id}/lessons": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get module lessons with content", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-lessons" ], "summary": "Admin Get Module Lessons", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create lesson", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-lessons" ], "summary": "Admin Create Lesson", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true }, { "description": "lesson info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createLessonInput" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/v1.idResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/modules/{id}/survey": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get survey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-surveys" ], "summary": "Admin Get Survey", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Survey" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create/update survey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-surveys" ], "summary": "Admin Create/Update Survey", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true }, { "description": "survey info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createSurveyInput" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin delete survey", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-surveys" ], "summary": "Admin Delete Survey", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Survey" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/modules/{id}/survey/results": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all survey results", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-surveys" ], "summary": "Admin Get Survey Results", "parameters": [ { "type": "integer", "description": "skip", "name": "skip", "in": "query" }, { "type": "integer", "description": "limit", "name": "limit", "in": "query" }, { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/modules/{id}/survey/results/{studentId}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all survey results", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-surveys" ], "summary": "Admin Get Survey Results", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "student id", "name": "studentId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.SurveyResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/offers": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all offers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-offers" ], "summary": "Admin Get All Offers", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create offer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-offers" ], "summary": "Admin Create Offer", "parameters": [ { "description": "package info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createOfferInput" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/v1.idResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/offers/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get offer by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-offers" ], "summary": "Admin Get Offer By Id", "parameters": [ { "type": "string", "description": "offer id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Offer" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "put": { "security": [ { "AdminAuth": [] } ], "description": "admin updateOffer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-offers" ], "summary": "Admin Update Offer", "parameters": [ { "type": "string", "description": "offer id", "name": "id", "in": "path", "required": true }, { "description": "update info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updateOfferInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin delete offer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-offers" ], "summary": "Admin Delete Offer", "parameters": [ { "type": "string", "description": "offer id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/orders": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all orders", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-orders" ], "summary": "Admin Get Orders", "parameters": [ { "type": "integer", "description": "skip", "name": "skip", "in": "query" }, { "type": "integer", "description": "limit", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/orders/{id}": { "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update order status", "consumes": [ "application/json" ], "tags": [ "admins-orders" ], "summary": "Admin Update Order", "parameters": [ { "type": "string", "description": "promocode id", "name": "id", "in": "path", "required": true }, { "description": "update school settings", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.orderStatusInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/packages/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get package by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-packages" ], "summary": "Admin Get Package By ID", "parameters": [ { "type": "string", "description": "package id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Package" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update package", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-packages" ], "summary": "Admin Update Package", "parameters": [ { "type": "string", "description": "package id", "name": "id", "in": "path", "required": true }, { "description": "update input", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updatePackageInput" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Package" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin delete package", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-packages" ], "summary": "Admin Delete Package", "parameters": [ { "type": "string", "description": "package id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "array", "items": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/promocodes": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all promocodes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-promocodes" ], "summary": "Admin Get All Promocodes", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/v1.dataResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domain.PromoCode" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create promocode", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-promocodes" ], "summary": "Admin Create Promocode", "parameters": [ { "description": "package info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createPromocodeInput" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/v1.idResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/promocodes/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get promocode by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-promocodes" ], "summary": "Admin Get Promocode By Id", "parameters": [ { "type": "string", "description": "promocode id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.PromoCode" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update promocode", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-promocodes" ], "summary": "Admin Update Promocode", "parameters": [ { "type": "string", "description": "promocode id", "name": "id", "in": "path", "required": true }, { "description": "update info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updatePromocodeInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "delete": { "security": [ { "AdminAuth": [] } ], "description": "admin delete promocode", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-promocodes" ], "summary": "Admin Delete Promocode", "parameters": [ { "type": "string", "description": "promocode id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/school/settings": { "put": { "security": [ { "AdminAuth": [] } ], "description": "admin update school settings", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-school" ], "summary": "Admin Update School settings", "parameters": [ { "description": "update school settings", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.updateSchoolSettingsInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/school/settings/fondy": { "put": { "security": [ { "AdminAuth": [] } ], "description": "admin connect fondy", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-school" ], "summary": "Admin Connect Fondy", "parameters": [ { "description": "update school settings", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.connectFondyInput" } } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/sign-in": { "post": { "description": "admin sign in", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-auth" ], "summary": "Admin SignIn", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.signInInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/students": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get all students", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-students" ], "summary": "Admin Get Students", "parameters": [ { "type": "integer", "description": "skip", "name": "skip", "in": "query" }, { "type": "integer", "description": "limit", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } }, "post": { "security": [ { "AdminAuth": [] } ], "description": "admin create student", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-students" ], "summary": "Admin Create Student", "parameters": [ { "description": "student info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createStudentInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Student" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/students/{id}": { "get": { "security": [ { "AdminAuth": [] } ], "description": "admin get student by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-students" ], "summary": "Admin Get Student By ID", "parameters": [ { "type": "string", "description": "student id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Student" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/students/{id}/offers/{offerId}": { "patch": { "security": [ { "AdminAuth": [] } ], "description": "admin give student access to offer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admins-students" ], "summary": "Admin Give Student Access to Offer", "parameters": [ { "description": "permission type", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.manageOfferPermissionInput" } }, { "type": "string", "description": "student id", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "offer id", "name": "offerId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Student" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/upload/file": { "post": { "security": [ { "AdminAuth": [] } ], "description": "admin upload file", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "admins-upload" ], "summary": "Admin upload File", "parameters": [ { "type": "file", "description": "file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.uploadResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/upload/image": { "post": { "security": [ { "AdminAuth": [] } ], "description": "admin upload image", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "admins-upload" ], "summary": "Admin upload Image", "parameters": [ { "type": "file", "description": "file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.uploadResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/admins/upload/video": { "post": { "security": [ { "AdminAuth": [] } ], "description": "admin upload video", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "admins-upload" ], "summary": "Admin upload Video", "parameters": [ { "type": "file", "description": "file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.uploadResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/courses": { "get": { "description": "get all courses", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Get All Courses", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/courses/{id}": { "get": { "description": "get course by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Get Course By ModuleID", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Course" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/courses/{id}/offers": { "get": { "description": "get course offers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "courses" ], "summary": "Get Course Offers", "parameters": [ { "type": "string", "description": "course id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/promocodes/{code}": { "get": { "description": "get promocode by code", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "promocodes" ], "summary": "Get PromoCode By Code", "parameters": [ { "type": "string", "description": "code", "name": "code", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.PromoCode" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/settings": { "get": { "description": "school get settings", "produces": [ "application/json" ], "tags": [ "school-settings" ], "summary": "School GetSettings", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.schoolSettingsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/account": { "get": { "security": [ { "StudentsAuth": [] } ], "description": "student get account info", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-account" ], "summary": "Student Get Account Info", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.studentAccountResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/auth/refresh": { "post": { "description": "student refresh tokens", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-auth" ], "summary": "Student Refresh Tokens", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.refreshInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/lessons/{id}/finished": { "post": { "security": [ { "StudentsAuth": [] } ], "description": "student set lesson as finished by lesson id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-courses" ], "summary": "Student Set Lesson As Finished By LessonID", "parameters": [ { "type": "string", "description": "lesson id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/modules/{id}/content": { "get": { "security": [ { "StudentsAuth": [] } ], "description": "student get content by module id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-courses" ], "summary": "Student Get Content By Module ID", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ModuleContent" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/modules/{id}/offers": { "get": { "security": [ { "StudentsAuth": [] } ], "description": "student get offers by module id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-courses" ], "summary": "Student Get Offers By Module ModuleID", "parameters": [ { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.dataResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/modules/{id}/survey": { "post": { "security": [ { "StudentsAuth": [] } ], "description": "student submit survey by module id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-courses" ], "summary": "Student Submit Survey by Module ID", "parameters": [ { "description": "survey answers", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.submitSurveyInput" } }, { "type": "string", "description": "module id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/orders": { "post": { "security": [ { "StudentsAuth": [] } ], "description": "student create order", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-orders" ], "summary": "Student CreateOrder", "parameters": [ { "description": "order info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createOrderInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.createOrderResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/orders/{id}/payment": { "get": { "security": [ { "StudentsAuth": [] } ], "description": "student generate order payment link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-orders" ], "summary": "Student Generate Payment Link", "parameters": [ { "type": "string", "description": "order id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.generatePaymentLinkResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/sign-in": { "post": { "description": "student sign in", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-auth" ], "summary": "Student SignIn", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.signInInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/sign-up": { "post": { "description": "create student account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-auth" ], "summary": "Student SignUp", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.studentSignUpInput" } } ], "responses": { "201": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/students/verify/{code}": { "post": { "description": "student verify registration", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "students-auth" ], "summary": "Student Verify Registration", "parameters": [ { "type": "string", "description": "verification code", "name": "code", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/users/auth/refresh": { "post": { "description": "user refresh tokens", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users-auth" ], "summary": "User Refresh Tokens", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.refreshInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/users/schools": { "post": { "security": [ { "UsersAuth": [] } ], "description": "user create school", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users-schools" ], "summary": "User Create New School", "parameters": [ { "description": "school info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.createSchoolInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.School" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/users/sign-in": { "post": { "description": "user sign in", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users-auth" ], "summary": "User SignIn", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.signInInput" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/users/sign-up": { "post": { "description": "create user account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users-auth" ], "summary": "User SignUp", "parameters": [ { "description": "sign up info", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.userSignUpInput" } } ], "responses": { "201": { "description": "ok", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } }, "/users/verify/{code}": { "post": { "security": [ { "UsersAuth": [] } ], "description": "user verify registration", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users-auth" ], "summary": "User Verify Registration", "parameters": [ { "type": "string", "description": "verification code", "name": "code", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v1.tokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/v1.response" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/v1.response" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/v1.response" } }, "default": { "description": "", "schema": { "$ref": "#/definitions/v1.response" } } } } } }, "definitions": { "domain.Admin": { "type": "object", "properties": { "email": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "schoolId": { "type": "string" } } }, "domain.ContactInfo": { "type": "object", "properties": { "address": { "type": "string" }, "businessName": { "type": "string" }, "email": { "type": "string" }, "phone": { "type": "string" }, "registrationNumber": { "type": "string" } } }, "domain.Course": { "type": "object", "properties": { "code": { "type": "string" }, "color": { "type": "string" }, "createdAt": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "imageUrl": { "type": "string" }, "name": { "type": "string" }, "published": { "type": "boolean" }, "updatedAt": { "type": "string" } } }, "domain.Fondy": { "type": "object", "properties": { "connected": { "type": "boolean" }, "merchantId": { "type": "string" }, "merchantPassword": { "type": "string" } } }, "domain.Lesson": { "type": "object", "properties": { "content": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "position": { "type": "integer" }, "published": { "type": "boolean" }, "schoolId": { "type": "string" } } }, "domain.Module": { "type": "object", "properties": { "courseId": { "type": "string" }, "id": { "type": "string" }, "lessons": { "type": "array", "items": { "$ref": "#/definitions/domain.Lesson" } }, "name": { "type": "string" }, "packageId": { "type": "string" }, "position": { "type": "integer" }, "published": { "type": "boolean" }, "schoolId": { "type": "string" }, "survey": { "$ref": "#/definitions/domain.Survey" } } }, "domain.ModuleContent": { "type": "object", "properties": { "lessons": { "type": "array", "items": { "$ref": "#/definitions/domain.Lesson" } }, "survey": { "$ref": "#/definitions/domain.Survey" } } }, "domain.Offer": { "type": "object", "properties": { "benefits": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "packages": { "type": "array", "items": { "type": "string" } }, "paymentMethod": { "$ref": "#/definitions/domain.PaymentMethod" }, "price": { "$ref": "#/definitions/domain.Price" }, "schoolId": { "type": "string" } } }, "domain.Package": { "type": "object", "properties": { "courseId": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "modules": { "type": "array", "items": { "$ref": "#/definitions/domain.Module" } }, "name": { "type": "string" }, "schoolId": { "type": "string" } } }, "domain.Pages": { "type": "object", "properties": { "confidential": { "type": "string" }, "newsletterConsent": { "type": "string" }, "refundPolicy": { "type": "string" }, "serviceAgreement": { "type": "string" } } }, "domain.PaymentMethod": { "type": "object", "properties": { "provider": { "type": "string" }, "usesProvider": { "type": "boolean" } } }, "domain.Price": { "type": "object", "properties": { "currency": { "type": "string" }, "value": { "type": "integer" } } }, "domain.PromoCode": { "type": "object", "properties": { "code": { "type": "string" }, "discountPercentage": { "type": "integer" }, "expiresAt": { "type": "string" }, "id": { "type": "string" }, "offerIds": { "type": "array", "items": { "type": "string" } }, "schoolId": { "type": "string" } } }, "domain.School": { "type": "object", "properties": { "admins": { "type": "array", "items": { "$ref": "#/definitions/domain.Admin" } }, "courses": { "type": "array", "items": { "$ref": "#/definitions/domain.Course" } }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "registeredAt": { "type": "string" }, "settings": { "$ref": "#/definitions/domain.Settings" }, "subtitle": { "type": "string" } } }, "domain.Session": { "type": "object", "properties": { "expiresAt": { "type": "string" }, "refreshToken": { "type": "string" } } }, "domain.Settings": { "type": "object", "properties": { "color": { "type": "string" }, "contactInfo": { "$ref": "#/definitions/domain.ContactInfo" }, "domains": { "type": "array", "items": { "type": "string" } }, "fondy": { "$ref": "#/definitions/domain.Fondy" }, "googleAnalyticsCode": { "type": "string" }, "logo": { "type": "string" }, "pages": { "$ref": "#/definitions/domain.Pages" }, "showPaymentImages": { "type": "boolean" } } }, "domain.Student": { "type": "object", "properties": { "availableCourses": { "type": "array", "items": { "type": "string" } }, "availableModules": { "type": "array", "items": { "type": "string" } }, "availableOffers": { "type": "array", "items": { "type": "string" } }, "email": { "type": "string" }, "id": { "type": "string" }, "lastVisitAt": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "registeredAt": { "type": "string" }, "schoolId": { "type": "string" }, "session": { "$ref": "#/definitions/domain.Session" }, "verification": { "$ref": "#/definitions/domain.Verification" } } }, "domain.StudentInfoShort": { "type": "object", "properties": { "email": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" } } }, "domain.Survey": { "type": "object", "properties": { "questions": { "type": "array", "items": { "$ref": "#/definitions/domain.SurveyQuestion" } }, "required": { "type": "boolean" }, "title": { "type": "string" } } }, "domain.SurveyAnswer": { "type": "object", "properties": { "answer": { "type": "string" }, "questionId": { "type": "string" } } }, "domain.SurveyQuestion": { "type": "object", "properties": { "answerOptions": { "type": "array", "items": { "type": "string" } }, "answerType": { "type": "string" }, "id": { "type": "string" }, "question": { "type": "string" } } }, "domain.SurveyResult": { "type": "object", "properties": { "answers": { "type": "array", "items": { "$ref": "#/definitions/domain.SurveyAnswer" } }, "id": { "type": "string" }, "moduleId": { "type": "string" }, "student": { "$ref": "#/definitions/domain.StudentInfoShort" }, "submittedAt": { "type": "string" } } }, "domain.Verification": { "type": "object", "properties": { "code": { "type": "string" }, "verified": { "type": "boolean" } } }, "v1.adminGetVideoResponse": { "type": "object", "properties": { "status": { "type": "integer" }, "url": { "type": "string" } } }, "v1.connectFondyInput": { "type": "object", "properties": { "merchantId": { "type": "string" }, "merchantPassword": { "type": "string" } } }, "v1.contactInfo": { "type": "object", "properties": { "address": { "type": "string" }, "businessName": { "type": "string" }, "email": { "type": "string" }, "registrationNumber": { "type": "string" } } }, "v1.createCourseInput": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "v1.createLessonInput": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "position": { "type": "integer" } } }, "v1.createModuleInput": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "position": { "type": "integer" } } }, "v1.createOfferInput": { "type": "object", "required": [ "benefits", "name", "paymentMethod", "price" ], "properties": { "benefits": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "name": { "type": "string" }, "paymentMethod": { "$ref": "#/definitions/v1.paymentMethod" }, "price": { "$ref": "#/definitions/v1.price" } } }, "v1.createOrderInput": { "type": "object", "required": [ "offerId" ], "properties": { "offerId": { "type": "string" }, "promoId": { "type": "string" } } }, "v1.createOrderResponse": { "type": "object", "properties": { "orderId": { "type": "string" } } }, "v1.createPackageInput": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" } } }, "v1.createPromocodeInput": { "type": "object", "required": [ "code", "discountPercentage", "expiresAt", "offerIds" ], "properties": { "code": { "type": "string" }, "discountPercentage": { "type": "integer" }, "expiresAt": { "type": "string" }, "offerIds": { "type": "array", "items": { "type": "string" } } } }, "v1.createSchoolInput": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "v1.createStudentInput": { "type": "object", "required": [ "email", "name", "password" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" } } }, "v1.createSurveyInput": { "type": "object", "required": [ "title" ], "properties": { "questions": { "type": "array", "items": { "$ref": "#/definitions/v1.question" } }, "required": { "type": "boolean" }, "title": { "type": "string" } } }, "v1.dataResponse": { "type": "object", "properties": { "count": { "type": "integer" }, "data": { "type": "object" } } }, "v1.generatePaymentLinkResponse": { "type": "object", "properties": { "url": { "type": "string" } } }, "v1.idResponse": { "type": "object", "properties": { "id": { "type": "object" } } }, "v1.manageOfferPermissionInput": { "type": "object", "properties": { "available": { "type": "boolean" } } }, "v1.orderStatusInput": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string" } } }, "v1.pages": { "type": "object", "properties": { "confidential": { "type": "string" }, "refundPolicy": { "type": "string" }, "serviceAgreement": { "type": "string" } } }, "v1.paymentMethod": { "type": "object", "required": [ "usesProvider" ], "properties": { "provider": { "type": "string" }, "usesProvider": { "type": "boolean" } } }, "v1.price": { "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "description": "TODO validate currency input", "type": "string" }, "value": { "type": "integer" } } }, "v1.question": { "type": "object", "required": [ "answerType", "question" ], "properties": { "answerOptions": { "type": "array", "items": { "type": "string" } }, "answerType": { "type": "string" }, "question": { "type": "string" } } }, "v1.refreshInput": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string" } } }, "v1.response": { "type": "object", "properties": { "message": { "type": "string" } } }, "v1.schoolSettingsResponse": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "settings": { "$ref": "#/definitions/domain.Settings" }, "subtitle": { "type": "string" } } }, "v1.signInInput": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "v1.studentAccountResponse": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" } } }, "v1.studentSignUpInput": { "type": "object", "required": [ "email", "name", "password" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" } } }, "v1.submitSurveyInput": { "type": "object", "properties": { "answers": { "type": "array", "items": { "$ref": "#/definitions/v1.surveyAnswer" } } } }, "v1.surveyAnswer": { "type": "object", "properties": { "answer": { "type": "string" }, "questionId": { "type": "string" } } }, "v1.tokenResponse": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" } } }, "v1.updateCourseInput": { "type": "object", "properties": { "color": { "type": "string" }, "description": { "type": "string" }, "imageUrl": { "type": "string" }, "name": { "type": "string" }, "published": { "type": "boolean" } } }, "v1.updateLessonInput": { "type": "object", "properties": { "content": { "type": "string" }, "name": { "type": "string" }, "position": { "type": "integer" }, "published": { "type": "boolean" } } }, "v1.updateModuleInput": { "type": "object", "properties": { "name": { "type": "string" }, "position": { "type": "integer" }, "published": { "type": "boolean" } } }, "v1.updateOfferInput": { "type": "object", "properties": { "benefits": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "name": { "type": "string" }, "packages": { "type": "array", "items": { "type": "string" } }, "paymentMethod": { "$ref": "#/definitions/v1.paymentMethod" }, "price": { "$ref": "#/definitions/v1.price" } } }, "v1.updatePackageInput": { "type": "object", "properties": { "description": { "type": "string" }, "modules": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" } } }, "v1.updatePromocodeInput": { "type": "object", "properties": { "code": { "type": "string" }, "discountPercentage": { "type": "integer" }, "expiresAt": { "type": "string" }, "offerIds": { "type": "array", "items": { "type": "string" } } } }, "v1.updateSchoolSettingsInput": { "type": "object", "properties": { "color": { "type": "string" }, "contactInfo": { "$ref": "#/definitions/v1.contactInfo" }, "domains": { "type": "array", "items": { "type": "string" } }, "email": { "type": "string" }, "googleAnalyticsCode": { "type": "string" }, "pages": { "$ref": "#/definitions/v1.pages" }, "showPaymentImages": { "type": "boolean" } } }, "v1.uploadResponse": { "type": "object", "properties": { "url": { "type": "string" } } }, "v1.userSignUpInput": { "type": "object", "required": [ "email", "name", "password", "phone" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" } } } }, "securityDefinitions": { "AdminAuth": { "type": "apiKey", "name": "Authorization", "in": "header" }, "StudentsAuth": { "type": "apiKey", "name": "Authorization", "in": "header" }, "UsersAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }