<apihero>

You can download the Postman JSON file to import in Postman.

You can also find demo projects below, powered by apihero.

Sample Project with Nuxt [Github]

TODO API

The data contains 50 todo items.

getTodos

Returns a list of todo items. If "isLite" set true(default), the endpoint returns only id and todo string.

Pagination is supported.

              
[POST] https://apihero-api.quixtools.com/api/v1/todo/getTodos
              
            
Request
              
{
  "isLite": boolean (nullable),
  "pager": {
    "page": number,
    "size": number
  } (nullable)
}
              
            
Response
              
{
  "data":  {
    "todoData": [
      {
        "id": string,
        "todo": string,
        "state": boolean,
        "user": string,
      }
      .
      .
      .
    ],
    "pagerData": {
      "page": number,
      "size": number,
      "totalPage": number,
      "totalCount": number
    }
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getTodo

Returns a single todo item with submitted "todoId".

              
[GET] https://apihero-api.quixtools.com/api/v1/todo/getTodo/todoId
              
            
Response
              
{
  "data": {
    "id": string,
    "todo": string,
    "state": boolean,
    "user": string,
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

addTodo

Adds a new todo item with submitted data. It behaves as if it added a new item, but in reality, it doesn't perform the action.

              
[POST] https://apihero-api.quixtools.com/api/v1/todo/addTodo
              
            
Request
              
{
  "todo": string,
  "user": string
}
              
            
Response
              
{
  "data": {
    "id": string,
    "todo": string,
    "state": boolean,
    "user": string,
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

LOCATION API

The data contains 10 countries and 5 cities for each country.

getCountriesAll

Returns all countries.

              
[GET] https://apihero-api.quixtools.com/api/v1/location/getCountriesAll
              
            
Response
              
{
  "data": [
    {
      "countryId": string,
      "countryName": string,
      "countryCode": string,
      "callingCode": string,
      "currencyLong": string,
      "currnecyShort": string,
      "capital": string,
      "position": { "lat": number, "long": number },
      "flag": string(flag emoji),
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getCountries

Returns country list with id and name only.

              
[GET] https://apihero-api.quixtools.com/api/v1/location/getCountries
              
            
Response
              
{
  "data": [
    {
      "countryId": string,
      "countryName": string,
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getCountriesWithCode

Returns country list with id, name and country code.

              
[GET] https://apihero-api.quixtools.com/api/v1/location/getCountriesWithCode
              
            
Response
              
{
  "data": [
    {
      "countryId": string,
      "countryName": string,
      "countryCode": string
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getCountriesWithFlag

Returns country list with id, name and flag.

              
[GET] https://apihero-api.quixtools.com/api/v1/location/getCountriesWithFlag
              
            
Response
              
{
  "data": [
    {
      "countryId": string,
      "countryName": string,
      "flag": string(flag emoji)
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getCountry

Returns a single country data with submitted "countryId".

              
[GET] https://apihero-api.quixtools.com/api/v1/location/getCountry/countryId
              
            
Response
              
{
  "data": {
    "countryId": string,
    "countryName": string,
    "countryCode": string,
    "callingCode": string,
    "currencyLong": string,
    "currnecyShort": string,
    "capital": string,
    "position": { "lat": number, "long": number },
    "flag": string(flag emoji),
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

STORE API

The data includes 4 categories, each with 4 subcategories. Each subcategory contains 4 products, totaling 64 products.

getCategories

Returns the category data.

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getCategories
              
            
Response
              
{
  "data": [
    {
      "categoryId": string,
      "categoryName": string,
      "subcategories": [
        {
          "subCategoryId": string,
          "subCategoryName": string,
        },
        .
        .
        .
      ]
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getSubCategories

Returns the subcategory data of a category with submitted "categoryId".

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getSubCategories/categoryId
              
            
Response
              
{
  "data":  [
    {
      "subCategoryId": string,
      "subCategoryName": string,
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getBrands

Returns the full list of brands.

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getBrands
              
            
Response
              
{
  "data":  [
    {
      "label": string,
      "value": string,
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getProducts

Returns a list of products that can be filtered by brand, category ID, subcategory ID, and price range, as well as sorted by price, sales data, or creation date. Pagination is also supported.

              
[POST] https://apihero-api.quixtools.com/api/v1/store/getProducts
              
            
Request
              
{
  "brand": string (nullable),
  "categoryId": string (nullable),
  "subCategoryId": string (nullable),
  "productPriceStart": number (nullable),
  "productPriceEnd": number (nullable),
  "sortBy": "productPrice" | "sold" | "createDate" (nullable),
  "order": "asc" | "desc" (nullable),
  "pager": {
    "page": number,
    "size": number
  } (nullable)
}
              
            
Response
              
{
  "data":  {
    "productData": [
      {
        "productId": string,
        "brand": string,
        "productName": string,
        "productDescription": string,
        "productPrice": number,
        "salePrice": number,
        "productImage": string,
        "categoryId": string,
        "subCategoryId": string,
        "categoryName": string,
        "subCategoryName": string,
        "url": string,
        "stock": number,
        "sold": number,
        "createDate": string,
        "updateDate": string,
        "reviews": [
          {
            "customerName": string,
            "rating": number,
            "comment": string
          }
          .
          .
          .
        ]
      }
      .
      .
      .
    ],
    "pagerData": {
      "page": number,
      "size": number,
      "totalPage": number,
      "totalCount": number
    }
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getProduct

Returns the product data with submitted "productId".

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getProduct/productId
              
            
Response
              
{
  "data":  {
    "productId": string,
    "brand": string,
    "productName": string,
    "productDescription": string,
    "productPrice": number,
    "salePrice": number,
    "productImage": string,
    "categoryId": string,
    "subCategoryId": string,
    "categoryName": string,
    "subCategoryName": string,
    "url": string,
    "stock": number,
    "sold": number,
    "createDate": string,
    "updateDate": string,
    "reviews": [
      {
        "customerName": string,
        "rating": number,
        "comment": string
      }
      .
      .
      .
    ]
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

createProduct

Adds a new product with submitted data. It behaves as if it added a new product, but in reality, it doesn't perform the action.

              
[POST] https://apihero-api.quixtools.com/api/v1/store/createProduct
              
            
Request
              
{
  "brand": string,
  "productName": string,
  "productDescription": string,
  "productPrice": number,
  "categoryId": string,
  "subCategoryId": string,
  "stock": number
}
              
            
Response
              
{
  "data":  {
    "productId": string,
    "brand": string,
    "productName": string,
    "productDescription": string,
    "productPrice": number,
    "categoryId": string,
    "subCategoryId": string,
    "url": string,
    "stock": number,
    "sold": number,
    "createDate": string,
    "updateDate": string,
    "reviews": []
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

deleteProduct

Deletes the product data with submitted "productId". It behaves as if it deleted the product with the submitted "productId", but it does not actually perform the operation.

              
[DELETE] https://apihero-api.quixtools.com/api/v1/store/deleteProduct/productId
              
            
Response
              
{
  "data":  {
    "productId": string,
    "brand": string,
    "productName": string,
    "productDescription": string,
    "productPrice": number,
    "salePrice": number,
    "productImage": string,
    "categoryId": string,
    "subCategoryId": string,
    "url": string,
    "stock": number,
    "sold": number,
    "createDate": string,
    "updateDate": string,
    "reviews": [
      {
        "customerName": string,
        "rating": number,
        "comment": string
      }
      .
      .
      .
    ]
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

updateProduct

Updates the product data with submitted "productId". It behaves as if it updated the product data, but in reality, it doesn't perform the action.

              
[PUT] https://apihero-api.quixtools.com/api/v1/store/updateProduct
              
            
Request
              
{
  "productId": string,
  "brand": string,
  "productName": string,
  "productDescription": string,
  "productPrice": number,
  "stock": number
}
              
            
Response
              
{
  "data": {
    "productId": string,
    "brand": string,
    "productName": string,
    "productDescription": string,
    "productPrice": number,
    "salePrice": number,
    "productImage": string,
    "categoryId": string,
    "subCategoryId": string,
    "url": string,
    "stock": number,
    "sold": number,
    "createDate": string,
    "updateDate": string,
    "reviews": [
      {
        "customerName": string,
        "rating": number,
        "comment": string
      }
      .
      .
      .
    ]
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getSales

Returns all products on sales.

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getSales
              
            
Response
              
{
  "data":  [
      {
        "productId": string,
        "brand": string,
        "productName": string,
        "productDescription": string,
        "productPrice": number,
        "salePrice": number,
        "productImage": string,
        "categoryId": string,
        "subCategoryId": string,
        "categoryName": string,
        "subCategoryName": string,
        "url": string,
        "stock": number,
        "sold": number
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getOrderStates

Returns the order state list.

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getOrderStates
              
            
Response
              
{
  "data": [
    {
      "stateId": number,
      "stateName": string
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getOrders

Returns the list of orders. Requires a valid "Authorization" header key with Bearer JWT.

              
[GET] https://apihero-api.quixtools.com/api/v1/store/getOrders
              
            
Response
              
{
  "data": [
    {
      "orderState": number,
      "orderId": string
      "deliveryTrackingCode": string,
      "products": [
        {
            "productName": string,
            "url": string,
            "productId": string,
            "count": string,
            "payment": string,
        }
        .
        .
        .
      ],
      "orderDate": string,
      "stateName": string,
      "address": {
          "addressId": string,
          "addressName": string,
          "name": string,
          "customerAddress": string,
          "customerZipCode": string,
          "customerCountry": string,
          "phone": string
      }
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

USER API

The data contains 6 users data.

User List

  • email: janedoe@testmail.com, password: pC80J.gCm5it
  • email: jenydoe@testmail.com, password: qH1.IZYLsir
  • email: janetdoe@testmail.com, password: jV5V.IQaC
  • email: johndoe@testmail.com, password: rW2B8.Her4f
  • email: joedoe@testmail.com, password: iUer4.Ogt5b
  • email: jackdoe@testmail.com, password: qI1A3tnm.tFK8

getUsers

Returns all users.

              
[GET] https://apihero-api.quixtools.com/api/v1/user/getUsers
              
            
Response
              
{
  "data": [
    {
      "id": string,
      "name": string,
      "email": string,
      "gender": string,
      "image": string,
      "address": [
        {
          "addressId": string,
          "addressName": string,
          "name": string,
          "customerAddress": string,
          "customerZipCode": string,
          "customerCountry": string,
          "phone": string
        },
        .
        .
        .
      ]
    },
    .
    .
    .
  ],
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getUser

Returns a single user data with submitted "userId".

              
[GET] https://apihero-api.quixtools.com/api/v1/user/getUser/userId
              
            
Response
              
{
  "data": {
    "id": string,
    "name": string,
    "email": string,
    "gender": string,
    "image": string,
    "address": [
      {
        "addressId": string,
        "addressName": string,
        "name": string,
        "customerAddress": string,
        "customerZipCode": string,
        "customerCountry": string,
        "phone": string
      },
      .
      .
      .
    ]
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

createUser

Adds a new user with submitted data. It behaves as if it added a new user, but in reality, it doesn't perform the operation.

              
[POST] https://apihero-api.quixtools.com/api/v1/user/createUser
              
            
Request
              
{
  "name": string,
  "email": string,
  "password": string,
  "repassword": string,,
  "gender": string
  "image": string
}
              
            
Response
              
{
  "data":{
    "id": string,
    "name": string,
    "email": string,
    "gender": string,
    "image": string,
    "address": []
  }
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

deleteUser

Deletes the user with submitted "userId". It behaves as if it deleted the user with the submitted "userId", but it does not actually perform the operation.

              
[DELETE] https://apihero-api.quixtools.com/api/v1/user/deleteUser/userId
              
            
Response
              
{
  "data": {
    "id": string,
    "name": string,
    "email": string,
    "gender": string,,
    "image": sting
    "address": [
      {
        "addressId": string,
        "addressName": string,
        "name": string,
        "customerAddress": string,
        "customerZipCode": string,
        "customerCountry": string,
        "phone": string
      },
      .
      .
      .
    ]
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

AUTHENTICATION API

login

Returns JWT access token with 1 hour expire time.

              
[POST] https://apihero-api.quixtools.com/api/v1/authentication/login
              
            
Request
              
{
  "email": string,
  "password": string
}
              
            
Response
              
{
  "data": {
    "id": string
    "name": string
    "email": string
    "token": string
  }
  "success": boolean,
  "message": string,
  "userMessage": string
}
              
            

getUser

Returns the user by token. Requires a valid "Authorization" header key with Bearer JWT.

              
[GET] https://apihero-api.quixtools.com/api/v1/authentication/getUser
              
            
Response
              
{
  "data": {
    "id": string,
    "name": string,
    "email": string,
    "gender": string,
    "image": string,
    "address": [
      {
        "addressId": string,
        "addressName": string,
        "name": string,
        "customerAddress": string,
        "customerZipCode": string,
        "customerCountry": string,
        "phone": string
      },
      .
      .
      .
    ]
  },
  "success": boolean,
  "message": string,
  "userMessage": string
}