Skip to content

EcoSenseID/EcoSense-ApiRequirements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 

Repository files navigation

Readme

Dear our cloud computing team, here's the specification of required API endpoints from mobile developer team.


Browse Campaign

  • URL

    • /campaign
  • Method

    • GET
  • Parameters

    • categoryId as int, optional. -> category
    • q as string, optional. -> queries/keywords
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Dashboard

  • URL

    • /dashboard
  • Method

    • GET
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Categories

  • URL

    • /categories
  • Method

    • GET
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Campaign Detail

  • URL

    • /detail
  • Method

    • GET
  • Parameters

    • id as int
    • recordId as int, optional
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Mission Completion Proof

  • URL

    • /proof
  • Method

    • POST
  • Request Body

    • missionId as int
    • photo as file, optional
    • caption as string, optional
  • Headers

    • Content-Type: multipart/form-data
    • Authorization: Bearer <idToken>
  • Samples

Submit Campaign Completion

  • URL

    • /completecampaign
  • Method

    • POST
  • Request Body

    • campaignId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Contributions

  • URL

    • /contributions
  • Method

    • GET
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Join Campaign

  • URL

    • /joincampaign
  • Method

    • POST
  • Request Body

    • campaignId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Get Saved Recognisables

  • URL

    • /savedrecognisables
  • Method

    • GET
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Save Recognisable

  • URL

    • /saverecognisable
  • Method

    • POST
  • Request Body

    • label as string
    • confidencePercent as int (0-100)
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Get Stories

  • URL

    • /stories
  • Parameters

    • page as int, optional
    • size as int, optional
  • Method

    • GET
  • Headers

    • (optional) Authorization: Bearer <token>
  • Samples

Get Story Detail

  • URL

    • /storydetail
  • Parameters

    • id as int
  • Method

    • GET
  • Headers

    • (optional) Authorization: Bearer <token>
  • Samples

Get Story Replies

  • URL

    • /replies
  • Parameters

    • storyId as int
    • page as int, optional
    • size as int, optional
  • Method

    • GET
  • Headers

    • (optional) Authorization: Bearer <token>
  • Samples

Get Story Supporters

  • URL

    • /supporters
  • Parameters

    • storyId as int
    • page as int, optional
    • size as int, optional
  • Method

    • GET
  • Headers

    • (optional) Authorization: Bearer <token>
  • Samples

Post a New Story

  • URL

    • /poststory
  • Method

    • POST
  • Headers

    • Content-Type: multipart/form-data
    • Authorization: Bearer <token>
  • Request Body

    • sharedCampaignId as int, optional
    • caption as string
    • attachedPhoto as file, optional
  • Samples

Post a New Reply

  • URL

    • /postreply
  • Method

    • POST
  • Request Body

    • storyId as int
    • caption as string
    • attachedPhoto as file, optional
  • Headers

    • Content-Type: multipart/form-data
    • Authorization: Bearer <idToken>
  • Samples

Support a Story

  • URL

    • /supportstory
  • Method

    • POST
  • Request Body

    • storyId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Unsupport a Story

  • URL

    • /unsupportstory
  • Method

    • POST
  • Request Body

    • storyId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Support a Reply

  • URL

    • /supportreply
  • Method

    • POST
  • Request Body

    • replyId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Unsupport a Reply

  • URL

    • /unsupportreply
  • Method

    • POST
  • Request Body

    • replyId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Reward Homepage

  • URL

    • /rewardhome
  • Method

    • GET
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Reward List

  • URL

    • /rewards
  • Method

    • GET
  • Parameters

    • categoryId as int
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

My Reward List

  • URL

    • /myrewards
  • Method

    • GET
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Reward Detail

  • URL

    • /rewarddetail
  • Method

    • GET
  • Parameters

    • rewardId as int
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

My Reward Detail

  • URL

    • /myrewarddetail
  • Method

    • GET
  • Parameters

    • claimId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Redeem Reward

  • URL

    • /redeemreward
  • Method

    • POST
  • Request Body

    • rewardId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Request Reward

  • URL

    • /requestreward
  • Method

    • POST
  • Request Body

    • rewardId as int
    • email as string
    • walletType as string
    • walletNumber as string
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Use Reward

  • URL

    • /usereward
  • Method

    • POST
  • Request Body

    • claimId as int
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

Get Profile

  • URL

    • /profile
  • Method

    • GET
  • Parameters

    • userId as int, optional
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Get Stories History

  • URL

    • /storieshistory
  • Method

    • GET
  • Parameters

    • userId as int, optional
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Get Campaigns History

  • URL

    • /campaignshistory
  • Method

    • GET
  • Parameters

    • userId as int, optional
  • Headers

    • Authorization: Bearer <idToken>, optional
  • Samples

Get Notifications

  • URL

    • /notifications
  • Method

    • GET
  • Parameters

    • language as string ('id' OR 'en')
  • Headers

    • Authorization: Bearer <idToken>
  • Samples

About

API endpoint spec based on mobile app client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •