Skip to content

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOKUMENTASI API

PUBLIC API (Allow Unauthorized)


REGISTER USER

POST https://frency-api-ofjpwfxlpa-et.a.run.app/users

  • Content-Type: application/json
{
  "name" : "Franchisee 2",
  "email" : "franchisee2@frency.io",
  "password" : "franchisee2",
  "role" : "Franchisee" // [Franchisee, Franchisor]
}

LOGIN USER

POST https://frency-api-ofjpwfxlpa-et.a.run.app/users/login

  • Content-Type: application/json
{
  "email" : "franchisor@frency.io",
  "password" : "franchisor"
}

PRIVATE API (Need Token)


USER API

GET ALL USERS

GET https://frency-api-ofjpwfxlpa-et.a.run.app/users

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

GET CURRENT USER

GET https://frency-api-ofjpwfxlpa-et.a.run.app/users/current

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

EDIT CURRENT USER

PUT https://frency-api-ofjpwfxlpa-et.a.run.app/users/current

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd
{
  "name" : "string",
  "email" : "string",
  "password" : "string",
  "role" : "string"
}

LOGOUT

DELETE https://frency-api-ofjpwfxlpa-et.a.run.app/users/logout

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

FRANCHISE API

GET ALL FRANCHISES

GET https://frency-api-ofjpwfxlpa-et.a.run.app/franchises

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

GET A FRANCHISE

GET https://frency-api-ofjpwfxlpa-et.a.run.app/franchises/(:franchise_id)

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

POST FRANCHISE

POST https://frency-api-ofjpwfxlpa-et.a.run.app/franchises

  • Content-Type: application/json
  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd
{
  "franchise_name" : "string",
  "address" : "string",
  "description" : "string",
  "category" : "string",
  "whatsapp_number" : "string",
  "franchiseType": [1, 2, 3] // franchise_type_id
}

UPLOAD FRANCHISE GALLERY

POST https://frency-api-ofjpwfxlpa-et.a.run.app/franchises/(:franchise_id)/upload

  • Content-Type: multipart/form-data
  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd
{
  "gallery" : ["img1.jpg", "img2.jpg", "img2.jpg"] // multiple_upload
}

GET MY FRANCHISES (By Franchisor)

GET https://frency-api-ofjpwfxlpa-et.a.run.app/my_franchises

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

UPDATE FRANCHISE

PUT https://frency-api-ofjpwfxlpa-et.a.run.app/franchises/(:franchise_id)

  • Content-Type: application/json
  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd
{
  "franchise_name" : "string 1",
  "address" : "string 1",
  "description" : "string 1",
  "category" : "string 1",
  "whatsapp_number" : "string 1",
  "franchiseType": [1, 3]
}

DELETE FRANCHISE

DELETE https://frency-api-ofjpwfxlpa-et.a.run.app/franchises/(:franchise_id)

  • Authorization: 4d13ae85-5656-4d69-8747-59fe57f481fd

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages