openapi: 3.0.0 info: title: Actifit Node API version: 1.0.0 description: API for connecting to Actifit end points servers: # Relative URL — resolves to whatever host serves the docs. The running app # (app.js) also overrides this dynamically per request with the live host. - url: / description: Current server components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: Exercise: type: object properties: name: { type: 'string', description: 'Name of the exercise', example: 'Push-ups' } sets: { type: 'integer', description: 'Number of sets', example: 3 } reps: { type: 'string', description: 'Repetition range or exact reps', example: '8-12' } duration: { type: 'string', description: 'Duration for timed exercises', example: '30-60s' } notes: { type: 'string', description: 'Additional notes for the exercise', example: 'Keep core tight.' } required: [name, sets] Workout: type: object properties: workoutName: { type: 'string', description: 'Name of the workout plan', example: 'My First Workout Plan' } description: { type: 'string', description: 'Description of the workout', example: 'A beginner-friendly full body routine.' } exercises: type: array items: $ref: '#/components/schemas/Exercise' explanation: { type: 'string', description: 'Optional explanation for the workout', example: 'This workout focuses on compound movements.', nullable: true } required: [workoutName, description, exercises] WorkoutResponse: # Schema for workout objects returned by the API type: object properties: _id: { type: 'string', description: 'MongoDB ObjectId of the workout', example: '651a9e8f1d2e3f4a5b6c7d8e' } userId: { type: 'string', description: 'ID of the user who owns the workout', example: '651a9e8f1d2e3f4a5b6c7d80' } workoutName: { type: 'string', example: 'My First Workout Plan - UPDATED' } description: { type: 'string', example: 'An updated beginner-friendly full body routine.' } timestamp: { type: 'string', format: 'date-time', description: 'Creation timestamp', example: '2023-10-02T10:00:00.000Z' } lastModified: { type: 'string', format: 'date-time', description: 'Last modification timestamp', example: '2023-10-02T11:30:00.000Z', nullable: true } exercises: type: array items: $ref: '#/components/schemas/Exercise' explanation: { type: 'string', nullable: true, example: 'This workout focuses on compound movements for overall strength.' } required: [_id, userId, workoutName, description, timestamp, exercises] ErrorResponse: type: object properties: success: { type: 'boolean', example: false } error: { type: 'string', example: 'Internal server error.' } details: { type: 'string', example: 'Specific error message', nullable: true } message: { type: 'string', example: 'Workout not found or does not belong to this user.', nullable: true } SuccessResponse: type: object properties: success: { type: 'boolean', example: true } message: { type: 'string', example: 'Operation successful.' } DailyDelegationPool: type: object properties: hive_pool: { type: 'number', format: 'float', description: 'Daily delegation pool for HIVE.', example: 12345.67 } steem_pool: { type: 'number', format: 'float', description: 'Daily delegation pool for STEEM.', example: 9876.54 } required: [hive_pool, steem_pool] DailyTipEntry: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } text: { type: 'string', example: 'Stay hydrated for better performance!' } date: { type: 'string', format: 'date-time', example: '2023-10-02T12:00:00.000Z' } # Add other fields if you know them required: [text, date] LoginImage: type: object properties: imgUrl: { type: 'string', format: 'url', example: 'https://raw.githubusercontent.com/actifit/actifit-landingpage/master/static/img/insta_achive_earn.png' } required: [imgUrl] TutorialVideo: type: object properties: vidUrl: { type: 'string', format: 'url', example: 'https://www.youtube.com/watch?v=kUBZJ3EpoKY' } required: [vidUrl] PostEntry: type: object description: A generic post object. Refine with actual fields from your 'posts' collection. properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } permlink: { type: 'string', example: 'my-awesome-post-title' } title: { type: 'string', example: 'My Awesome Post' } author: { type: 'string', example: 'actifit-user' } # ... add other common post fields NewsEntry: type: object description: A news item. Refine with actual fields from your 'news' collection. properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } title: { type: 'string', example: 'Actifit App Update 1.5.0 Released!' } body: { type: 'string', example: 'We have exciting new features...' } date: { type: 'string', format: 'date-time', example: '2023-10-01T09:00:00.000Z' } enabled: { type: 'boolean', example: true } # ... add other fields SurveyOption: type: object properties: id: { type: 'string', example: 'option1' } text: { type: 'string', example: 'Yes, I use it daily!' } # Add any other fields for survey options (e.g., voteCount if public) required: [id, text] SurveyEntry: type: object description: A survey item. Refine with actual fields from your 'surveys' collection. properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } title: { type: 'string', example: 'How often do you use Actifit?' } description: { type: 'string', example: 'Help us improve by telling us about your usage.' } enabled: { type: 'boolean', example: true } date: { type: 'string', format: 'date-time', example: '2023-09-20T10:00:00.000Z' } survey_reward: { type: 'number', example: 10 } options: type: array items: $ref: '#/components/schemas/SurveyOption' # ... add other fields CaptchaVerifyResponse: type: object properties: success: { type: 'boolean', example: true } error: { type: 'string', example: 'error', nullable: true } SupplyAFITResponse: type: string # The endpoint returns a string representation of a number example: '1036231' # Example for circulatingSupplyAFIT, could be '2000000' for totalSupplyAFIT TokenPriceResponse: type: object properties: token: { type: 'string', example: 'BNB' } price: { type: 'number', format: 'float', example: 300.5432 } required: [token, price] DexTradeAFITUSDTResponse: type: object properties: 'AFIT/USDT': type: object properties: price: { type: 'number', format: 'float', example: 0.122 } up: { type: 'number', format: 'float', example: 0.1 } down: { type: 'number', format: 'float', example: 0.05 } required: [price, up, down] ChainInfo: type: object description: Generic object for chain information. Refine based on actual 'utils.getChainInfo' output. example: { 'chain_id': '...' } AccountData: type: object description: Generic object for account data. Refine based on actual 'utils.getAccountData' output. example: { 'HIVE': { 'name': '...', 'voting_power': '...' } } PendingRewardsResponse: type: object properties: pendingRewards: { type: 'number', format: 'float', example: 15.75 } required: [pendingRewards] VotingStatusResponse: type: object properties: status: { type: 'object', description: 'Voting status object from DB.' } # Refine if you know the structure vp: { type: 'number', format: 'float', example: 85.2 } reward_start: { type: 'string', example: '02h 30m' } required: [status, vp, reward_start] UserVotedSurveyResponse: type: object properties: voted: { type: 'boolean', example: true } required: [voted] VoteSurveySuccessResponse: type: object properties: status: { type: 'string', example: 'success' } rewarded: { type: 'number', example: 10 } required: [status, rewarded] TransactionOutcome: type: object description: The outcome object of a blockchain transaction. Refine with actual fields. properties: tx: type: object properties: ref_block_num: { type: 'integer', example: 12345 } # ... other transaction fields # ... other fields like 'id', 'block_num', etc. required: [tx] example: { "tx": { "ref_block_num": 12345, "id": "tx_id_hash", "block_num": 123 } } AvailableHiveNodesResponse: type: object properties: hiveNodes: type: array items: { type: 'string', format: 'url', example: 'https://api.hive.blog' } required: [hiveNodes] MarketPair: type: object properties: name: { type: 'string', example: 'AFIT/USDT' } link: { type: 'string', format: 'url', example: 'https://www.digifinex.com/en-ww/trade/USDT/AFIT' } required: [name, link] MarketExchange: type: object properties: chain: { type: 'string', example: 'BSC' } exchange: { type: 'string', example: 'Digifinex' } link: { type: 'string', format: 'url', example: 'https://links.actifit.io/digi' } icon: { type: 'string', example: '' } # Assuming empty string as per your data pairs: type: array items: $ref: '#/components/schemas/MarketPair' required: [chain, exchange, link, pairs] RecalculateUserTokensResponse: type: string description: Success message upon recalculating and updating user token count. example: 'success recalculating & updating user token count: 1234.56' FetchUserDataResponse: type: object properties: success: { type: 'boolean', example: true } userdata: type: object description: User account data returned by utils.validateAccountLogin. Refine with actual fields. example: { "id": "123", "name": "actifit-user", "posting": { "key_auths": [["STM123...", 1]] } } required: [success, userdata] AccessDeniedResponse: type: object properties: success: { type: 'boolean', example: false } message: { type: 'string', example: 'Invalid user' } required: [success, message] ResetActionSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] DeletedAccountRecord: type: object properties: user: { type: 'string', example: 'deleted-user' } date: { type: 'string', format: 'date-time', example: '2023-10-02T12:00:00.000Z' } approach: { type: 'string', example: 'keychain' } platform: { type: 'string', example: 'web' } required: [user, date] UpdateSettingsSuccess: type: object properties: success: { type: 'boolean', example: true } required: [success] UserSettingsData: type: object properties: user: { type: 'string', example: 'actifit-user' } settings: type: object description: User-specific settings object. Refine with actual fields. example: { "notifications": { "enabled": true }, "theme": "dark" } required: [user, settings] NotificationTypesResponse: type: array items: type: string # Assuming config.notificationTypes is an array of strings example: ['new_post', 'mention', 'vote', 'receive_afit'] LoginAuthSuccess: type: object properties: success: { type: 'boolean', example: true } message: { type: 'string', example: 'Authentication successful!' } token: { type: 'string', example: 'eyJhbGciOiJIUzI1Ni...' } userdata: type: object description: User account data. Refine with actual fields. example: { "id": "123", "name": "actifit-user" } required: [success, message, token, userdata] UserTokensDetails: type: object properties: username: { type: 'string', example: 'actifit-user' } tokens: { type: 'number', format: 'float', example: 1234.567 } afitx: { type: 'number', format: 'float', example: 100.00 } # ... other token-related fields if 'grabUserTokensFunc' returns them required: [username, tokens] # Add other required fields if any ThreadParamResponse: type: string example: 'true' # Or 'false' depending on BOT_THREAD env var TransactionItem: type: object description: A single token transaction entry. Refine with actual fields. properties: user: { type: 'string', example: 'actifit-user' } reward_activity: { type: 'string', example: 'Daily_Activity' } token_count: { type: 'number', format: 'float', example: 50.0 } date: { type: 'string', format: 'date-time', example: '2023-10-01T10:00:00.000Z' } # ... other transaction fields PostByTagItem: type: object description: A post filtered by tag. Refine with actual fields from 'verified_posts'. example: { "author": "actifit-user", "permlink": "my-post-about-tag", "json_metadata": { "tags": ["fitness", "actifit"] } } SignupTransactionItem: type: object description: A signup transaction record. Refine with actual fields from 'signup_transactions'. properties: account_name: { type: 'string', example: 'new-actifit-user' } referrer: { type: 'string', example: 'actifit-referrer' } account_created: { type: 'boolean', example: true } date: { type: 'string', format: 'date-time', example: '2023-09-15T08:00:00.000Z' } # ... other signup-related fields VerifiedNewbieItem: type: object description: A verified newbie account entry. Refine with actual fields. properties: user: { type: 'string', example: 'newbie-user' } verify_date: { type: 'string', format: 'date-time', example: '2023-10-01T12:00:00.000Z' } sm_verif_lnk: { type: 'string', example: 'https://twitter.com/...' } verif_mod: { type: 'string', example: 'moderator1' } required: [user, verify_date] ActiveRefRewardInfo: type: object properties: account_name: { type: 'string', example: 'referred-user' } referrer: { type: 'string', example: 'referrer-user' } account_created: { type: 'boolean', example: true } date: { type: 'string', format: 'date-time', example: '2023-09-10T10:00:00.000Z' } ref_rew_act_days: { type: 'integer', example: 30 } ref_rew_pct: { type: 'integer', example: 15 } referrer_cur_rank: { type: 'number', format: 'float', example: 60 } referrer_cur_afit: { type: 'number', format: 'float', example: 100000 } referrer_cur_afitx: { type: 'number', format: 'float', example: 500 } required: [account_name, referrer, account_created, date, ref_rew_act_days, ref_rew_pct] AccountsTotalAFITStats: type: object properties: accounts: { type: 'integer', example: 15000 } total: { type: 'number', format: 'float', example: 5000000.75 } required: [accounts, total] TokensBurntStats: type: array items: type: object properties: _id: { type: 'string', nullable: true } # Null if grouped without specific ID tokens_burnt: { type: 'number', format: 'float', example: 12345.67 } burn_trx_count: { type: 'integer', example: 123 } required: [tokens_burnt, burn_trx_count] LastSignupClaimedResponse: type: object properties: user: { type: 'string', example: 'actifit-user' } claimDate: { type: 'string', format: 'date-time', example: '2024-01-10T00:00:00.000Z' } required: [user, claimDate] MyFreeSignupLinkItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } code: { type: 'string', example: 'MyPromoCode123' } entries: { type: 'integer', example: 1 } delegation: { type: 'boolean', example: true } signup_reward: { type: 'boolean', example: true } referrer_reward: { type: 'boolean', example: true } assigned_user: { type: 'string', example: 'actifit-user' } date: { type: 'string', format: 'date-time', example: '2023-10-01T00:00:00.000Z' } required: [code, entries] # Simplified required MyFreeSignupLinksResponse: type: object properties: result: type: array items: $ref: '#/components/schemas/MyFreeSignupLinkItem' required: [result] ClaimFreeSignupAccountsSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] ClaimableFreeAccountsResponse: type: object properties: status: { type: 'boolean', example: true } required: [status] ModActionSuccessResponse: type: object properties: status: { type: 'string', example: 'success' } # Other dynamic fields based on action (e.g., txId, URL for freesignup) required: [status] ModActionErrorResponse: type: object properties: error: { type: 'string', example: 'Account does not have proper privileges' } required: [error] UserBridgeEligibleResponse: type: object properties: eligible: { type: 'boolean', example: true } required: [eligible] BridgeTransactionItem: type: object properties: user: { type: 'string', example: 'actifit-user' } wallet: { type: 'string', example: '0x123abc...' } afitTrx: { type: 'string', example: 'AFIT_TX_ID' } hbdTrx: { type: 'string', example: 'HBD_TX_ID' } status: { type: 'string', example: 'pending', enum: ['pending', 'complete', 'failed'] } date: { type: 'string', format: 'date-time', example: '2023-10-01T12:00:00.000Z' } required: [user, wallet, afitTrx, hbdTrx, status, date] AppendBridgeTransactionSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] VerifySignBSCAddSuccess: type: object properties: success: { type: 'boolean', example: true } required: [success] StoreUserWalletAddressSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] GenericObject: type: object description: A generic object, replace with a specific schema when details are known. example: {} DeleteUserWalletAddressSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] UserWalletAddressItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } wallet: { type: 'string', example: '0x123abc456def789ghi012jkl345mno678pqr901st' } chain: { type: 'string', example: 'BSC' } # Add other fields if present in user_wallet_address collection, like 'tokens' from sort({tokens: -1}) required: [user, wallet, chain] AirdropDataDisplayResponse: type: string example: '["0xwallet1","0xwallet2",]["1000","500",]' # Raw string output AirdropEntry: type: object properties: wallet: { type: 'string', example: '0x123abc456def789ghi012jkl345mno678pqr901st' } reward: { type: 'number', format: 'float', example: 123.45 } required: [wallet, reward] AirdropResultsEntry: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } tokens_count: { type: 'number', format: 'float', example: 1500.25 } afit_bsc_reward: { type: 'number', format: 'float', example: 123.45 } # Add other fields from afit_bsc_hive_airdrop required: [user, tokens_count, afit_bsc_reward] UserTokensItem: # From topAFITHolders type: object properties: user: { type: 'string', example: 'actifit-user' } tokens: { type: 'number', format: 'float', example: 50000.123 } # Add other fields if 'user_tokens' collection has them required: [user, tokens] AFITXHolderItem: # From topAFITXHolders type: object properties: account: { type: 'string', example: 'actifit-user' } balance: { type: 'number', format: 'float', example: 12345.678 } required: [account, balance] AFITXHolderPrettyResponse: type: string example: "#|Token Holder | AFITX Tokens Held |
\n|---|---|---|
\n1|@actifit|12345.678|
" # Example of markdown table AFITXUserData: # From afitxData/:user type: object properties: balance: { type: 'number', format: 'float', example: 1234.56 } # ... other AFITX related user data required: [balance] DelegationPaymentItem: type: object properties: _id: { type: 'object', nullable: true } # Null when grouped by null tokens_distributed: { type: 'number', format: 'float', example: 15000.0 } user_count: { type: 'integer', example: 150 } required: [tokens_distributed, user_count] TotalTokensDistributedItem: type: object properties: _id: type: object properties: reward_activity: { type: 'string', example: 'Daily_Activity' } nullable: true # For the total entry with _id: null tokens_distributed: { type: 'number', format: 'float', example: 2500.50 } required: [tokens_distributed] RewardedActivityCount: type: array items: type: object properties: reward_count: { type: 'integer', example: 5000 } required: [reward_count] CharityItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } charity_name: { type: 'string', example: 'Environmental Cause' } # Add other fields if your 'available_charities' has them required: [charity_name] UserBadgeItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } badge_name: { type: 'string', example: 'Daily Achiever' } # Add other badge properties required: [user, badge_name] UserFriendItem: type: object properties: friend: { type: 'string', example: 'another-user' } required: [friend] NotificationUpdateStatus: type: object properties: status: { type: 'string', example: 'success' } required: [status] AFITBuyHiveResponse: type: object properties: status: { type: 'string', example: 'success' } boughtAmnt: { type: 'number', format: 'float', example: 123.45 } tokens: { type: 'number', format: 'float', example: 5000.00 } required: [status, boughtAmnt, tokens] CancelRefundSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] ProductInfo: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } name: { type: 'string', example: 'Actifit Smartwatch' } type: { type: 'string', example: 'real' } price: type: array items: type: object properties: price: { type: 'number', format: 'float', example: 100 } currency: { type: 'string', example: 'AFIT' } actifit_percent_cut: { type: 'integer', example: 10 } benefits: type: object properties: time_span: { type: 'integer', example: 30 } time_unit: { type: 'string', example: 'days' } provider: { type: 'string', example: 'actifit' } count: { type: 'integer', example: 50 } # Available count # ... other product details required: [name, price, type] UpdateProductStatusSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] BuyGadgetHiveResponse: type: object properties: status: { type: 'string', example: 'Success' } required: [status] RegisterUserNotificationSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] MintProductsResponse: type: object properties: status: { type: 'object' } # MongoDB update result object required: [status] RealProductsBoughtItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } gadget: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8f' } gadget_name: { type: 'string', example: 'Actifit T-Shirt' } quantity: { type: 'integer', example: 1 } color: { type: 'string', example: 'Blue' } status: { type: 'string', example: 'pending', enum: ['pending', 'processing', 'shipped', 'delivered', 'cancelled'] } afit_paid: { type: 'number', format: 'float', example: 500.0 } hive_paid: { type: 'number', format: 'float', example: 15.0 } buyer_name: { type: 'string', example: 'John Doe' } buyer_phone: { type: 'string', example: '+1234567890' } buyer_address: { type: 'string', example: '123 Main St' } buyer_address2: { type: 'string', nullable: true, example: 'Apt 4B' } buyer_country: { type: 'string', example: 'USA' } buyer_state: { type: 'string', example: 'CA' } buyer_city: { type: 'string', example: 'Los Angeles' } buyer_zip: { type: 'string', example: '90210' } date_bought: { type: 'string', format: 'date-time', example: '2023-10-01T10:00:00.000Z' } last_updated: { type: 'string', format: 'date-time', example: '2023-10-02T12:00:00.000Z' } note: { type: 'string', nullable: true, example: 'Order received.' } required: [user, gadget, gadget_name, status, afit_paid, date_bought] RealProductsBoughtPrettyResponse: type: string example: "#|User | Gadget| Gadget Name| quantity| color | Status | afit_paid | hive_paid | buyer_name | buyer_phone | buyer_address | buyer_address2 | buyer_country | buyer_state | buyer_city | buyer_zip | date_bought | last_updated | note|
\n|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
\n1|@actifit-user|651a9e8f1d2e3f4a5b6c7d8f|Actifit T-Shirt|1|Blue|pending|500.0 AFIT|15.0 HIVE|John Doe|+1234567890|123 Main St|Apt 4B|USA|CA|Los Angeles|90210|2023-10-01T10:00:00.000Z|2023-10-02T12:00:00.000Z|Order received.|
" PurchaseRealProductRequest: type: object properties: product_id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } buyer_name: { type: 'string', example: 'Jane Doe' } buyer_phone: { type: 'string', example: '+15551234567' } buyer_address: { type: 'string', example: '123 Any St.' } buyer_address2: { type: 'string', nullable: true, example: 'Apt. 1A' } buyer_country: { type: 'string', example: 'USA' } buyer_state: { type: 'string', example: 'NY' } buyer_city: { type: 'string', example: 'New York' } buyer_zip: { type: 'string', example: '10001' } afit_amount: { type: 'number', format: 'float', example: 1000.0 } hive_amount: { type: 'number', format: 'float', example: 50.0 } order_quantity: { type: 'integer', example: 1 } color_choice: { type: 'string', example: 'Red', nullable: true } required: [product_id, buyer_name, buyer_phone, buyer_address, buyer_country, buyer_state, buyer_city, buyer_zip, afit_amount, hive_amount, order_quantity] PurchaseRealProductSuccess: type: object properties: status: { type: 'string', example: 'success' } trx: { $ref: '#/components/schemas/TransactionOutcome' } tokens: { type: 'number', format: 'float', example: 9000.0 } required: [status, trx, tokens] MultiBuyHiveResponse: type: object properties: status: { type: 'string', example: 'Success' } required: [status] RecentGadgetBuyPrizeCycle: type: object properties: drawDate: { type: 'string', format: 'date-time', example: '2023-10-01T00:00:00.000Z' } # Add other fields like winner, prize, etc., if available required: [drawDate] ActiveGadgetBuyTicket: type: object properties: user: { type: 'string', example: 'actifit-user' } product_id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } product_name: { type: 'string', example: 'Weight Vest' } count: { type: 'integer', example: 1 } date: { type: 'string', format: 'date-time', example: '2023-10-02T10:00:00.000Z' } required: [user, product_id, count] UserActiveGadgetBuyTicketsByUserResponse: type: object properties: userCount: { type: 'integer', example: 10 } ticketCount: { type: 'integer', example: 15 } result: type: array items: type: object properties: _id: { type: 'string', example: 'actifit-user' } tickets_collected: { type: 'integer', example: 3 } required: [_id, tickets_collected] required: [userCount, ticketCount, result] UserActiveGadgetBuyTicketsResponse: type: array items: type: object properties: _id: { type: 'string', nullable: true } # null for group by null tickets_collected: { type: 'integer', example: 3 } entries: { type: 'integer', example: 3 } required: [tickets_collected, entries] BuyWorkoutResponse: type: object properties: status: { type: 'string', example: 'Success' } user_tokens: { type: 'number', format: 'float', example: 990.0 } required: [status, user_tokens] UserFriendRequestsResponse: type: object properties: sent_pending: type: array items: type: object properties: initiator: { type: 'string', example: 'userA' } request: { type: 'string', example: 'friendship' } target: { type: 'string', example: 'userB' } date: { type: 'string', format: 'date-time' } status: { type: 'string', example: 'pending' } required: [initiator, target, status, date] received_pending: type: array items: type: object properties: initiator: { type: 'string', example: 'userC' } request: { type: 'string', example: 'friendship' } target: { type: 'string', example: 'userA' } date: { type: 'string', format: 'date-time' } status: { type: 'string', example: 'pending' } required: [initiator, target, status, date] required: [sent_pending, received_pending] UserAddedVidResponse: type: object properties: status: { type: 'string', example: 'success' } details: { type: 'string', nullable: true } required: [status] UserVidNotifierResponse: type: object properties: status: { type: 'string', example: 'success' } error: { type: 'string', nullable: true } required: [status] AddFriendSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] CancelFriendRequestSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] AcceptFriendSuccess: type: object properties: status: { type: 'string', example: 'success' } details: { type: 'string', nullable: true } # For error case in code required: [status] DropFriendshipSuccess: type: object properties: status: { type: 'string', example: 'success' } required: [status] NotificationItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } actionTaker: { type: 'string', example: 'friend' } type: { type: 'string', example: 'friendship_request' } category: { type: 'string', example: 'friendship' } message: { type: 'string', example: 'User friend has sent you a friendship request' } link: { type: 'string', format: 'url' } status: { type: 'string', example: 'unread', enum: ['read', 'unread'] } date: { type: 'string', format: 'date-time', example: '2023-10-01T12:00:00.000Z' } required: [user, actionTaker, type, category, message, link, status, date] AllUserBadgesResponse: type: object properties: badges: type: array items: $ref: '#/components/schemas/UserBadgeItem' userCount: { type: 'integer', example: 100 } required: [badges, userCount] LuckyWinnerItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'lucky-user' } reward_activity: { type: 'string', example: 'Post' } lucky_winner: { type: 'integer', example: 1 } # ... other token_transaction fields required: [user, reward_activity, lucky_winner] CharityDonorItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } giver: { type: 'string', example: 'charity-user' } reward_activity: { type: 'string', example: 'Charity Post' } # ... other token_transaction fields required: [giver, reward_activity] ClaimBadgeSuccess: type: object properties: status: { type: 'string', example: 'success' } user: { type: 'string', example: 'actifit-user' } badge: { type: 'string', example: 'iso' } required: [status, user, badge] ISOParticipantItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'iso-participant' } # ... other ISO participation fields required: [user] DelegatorItem: type: object properties: _id: { type: 'string', example: 'actifit-user' } # Or 'name' steem_power: { type: 'number', format: 'float', example: 1000.5 } # Add other delegation fields required: [steem_power] TopDelegatorsResponse: type: object properties: steem: type: array items: $ref: '#/components/schemas/DelegatorItem' hive: type: array items: $ref: '#/components/schemas/DelegatorItem' required: [steem, hive] DelegationDetails: type: object properties: user: { type: 'string', example: 'actifit-user' } steem_power: { type: 'number', format: 'float', example: 5000.0 } # ... other delegation details required: [steem_power] TeamMember: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } name: { type: 'string', example: 'actifit-mod' } title: { type: 'string', example: 'moderator' } status: { type: 'string', example: 'active' } # ... other team member details required: [name, title, status] ProfessionalItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } name: { type: 'string', example: 'Dr. Fitness' } active: { type: 'boolean', example: true } # ... other professional details required: [name, active] ProductItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } name: { type: 'string', example: 'AFIT Smartwatch' } active: { type: 'boolean', example: true } # ... other product details required: [name, active] TopTokenHolderItem: type: object properties: _id: { type: 'string', example: 'actifit-user' } user: { type: 'string', example: 'actifit-user' } tokens: { type: 'number', format: 'float', example: 12345.678 } required: [user, tokens] TopTokenHoldersPrettyResponse: type: string example: "#|Token Holder | AFIT Tokens Held |
\n|---|---|---|
\n1|@actifit-user|12345.678|
" BannedUserItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'banned-user' } ban_status: { type: 'string', example: 'active' } ban_date: { type: 'string', format: 'date-time' } # ... other ban details required: [user, ban_status] IsBannedResponse: type: boolean example: true PoweringDownItem: type: object properties: _id: { type: 'string', example: 'actifit-user' } user: { type: 'string', example: 'actifit-user' } daily_afit_transfer: { type: 'number', format: 'float', example: 500.0 } min_afitx: { type: 'number', format: 'float', example: 5.0 } date: { type: 'string', format: 'date-time' } required: [user, daily_afit_transfer, date] InitiateAFITMoveSESuccess: type: object properties: status: { type: 'string', example: 'Success' } trx: { $ref: '#/components/schemas/PoweringDownItem' } required: [status, trx] TipActionSuccess: type: object properties: status: { type: 'string', example: 'Success' } tipAmount: { type: 'number', format: 'float', example: 10.0 } senderTokenCount: { type: 'number', format: 'float', example: 990.0 } recipientTokenCount: { type: 'number', format: 'float', example: 1010.0 } required: [status, tipAmount, senderTokenCount, recipientTokenCount] TotalTipAmountResponse: type: object properties: total_tip: { type: 'number', format: 'float', example: 150.0 } required: [total_tip] CountResponse: type: object properties: reblog_count: { type: 'integer', example: 50 } # Or upvote_count, rewarded_post_count required: [reblog_count] # Adjust for specific endpoint UserRewardedPostCountResponse: type: object properties: rewarded_post_count: { type: 'integer', example: 120 } required: [rewarded_post_count] UserRankDetails: type: object properties: user_rank: { type: 'string', example: '75.25' } rank_no_afitx: { type: 'number', format: 'float', example: 70.0 } afitx_rank: { type: 'number', format: 'float', example: 5.25 } delegation_score: { type: 'number', format: 'float', example: 20.0 } afit_tokens_score: { type: 'number', format: 'float', example: 30.0 } tot_posts_score: { type: 'number', format: 'float', example: 15.0 } recent_posts_score: { type: 'number', format: 'float', example: 10.0 } afit_BSC: { type: 'number', format: 'float', example: 1000.0 } afitx_BSC: { type: 'number', format: 'float', example: 50.0 } afit_BNB_LP_BSC: { type: 'number', format: 'float', example: 200.0 } afitx_BNB_LP_BSC: { type: 'number', format: 'float', example: 10.0 } full_afit_bal: { type: 'number', format: 'float', example: 15000.0 } full_afitx_bal: { type: 'number', format: 'float', example: 1000.0 } required: [user_rank] # Many fields might be missing if 0 AltAccountStatus: type: object properties: delegator: { type: 'string', example: 'main-account' } alt_account: { type: 'string', example: 'alt-account' } user_rank_benefit: { type: 'integer', example: 1 } # ... other fields required: [delegator, alt_account] PostRewardResponse: type: object properties: token_count: { type: 'number', format: 'float', example: 5.253 } required: [token_count] CharityRewardsResponse: type: array items: type: object properties: _id: { type: 'object', nullable: true } tokens_distributed: { type: 'number', format: 'float', example: 1234.56 } user_count: { type: 'integer', example: 50 } required: [tokens_distributed, user_count] FullAFITPayPostItem: type: object properties: user: { type: 'string', example: 'actifit-user' } reward_activity: { type: 'string', example: 'Full AFIT Payout' } token_count: { type: 'number', format: 'float', example: 100.0 } date: { type: 'string', format: 'date-time' } # ... other related fields required: [user, reward_activity, token_count, date] FullAFITPayStatsResponse: type: array items: type: object properties: _id: { type: 'object', nullable: true } afit_tokens: { type: 'number', format: 'float', example: 10000.0 } orig_sbd_amount: { type: 'number', format: 'float', example: 50.0 } orig_steem_amount: { type: 'number', format: 'float', example: 100.0 } orig_sp_amount: { type: 'number', format: 'float', example: 200.0 } transaction_count: { type: 'integer', example: 250 } required: [afit_tokens, transaction_count] ModeratorActivityItem: type: object properties: name: { type: 'string', example: 'moderator1' } title: { type: 'string', example: 'moderator' } status: { type: 'string', example: 'active' } items: type: array items: $ref: '#/components/schemas/TransactionItem' # Reuse generic transaction item required: [name, items] ExchangeAFITPriceResponse: type: object properties: afitHiveLastPrice: { type: 'number', format: 'float', example: 0.00003 } afitHiveLastUsdPrice: { type: 'number', format: 'float', example: 0.0123 } lastUpdated: { type: 'string', format: 'date-time' } required: [afitHiveLastPrice, afitHiveLastUsdPrice, lastUpdated] CurAFITPriceResponse: type: object properties: _id: { type: 'integer', example: 1 } unit_price_usd: { type: 'number', format: 'float', example: 0.0123 } date: { type: 'string', format: 'date-time' } required: [_id, unit_price_usd, date] ConfirmPaymentResponse: type: object properties: paymentReceivedTx: { type: 'string', example: 'tx_id_123' } accountCreated: { type: 'boolean', example: true } required: [paymentReceivedTx, accountCreated] GetRCResponse: type: object description: Resource Credit (RC) details for a user. Refine with actual fields. example: { "estimated_pct": 85.5, "max_mana": "...", "current_mana": "..." } SendNotificationResponse: type: object properties: status: { type: 'string', example: 'success' } error: { type: 'string', nullable: true } required: [status] FindUniqueUsersResponse: type: object properties: uniqueUserCount: { type: 'integer', example: 150 } dayRange: { type: 'integer', example: 30 } required: [uniqueUserCount, dayRange] AppendVerifiedPostResponse: type: string example: '{success}' # Or '{error inserting post data}' VerifiedPostItem: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } author: { type: 'string', example: 'actifit-user' } permlink: { type: 'string', example: 'my-fitness-report' } json_metadata: { type: 'object', example: { "tags": ["actifit"], "weight": 70 } } date: { type: 'string', format: 'date-time' } required: [author, permlink, date] UserPendingTokenSwap: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } paid_afit: { type: 'number', format: 'float', example: 50.0 } upvote_processed: { type: 'boolean', example: false, nullable: true } date: { type: 'string', format: 'date-time' } required: [user, paid_afit, date] UserTokenSwapHistoryItem: type: object properties: user: { type: 'string', example: 'actifit-user' } paid_afit: { type: 'number', format: 'float', example: 50.0 } upvote_processed: { type: 'boolean', example: true } date: { type: 'string', format: 'date-time' } required: [user, paid_afit, upvote_processed, date] GetUserTokenSwapHistoryResponse: type: object properties: userTokenSwapHist: type: array items: $ref: '#/components/schemas/UserTokenSwapHistoryItem' required: [userTokenSwapHist] PendingTokenSwapCount: type: object properties: pendingSwap: { type: 'integer', example: 5 } required: [pendingSwap] PendingTokenSwapTransaction: type: object properties: order: { type: 'integer', example: 1 } reward_round: { type: 'integer', example: 1 } user: { type: 'string', example: 'actifit-user' } paid_afit: { type: 'number', format: 'float', example: 50.0 } date: { type: 'string', format: 'date-time' } upvote_processed: { type: 'boolean', example: false, nullable: true } required: [order, reward_round, user, paid_afit, date] GetPendingTokenSwapTransResponse: type: object properties: pendingTransactions: type: array items: $ref: '#/components/schemas/PendingTokenSwapTransaction' count: { type: 'integer', example: 5 } afit_tokens_pending: { type: 'number', format: 'float', example: 250.0 } required: [pendingTransactions, count, afit_tokens_pending] GetProcessedTokenSwapTransResponse: type: object properties: count: { type: 'integer', example: 100 } afit_tokens_exchanged: { type: 'number', format: 'float', example: 5000.0 } pendingTransactions: # Renamed from 'pendingTransactions' in code but likely refers to processed ones here type: array items: $ref: '#/components/schemas/UserTokenSwapHistoryItem' required: [count, afit_tokens_exchanged, pendingTransactions] PerformAfitSteemExchangeSuccess: type: object properties: status: { type: 'string', example: 'Success' } required: [status] CancelOutdatedAfitSteemExchangeSuccess: type: object properties: status: { type: 'string', example: 'Success' } trans_refunded_count: { type: 'integer', example: 2 } required: [status, trans_refunded_count] TokenHoldersByCategoryItem: type: object properties: _id: { type: 'string', example: '1 - 10 AFIT' } count: { type: 'integer', example: 250 } required: [_id, count] TokenHoldersByCategoryPrettyResponse: type: string example: "|Category|Count|
\n|---|---|
\n|1 - 10 AFIT|250
" RewardActifitWebActionResponse: type: object properties: rewarded: { type: 'boolean', example: true } amount: { type: 'number', format: 'float', example: 0.1 } required: [rewarded, amount] RecentVerifiedPostsResponse: type: array items: type: object properties: _id: { type: 'string', example: 'actifit-user' } required: [_id] RecentAuthorsDataItem: type: object properties: author: { type: 'string', example: 'actifit-user' } rank: { type: 'string', description: 'JSON string of user rank components', example: '{"user_rank":"75.25", ...}' } required: [author, rank] TotalPostsSubmittedResponse: type: object properties: count: { type: 'integer', example: 120 } required: [count] TrackedMeasurementPost: type: object properties: author: { type: 'string', example: 'actifit-user' } permlink: { type: 'string', example: 'my-health-update' } date: { type: 'string', format: 'date-time' } json_metadata: type: object properties: weight: { type: 'number', format: 'float', example: 70.5 } height: { type: 'number', format: 'float', example: 175.0 } chest: { type: 'number', format: 'float', example: 95.0 } waist: { type: 'number', format: 'float', example: 80.0 } thighs: { type: 'number', format: 'float', example: 55.0 } bodyfat: { type: 'number', format: 'float', example: 15.2 } minProperties: 1 # At least one measurement must exist required: [author, permlink, date, json_metadata] TrackedActivityPost: type: object description: A post containing activity records. This is a generic representation, refine with actual fields from your 'verified_posts' collection. properties: author: { type: 'string', example: 'actifit-user' } permlink: { type: 'string', example: 'my-daily-steps' } date: { type: 'string', format: 'date-time' } json_metadata: { type: 'object', example: { "activity_type": "walking", "steps": 10000 } } required: [author, permlink, date] UserRequestFriendshipResponse: type: object properties: initiator: { type: 'string', example: 'userA' } request: { type: 'string', example: 'friendship' } target: { type: 'string', example: 'userB' } date: { type: 'string', format: 'date-time' } status: { type: 'string', example: 'success' } required: [initiator, request, target, status] UserSubmittedVidEntry: type: object properties: user: { type: 'string', example: 'actifit-user' } vid: { type: 'string', example: 'efqxuxlv' } status: { type: 'string', example: 'new', enum: ['new', 'publish_manual', 'published'] } date: { type: 'string', format: 'date-time' } required: [user, vid, status, date] GenericResponse: type: object properties: status: { type: 'string', example: 'success' } error: { type: 'string', nullable: true } details: { type: 'string', nullable: true } BuyGadgetAFITResponse: type: object properties: status: { type: 'string', example: 'Success' } user_tokens: { type: 'number', format: 'float', example: 990.0 } required: [status, user_tokens] GadgetBuyDrawData: type: object properties: drawDate: { type: 'string', format: 'date-time' } # Add other fields related to the draw (e.g., winner, prize) required: [drawDate] ActiveGadgetEntry: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } user: { type: 'string', example: 'actifit-user' } gadget: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8f' } # ObjectId as string product_type: { type: 'string', example: 'ingame' } gadget_name: { type: 'string', example: 'XP Boost' } gadget_level: { type: 'integer', example: 1 } status: { type: 'string', example: 'active' } span: { type: 'integer', example: 30 } span_unit: { type: 'string', example: 'days' } consumed: { type: 'integer', example: 5 } posts_consumed: { type: 'array', items: { type: 'string' } } date_bought: { type: 'string', format: 'date-time' } last_updated: { type: 'string', format: 'date-time' } note: { type: 'string' } benefic: { type: 'string', example: '@friend-user', nullable: true } # If a beneficiary is set productdetails: # From $lookup type: array items: type: object # Actual product details, can use existing ProductItem schema properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8f' } name: { type: 'string', example: 'XP Boost' } # ... other product fields required: [user, gadget, status, date_bought] GadgetCountByStatus: type: object properties: _id: type: object properties: gadget: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8f' } status: { type: 'string', example: 'active' } count: { type: 'integer', example: 2 } required: [count] ProductBoughtMatch: type: array items: type: object properties: user: { type: 'string', example: 'actifit-user' } date_bought: { type: 'string', format: 'date-time' } required: [user, date_bought] ValidatePassForDownloadSuccess: type: object properties: success: { type: 'string', example: 'success' } access_token: { type: 'string', example: 'new_access_token_xyz' } required: [success, access_token] FundsPassRetired: type: object properties: error: { type: 'string', example: 'Funds passwords have been retired. Your login session is used instead.' } code: { type: 'string', example: 'FUNDS_PASS_RETIRED' } required: [error, code] ProductPriceInfo: type: object properties: price: { type: 'number', format: 'float', example: 100 } currency: { type: 'string', example: 'AFIT' } actifit_percent_cut: { type: 'integer', example: 10 } required: [price, currency] ProductDetailsForBuy: type: object properties: _id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } name: { type: 'string', example: 'Ebook: Healthy Living' } type: { type: 'string', example: 'ebook', enum: ['ebook', 'ingame', 'real'] } price: type: array items: $ref: '#/components/schemas/ProductPriceInfo' provider: { type: 'string', example: 'author-user' } count: { type: 'integer', example: 100 } required: [name, type, price] ProcessBuyOrderResponse: type: object properties: status: { type: 'string', example: 'Success' } access_token: { type: 'string', nullable: true, example: 'download_token_abc' } required: [status] ConfirmAFITSEReceiptResponse: type: object properties: afit_se_power: { type: 'string', example: 'success' } afit_amount: { type: 'number', format: 'float', example: 123.45 } required: [afit_se_power, afit_amount] TipBalance: type: object properties: user: { type: 'string', example: 'actifit-user' } tip_balance: { type: 'number', format: 'float', example: 50.0 } # Add other fields like last_updated required: [user, tip_balance] AFITSEBulkConfirmationResponse: type: object properties: status: { type: 'string', example: 'done updating AFIT SE moves' } required: [status] ModeratorCommentEntry: type: object description: A transaction related to a moderator's comment or post vote. properties: user: { type: 'string', example: 'moderator1' } reward_activity: { type: 'string', example: 'Moderator Comment' } date: { type: 'string', format: 'date-time' } # ... other relevant fields for moderator activity required: [user, reward_activity, date] ModeratorWeeklyStatsItem: type: object properties: name: { type: 'string', example: 'moderator1' } title: { type: 'string', example: 'moderator' } status: { type: 'string', example: 'active' } items: type: array items: $ref: '#/components/schemas/ModeratorCommentEntry' required: [name, items] paths: /saveworkout: post: summary: Save a new workout plan description: Creates a new workout plan for the authenticated user. security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Workout' examples: newWorkout: value: workoutName: "My First Workout Plan" description: "A beginner-friendly full body routine." exercises: - name: "Push-ups" sets: 3 reps: "8-12" notes: "Keep core tight." explanation: "This workout focuses on compound movements for overall strength." responses: '201': description: Workout plan saved successfully. content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessResponse' - type: object properties: insertedId: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } '400': { description: 'Invalid request data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /workouts: get: summary: Fetch all workouts for user description: Retrieves a list of all workout plans belonging to the authenticated user. security: - bearerAuth: [] responses: '200': description: User workouts fetched successfully. content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/WorkoutResponse' '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /workouts/{workoutId}: parameters: - in: path name: workoutId schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the workout. get: summary: Fetch specific workout by ID description: Retrieves a single workout plan by its ID, ensuring it belongs to the authenticated user. security: - bearerAuth: [] responses: '200': description: Workout fetched successfully. content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessResponse' - type: object properties: data: { $ref: '#/components/schemas/WorkoutResponse' } '400': { description: 'Invalid workout ID format.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '404': { description: 'Workout not found or does not belong to this user.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } put: summary: Update specific workout by ID description: Updates an existing workout plan for the authenticated user. security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Workout' # Use the input Workout schema examples: updatedWorkout: value: workoutName: "My First Workout Plan - UPDATED" description: "An updated beginner-friendly full body routine, now with more details." exercises: - name: "Push-ups" sets: 4 reps: "8-10" notes: "Focus on form." - name: "Squats" sets: 3 reps: "10-15" explanation: "This updated workout focuses on compound movements." responses: '200': description: Workout updated successfully. content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessResponse' - type: object properties: workoutId: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } modifiedCount: { type: 'integer', example: 1 } '400': { description: 'Invalid request data or workout ID format.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '404': { description: 'Workout not found or does not belong to this user.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } delete: summary: Delete specific workout by ID description: Deletes a specific workout plan for the authenticated user. security: - bearerAuth: [] responses: '200': description: Workout deleted successfully. content: application/json: schema: allOf: - $ref: '#/components/schemas/SuccessResponse' - type: object properties: workoutId: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } deletedCount: { type: 'integer', example: 1 } '400': { description: 'Invalid workout ID format.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '404': { description: 'Workout not found or does not belong to this user.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } # --- NEW ENDPOINTS START HERE --- /getDailyDelegationPool/: get: summary: Get daily delegation pool amounts description: Retrieves the daily reward pool limits for HIVE and STEEM delegations. responses: '200': description: Successfully fetched daily delegation pool. content: application/json: schema: $ref: '#/components/schemas/DailyDelegationPool' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /dailyTip: get: summary: Get a daily tip description: Retrieves a list of daily tips. responses: '200': description: Successfully fetched daily tips. content: application/json: schema: type: array items: $ref: '#/components/schemas/DailyTipEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /loginImg: get: summary: Get login image URL description: Retrieves the URL for a login-related image. responses: '200': description: Successfully fetched login image URL. content: application/json: schema: $ref: '#/components/schemas/LoginImage' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /tutorialVidUrl: get: summary: Get tutorial video URL description: Retrieves the URL for an Actifit tutorial video. responses: '200': description: Successfully fetched tutorial video URL. content: application/json: schema: $ref: '#/components/schemas/TutorialVideo' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /queryPost: get: summary: Query a specific post by permlink description: Retrieves details of a post using its permlink. parameters: - in: query name: permlink schema: { type: 'string', example: 'my-awesome-post-title' } required: true description: The permlink of the post to query. responses: '200': description: Successfully fetched post data. Returns an empty object if permlink is missing. content: application/json: schema: type: array items: $ref: '#/components/schemas/PostEntry' '400': { description: 'Missing permlink query parameter.', content: { 'application/json': { schema: { type: 'object', properties: { error: { type: 'string', example: '' } } } } } } # Actual code returns {error: ''} '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /news: get: summary: Get Actifit news description: Retrieves a list of enabled news items, sorted by date. responses: '200': description: Successfully fetched news items. content: application/json: schema: type: array items: $ref: '#/components/schemas/NewsEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /surveys: get: summary: Get active surveys description: Retrieves a list of enabled surveys, sorted by date. responses: '200': description: Successfully fetched surveys. content: application/json: schema: type: array items: $ref: '#/components/schemas/SurveyEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /verifyLoginCaptcha: get: summary: Verify login reCAPTCHA token description: Verifies the reCAPTCHA token provided during login. parameters: - in: query name: token schema: { type: 'string', example: 'your_recaptcha_token' } required: true description: The reCAPTCHA token received from the client. responses: '200': description: Captcha verification status. content: application/json: schema: $ref: '#/components/schemas/CaptchaVerifyResponse' '400': { description: 'Missing token query parameter.', content: { 'application/json': { schema: { type: 'object', properties: { error: { type: 'string', example: 'error' } } } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /totalSupplyAFIT: get: summary: Get total AFIT token supply description: Retrieves the total supply of AFIT tokens. responses: '200': description: Successfully fetched total AFIT supply. content: application/json: schema: $ref: '#/components/schemas/SupplyAFITResponse' # Returns a string '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /circulatingSupplyAFIT: get: summary: Get circulating AFIT token supply description: Retrieves the calculated circulating supply of AFIT tokens by deducting known Actifit wallet balances. responses: '200': description: Successfully fetched circulating AFIT supply. content: application/json: schema: $ref: '#/components/schemas/SupplyAFITResponse' # Returns a string '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /BNBPrice: get: summary: Get current BNB price description: Retrieves the current price of BNB. responses: '200': description: Successfully fetched BNB price. content: application/json: schema: $ref: '#/components/schemas/TokenPriceResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /AFITBSCPrice: get: summary: Get AFIT (BSC) price description: Retrieves the current price of AFIT on the Binance Smart Chain. responses: '200': description: Successfully fetched AFIT (BSC) price. content: application/json: schema: $ref: '#/components/schemas/TokenPriceResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /AFITXBSCPrice: get: summary: Get AFITX (BSC) price description: Retrieves the current price of AFITX on the Binance Smart Chain. responses: '200': description: Successfully fetched AFITX (BSC) price. content: application/json: schema: $ref: '#/components/schemas/TokenPriceResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /dex-trade/afit-usdt: get: summary: Get AFIT/USDT price for Dex-trade description: Retrieves AFIT/USDT price data formatted for Dex-trade. responses: '200': description: Successfully fetched AFIT/USDT price data. content: application/json: schema: $ref: '#/components/schemas/DexTradeAFITUSDTResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getChainInfo: get: summary: Get blockchain information description: Retrieves information for a specified blockchain. parameters: - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'] } # Assuming these are the supported chains required: true description: The blockchain to get information for. responses: '200': description: Successfully fetched chain information. content: application/json: schema: $ref: '#/components/schemas/ChainInfo' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getAccountData: get: summary: Get account data for a user description: Retrieves blockchain account data for a specified user and blockchain. parameters: - in: query name: user schema: { type: 'string', example: 'actifit' } required: true description: The username of the account. - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'] } required: true description: The blockchain of the account. responses: '200': description: Successfully fetched account data. content: application/json: schema: $ref: '#/components/schemas/AccountData' '400': { description: 'Missing user or bchain query parameter.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } # Actual code returns {} '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /pendingRewards: get: summary: Get pending rewards for a user description: Retrieves the pending rewards for a specified user on a given blockchain. parameters: - in: query name: user schema: { type: 'string', example: 'actifit' } required: true description: The username to check pending rewards for. - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'] } required: false # Optional in code, defaults to '' description: The blockchain (e.g., HIVE, STEEM). responses: '200': description: Successfully fetched pending rewards. content: application/json: schema: $ref: '#/components/schemas/PendingRewardsResponse' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } # Actual code returns {} '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /votingStatus: get: summary: Get voting status and reward kickoff time description: Provides information about the current voting status, voting power (VP), and time until rewards can be kicked off. parameters: - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'], default: 'HIVE' } required: false description: The blockchain to query for voting status. responses: '200': description: Successfully fetched voting status. content: application/json: schema: $ref: '#/components/schemas/VotingStatusResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userVotedSurvey: get: summary: Check if user has voted on a survey description: Checks if a specific user has already cast a vote on a given survey. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username. - in: query name: id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the survey. responses: '200': description: Successfully checked user vote status. content: application/json: schema: $ref: '#/components/schemas/UserVotedSurveyResponse' '400': { description: 'Missing user or ID query parameter.', content: { 'application/json': { schema: { type: 'object', properties: { error: { type: 'string', example: '' } } } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /voteSurvey: get: summary: Vote on a survey description: Allows an authenticated user to vote on a survey and potentially receive a reward. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username performing the vote. - in: query name: id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the survey. - in: query name: option schema: { type: 'string', example: 'option1' } required: true description: The chosen option ID for the survey. responses: '200': description: Vote recorded successfully. content: application/json: schema: $ref: '#/components/schemas/VoteSurveySuccessResponse' '400': { description: 'Missing user, ID, or option query parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '404': { description: 'No matching survey found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /availableHiveNodes: get: summary: Get available Hive nodes description: Retrieves a list of alternative Hive blockchain nodes. responses: '200': description: Successfully fetched Hive nodes. content: application/json: schema: $ref: '#/components/schemas/AvailableHiveNodesResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /afitMarkets: get: summary: Get AFIT market information description: Retrieves a list of exchanges and pairs where AFIT tokens are traded. responses: '200': description: Successfully fetched market information. content: application/json: schema: type: array items: $ref: '#/components/schemas/MarketExchange' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /recalculateUserTokens: get: summary: Recalculate and update user token balance description: Recalculates an authenticated user's AFIT token balance based on all historical transactions and updates it in the database. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username whose tokens need recalculation. responses: '200': description: Success message with the updated token count. content: application/json: schema: $ref: '#/components/schemas/RecalculateUserTokensResponse' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error during recalculation or update.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /fetchUserData: get: summary: Fetch authenticated user data description: Validates user login and returns comprehensive user data. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch data for. - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'], default: 'HIVE' } required: false description: The blockchain of the user's account. responses: '200': description: Successfully fetched user data. content: application/json: schema: $ref: '#/components/schemas/FetchUserDataResponse' '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '403': { description: 'Invalid user or private posting key.', content: { 'application/json': { schema: { $ref: '#/components/schemas/AccessDeniedResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /resetFundsPass: get: summary: Reset user's funds password (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /resetLogin: get: summary: Reset user's login token description: Removes a user's current login token, forcing re-login. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username for which to reset the login token. - in: query name: token schema: { type: 'string', example: 'eyJhbGciOiJIUzI1Ni...' } required: true description: The login token to be removed. responses: '200': description: Login token reset successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateSettingsSuccess' # Using generic success '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /updateSettingsKeychain/{trxID}: get: summary: Update user settings via Keychain transaction description: Updates user settings based on a successful blockchain transaction initiated via Keychain. parameters: - in: path name: trxID schema: { type: 'string', example: 'tx_hash_123abc' } required: true description: The transaction ID confirming the settings update. - in: query name: operation schema: { type: 'string', example: '{"id":"custom_json","json":"{\\"theme\\":\\"dark\\"}"}' } required: true description: The JSON string of the blockchain operation. - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username whose settings are being updated. responses: '200': description: Settings updated successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateSettingsSuccess' '400': { description: 'Missing required parameters or invalid transaction.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /deleteAccountKeychain/{trxID}: get: summary: Delete user account via Keychain transaction description: Marks a user account as deleted based on a successful blockchain transaction initiated via Keychain. parameters: - in: path name: trxID schema: { type: 'string', example: 'tx_hash_123abc' } required: true description: The transaction ID confirming the account deletion. - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username of the account to delete. - in: query name: approach schema: { type: 'string', example: 'keychain' } required: true description: The method used for deletion. - in: query name: platform schema: { type: 'string', example: 'web' } required: true description: The platform from which the deletion was initiated. responses: '200': description: Account marked as deleted successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateSettingsSuccess' # Using generic success '400': { description: 'Missing required parameters or invalid transaction.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /deleteAccount/: get: summary: Delete user account description: Marks a user account as deleted. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username of the account to delete. - in: query name: approach schema: { type: 'string', example: 'manual' } required: true description: The method used for deletion. - in: query name: platform schema: { type: 'string', example: 'web' } required: true description: The platform from which the deletion was initiated. responses: '200': description: Account marked as deleted successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateSettingsSuccess' # Using generic success '400': { description: 'Invalid request data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /updateSettings/: get: summary: Update user settings description: Updates user-specific settings. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username whose settings are being updated. - in: query name: settings schema: { type: 'string', example: '{"notifications":{"enabled":true},"theme":"dark"}' } required: true description: A JSON string representing the new settings. responses: '200': description: Settings updated successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateSettingsSuccess' '400': { description: 'Invalid request data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userSettings/{user}: get: summary: Get settings for a specific user description: Retrieves the settings for a given username. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch settings for. responses: '200': description: Successfully fetched user settings. Returns an empty object if no settings found. content: application/json: schema: $ref: '#/components/schemas/UserSettingsData' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userSettings/: get: summary: Get all user settings description: Retrieves settings for all users. (Potentially sensitive, consider access control). responses: '200': description: Successfully fetched all user settings. content: application/json: schema: type: array items: $ref: '#/components/schemas/UserSettingsData' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /notificationTypes/: get: summary: Get available notification types description: Retrieves a list of supported notification types. responses: '200': description: Successfully fetched notification types. content: application/json: schema: $ref: '#/components/schemas/NotificationTypesResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /loginAuth: post: summary: Authenticate user with private posting key description: Authenticates a user with their username and private posting key, returning a JWT token on success. requestBody: required: true content: application/json: schema: type: object properties: username: { type: 'string', example: 'actifit-user' } ppkey: { type: 'string', example: '5Jxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' } bchain: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'], default: 'HIVE' } keeploggedin: { type: 'boolean', example: true } loginsource: { type: 'string', example: 'web' } required: [username, ppkey] responses: '200': description: Authentication successful. content: application/json: schema: $ref: '#/components/schemas/LoginAuthSuccess' '400': { description: 'Authentication failed! Please check the request.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '403': { description: 'Incorrect username or ppkey.', content: { 'application/json': { schema: { $ref: '#/components/schemas/AccessDeniedResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /user/{user}: get: summary: Get user token balance description: Retrieves the AFIT token balance for a specified user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. - in: query name: fullBalance schema: { type: 'boolean', example: true } required: false description: If true, returns full balance details. responses: '200': description: Successfully fetched user token balance. content: application/json: schema: $ref: '#/components/schemas/UserTokensDetails' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userFullBal/{user}: get: summary: Get full user token balance details description: Retrieves comprehensive AFIT token balance details for a specified user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query for full balance details. responses: '200': description: Successfully fetched full user token balance details. content: application/json: schema: $ref: '#/components/schemas/UserTokensDetails' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /thread_param/: get: summary: Get bot thread parameter description: Retrieves the value of the BOT_THREAD environment variable. responses: '200': description: Successfully fetched bot thread parameter. content: application/json: schema: $ref: '#/components/schemas/ThreadParamResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /transactions/{user?}: get: summary: Get token transactions description: Retrieves a list of token transactions, optionally filtered by user and paginated. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: false description: Optional username to filter transactions. - in: query name: itemCount schema: { type: 'integer', example: 50, maximum: 1000, default: 1000 } required: false description: Number of items to return per page (max 1000). - in: query name: page schema: { type: 'integer', example: 1, default: 1 } required: false description: The page number for pagination. responses: '200': description: Successfully fetched transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/TransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /postsbytag/{tag}: get: summary: Get posts by tag description: Retrieves a list of verified posts filtered by a specific tag. parameters: - in: path name: tag schema: { type: 'string', example: 'fitness' } required: true description: The tag to filter posts by. responses: '200': description: Successfully fetched posts. Returns an empty object if no posts found. content: application/json: schema: type: array items: $ref: '#/components/schemas/PostByTagItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /transactionsByType/: get: summary: Get transactions by type and date range description: Retrieves token transactions filtered by reward activity type, chain, and an optional date range. parameters: - in: query name: type schema: { type: 'string', example: 'Daily_Activity' } required: true description: The reward activity type to filter by. - in: query name: chain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'] } required: false description: The blockchain to filter transactions by. - in: query name: datesort schema: { type: 'integer', example: -1, enum: [1, -1] } required: false description: Sort order for date (1 for ascending, -1 for descending). - in: query name: sortByToken schema: { type: 'integer', example: -1, enum: [1, -1] } required: false description: Sort order for token_count (1 for ascending, -1 for descending). - in: query name: startDate schema: { type: 'string', format: 'date', example: '2023-09-01' } required: false description: Start date (YYYY-MM-DD) for the filter. Defaults to 2 days ago. - in: query name: endDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: End date (YYYY-MM-DD) for the filter. Defaults to yesterday. responses: '200': description: Successfully fetched transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/TransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /signups/{user?}: get: summary: Get signup transactions description: Retrieves signup transactions, optionally filtered by referrer user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-referrer' } required: false description: Optional username of the referrer. responses: '200': description: Successfully fetched signup transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/SignupTransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /referrals/{user?}: get: summary: Get referral signup transactions description: Retrieves signup transactions that have a referrer, optionally filtered by the referrer's username. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-referrer' } required: false description: Optional username of the referrer. responses: '200': description: Successfully fetched referral transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/SignupTransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /signupInfo/{user}: get: summary: Get signup information for a user description: Retrieves detailed signup information for a specific user. parameters: - in: path name: user schema: { type: 'string', example: 'new-actifit-user' } required: true description: The username to get signup info for. responses: '200': description: Successfully fetched signup information. Returns an empty object if not found. content: application/json: schema: $ref: '#/components/schemas/SignupTransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeVerifiedNewbies/: get: summary: Get active verified newbie accounts description: Retrieves a list of verified newbie accounts that are still within the reward period. responses: '200': description: Successfully fetched active verified newbies. content: application/json: schema: type: array items: $ref: '#/components/schemas/VerifiedNewbieItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /verifiedNewbies/: get: summary: Get all verified newbie accounts description: Retrieves a list of all verified newbie accounts. responses: '200': description: Successfully fetched all verified newbies. content: application/json: schema: type: array items: $ref: '#/components/schemas/VerifiedNewbieItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeRefReward/{referred}: get: summary: Get active referral reward information description: Retrieves information about an active referral reward for a referred user, including eligibility days and reward percentage. parameters: - in: path name: referred schema: { type: 'string', example: 'referred-user' } required: true description: The username of the referred account. responses: '200': description: Successfully fetched active referral reward info. Returns an empty object if no active reward. content: application/json: schema: $ref: '#/components/schemas/ActiveRefRewardInfo' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /accountsTotalAFIT: get: summary: Get total AFIT distributed and user count description: Retrieves the total number of users who have received AFIT and the total amount of AFIT distributed. responses: '200': description: Successfully fetched AFIT distribution statistics. content: application/json: schema: $ref: '#/components/schemas/AccountsTotalAFITStats' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /tokensBurnt: get: summary: Get total AFIT tokens burnt description: Retrieves the total amount of AFIT tokens that have been burnt through product purchases. responses: '200': description: Successfully fetched burnt token statistics. content: application/json: schema: $ref: '#/components/schemas/TokensBurntStats' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /lastSignupClaimed/{user}: get: summary: Get last signup claim date for a user description: Retrieves the last date a user claimed free signup accounts. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. responses: '200': description: Successfully fetched last claim date. content: application/json: schema: $ref: '#/components/schemas/LastSignupClaimedResponse' '404': { description: 'Entry not found.', content: { 'application/json': { schema: { type: 'object', properties: { err: { type: 'string', example: 'not found' } } } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /myFreeSignupLinks/: get: summary: Get a user's active free signup links description: Retrieves a list of free signup promotion codes currently assigned to the authenticated user. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query for free signup links. responses: '200': description: Successfully fetched free signup links. content: application/json: schema: $ref: '#/components/schemas/MyFreeSignupLinksResponse' '400': { description: 'No current free signup links found or missing user parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /claimFreeSignupAccounts/{user}: get: summary: Claim free signup accounts description: Allows a user to claim additional free signup promotion codes if eligible. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username claiming the accounts. responses: '200': description: Successfully claimed free signup accounts. content: application/json: schema: $ref: '#/components/schemas/ClaimFreeSignupAccountsSuccess' '400': { description: 'No claimable accounts available.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /claimableFreeAccounts/{user}: get: summary: Check if user can claim free accounts description: Checks a user's eligibility to claim additional free signup accounts. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check for claimable accounts. responses: '200': description: Eligibility status for claiming free accounts. content: application/json: schema: $ref: '#/components/schemas/ClaimableFreeAccountsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /modAction: get: summary: Perform moderator action description: Allows authorized moderators to perform various actions like ban/unban, reward posts, verify newbies, or generate free signup links. The moderator is the logged-in account (login session); currently disabled (503). security: - bearerAuth: [] parameters: - in: query name: targetAction schema: type: string enum: ['ban', 'unban', 'reward', 'verifynewbie', 'freesignup'] example: 'ban' required: true description: The action to be performed. - in: query name: banuser schema: { type: 'string', example: 'banned-user' } required: false # Required for 'ban' action description: Username to ban. - in: query name: ban_length schema: { type: 'string', example: '30 days' } required: false # Required for 'ban' action description: Duration of the ban. - in: query name: ban_reason schema: { type: 'string', example: 'Spamming' } required: false # Required for 'ban' action description: Reason for the ban. - in: query name: unbanuser schema: { type: 'string', example: 'unbanned-user' } required: false # Required for 'unban' action description: Username to unban. - in: query name: fullurl schema: { type: 'string', example: 'https://hive.blog/actifit/@actifit-user/permlink' } required: false # Required for 'reward' action description: Full URL of the post to reward. - in: query name: power schema: { type: 'number', example: 100 } required: false # Required for 'reward' action description: Voting power percentage (0-100). - in: query name: account schema: { type: 'string', example: 'newbie-to-verify' } required: false # Required for 'verifynewbie' action description: Username of the newbie account to verify. - in: query name: verif_link schema: { type: 'string', format: 'url', example: 'https://twitter.com/post' } required: false # Required for 'verifynewbie' action description: Social media verification link. - in: query name: signusername schema: { type: 'string', example: 'referrer-user' } required: false # Required for 'freesignup' action description: Username to assign free signup links to. - in: query name: txlink schema: { type: 'string', example: 'https://hive.blog/tx/...' } required: false # Required for 'freesignup' action description: Transaction link for free signup. - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM', 'BLURT'] } required: false # Required for 'reward' action description: The blockchain for the reward action. responses: '200': description: Moderator action performed successfully. content: application/json: schema: $ref: '#/components/schemas/ModActionSuccessResponse' '400': { description: 'Missing data or invalid action parameters.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ModActionErrorResponse' } } } } '401': { description: 'Not a moderator account.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ModActionErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userBridgeEligible: get: summary: Check user's eligibility for BSC bridge transaction description: Confirms whether a user can initiate another BSC bridge transaction for the current day or a specified date. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. - in: query name: date schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: Optional date (YYYY-MM-DD) to check eligibility for. responses: '200': description: User bridge eligibility status. content: application/json: schema: $ref: '#/components/schemas/UserBridgeEligibleResponse' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userBridgeTransactions: get: summary: Query user's BSC bridge transactions description: Retrieves a user's BSC bridge transactions, with optional filtering by status and start date. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query transactions for. - in: query name: status schema: { type: 'string', example: 'pending', enum: ['pending', 'complete', 'failed'] } required: false description: Optional status to filter transactions. - in: query name: date schema: { type: 'string', format: 'date', example: '2023-09-01' } required: false description: Optional start date (YYYY-MM-DD) for filtering transactions. responses: '200': description: Successfully fetched user bridge transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/BridgeTransactionItem' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /completedBridgeTransactions: get: summary: Get all completed BSC bridge transactions description: Retrieves a list of all completed BSC bridge transactions. responses: '200': description: Successfully fetched completed bridge transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/BridgeTransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /pendingBridgeTransactions: get: summary: Get all pending BSC bridge transactions description: Retrieves a list of all pending BSC bridge transactions. responses: '200': description: Successfully fetched pending bridge transactions. content: application/json: schema: type: array items: $ref: '#/components/schemas/BridgeTransactionItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /appendBridgeTransaction: get: summary: Append a new BSC bridge transaction description: Appends a new pending BSC bridge transaction to the queue if the user is eligible. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username initiating the bridge transaction. - in: query name: wallet schema: { type: 'string', example: '0x123abc456def789ghi012jkl345mno678pqr901st' } required: true description: The BSC wallet address. - in: query name: afitTrx schema: { type: 'string', example: 'HIVE_TX_ID_FOR_AFIT_TRANSFER' } required: true description: The transaction ID for the AFIT transfer on Hive. - in: query name: hbdTrx schema: { type: 'string', example: 'HIVE_TX_ID_FOR_HBD_TRANSFER' } required: true description: The transaction ID for the HBD transfer on Hive. responses: '200': description: Bridge transaction appended successfully. content: application/json: schema: $ref: '#/components/schemas/AppendBridgeTransactionSuccess' '400': { description: 'Missing data or user not eligible for another transaction today.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /verifySignBSCAddKeychain/{trxID}: get: summary: Verify signed BSC address and store via Keychain transaction description: Verifies an Ethereum signed message (BSC address) and stores it for the user, linked to a Hive Keychain transaction. parameters: - in: path name: trxID schema: { type: 'string', example: 'hive_tx_id_for_wallet_link' } required: true description: The Hive transaction ID that includes the wallet linking operation. - in: query name: operation schema: { type: 'string', example: '{"id":"custom_json","json":"{\\"wallet\\":\\"0x123abc...\\"}"}' } required: true description: The JSON string of the Hive custom_json operation. - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The Hive username. - in: query name: wallet schema: { type: 'string', example: '0x123abc456def789ghi012jkl345mno678pqr901st' } required: true description: The BSC wallet address to verify. - in: query name: nonce schema: { type: 'string', example: 'Actifit signing key...' } required: true description: The original nonce used in the Ethereum signature. - in: query name: sign schema: { type: 'string', example: '0x123456789...' } required: true description: The Ethereum signature. - in: query name: chain schema: { type: 'string', example: 'BSC', default: 'BSC' } required: false description: The blockchain of the wallet (e.g., BSC). responses: '200': description: BSC address verified and stored successfully. content: application/json: schema: $ref: '#/components/schemas/StoreUserWalletAddressSuccess' # Using generic success '400': { description: 'Missing required parameters, incorrect address, or invalid transaction.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /verifySignBSCAdd: get: summary: Verify signed BSC address description: Verifies an Ethereum signed message (BSC address) without linking to a Hive transaction. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: nonce schema: { type: 'string', example: 'Actifit signing key...' } required: true description: The original nonce used in the Ethereum signature. - in: query name: sign schema: { type: 'string', example: '0x123456789...' } required: true description: The Ethereum signature. - in: query name: wallet schema: { type: 'string', example: '0x123abc456def789ghi012jkl345mno678pqr901st' } required: true description: The BSC wallet address to verify. responses: '200': description: BSC address verified successfully. content: application/json: schema: $ref: '#/components/schemas/VerifySignBSCAddSuccess' '400': { description: 'Missing required parameters or incorrect address.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /storeUserWalletAddress: get: summary: Store user's wallet address description: Stores a user's blockchain wallet address. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username. - in: query name: wallet schema: { type: 'string', example: '0x123abc456def789ghi012jkl345mno678pqr901st' } required: true description: The wallet address. - in: query name: chain schema: { type: 'string', example: 'BSC', default: 'BSC' } required: false description: The blockchain of the wallet. responses: '200': description: Wallet address stored successfully. content: application/json: schema: $ref: '#/components/schemas/StoreUserWalletAddressSuccess' '400': { description: 'Missing required parameters.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /deleteUserWalletAddress: get: summary: Delete user's wallet address description: Deletes a user's stored wallet address for a specific blockchain. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username whose wallet address is to be deleted. - in: query name: chain schema: { type: 'string', example: 'BSC', default: 'BSC' } required: false description: The blockchain of the wallet to delete. responses: '200': description: Wallet address deleted successfully. content: application/json: schema: $ref: '#/components/schemas/DeleteUserWalletAddressSuccess' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getUserWalletAddress: get: summary: Get user's wallet address description: Retrieves a user's stored wallet addresses for a specific blockchain. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. - in: query name: chain schema: { type: 'string', example: 'BSC', default: 'BSC' } required: false description: The blockchain of the wallet (e.g., BSC). responses: '200': description: Successfully fetched user wallet addresses. content: application/json: schema: type: array items: $ref: '#/components/schemas/UserWalletAddressItem' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /airdropDataDisplay: get: summary: Display airdrop data (raw format) description: Returns raw string data for airdrop wallets and their corresponding rewards. responses: '200': description: Raw airdrop data string. content: text/plain: schema: $ref: '#/components/schemas/AirdropDataDisplayResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /airdropData: get: summary: Get Airdrop Data description: Retrieves processed airdrop data including wallet addresses and rewards. responses: '200': description: Successfully fetched processed airdrop data. content: application/json: schema: type: array items: $ref: '#/components/schemas/AirdropEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /airdropResults: get: summary: Get individual airdrop results for a user description: Retrieves the airdrop reward details for a specific user. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check airdrop results for. responses: '200': description: Successfully fetched airdrop results for the user. content: application/json: schema: $ref: '#/components/schemas/AirdropResultsEntry' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /sendAirdropResultsNotif: get: summary: Send airdrop results notifications description: (ADMIN ONLY) Triggers sending notifications to users about their airdrop results. responses: '200': # The code doesn't send a specific response, so assume success status description: Acknowledged notification sending (actual notifications sent in background). '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /topAFITHolders: get: summary: Get top AFIT token holders description: Retrieves a list of top AFIT token holders, optionally limited by count. parameters: - in: query name: count schema: { type: 'integer', example: 10 } required: false description: The maximum number of top holders to return. responses: '200': description: Successfully fetched top AFIT holders. content: application/json: schema: type: array items: $ref: '#/components/schemas/UserTokensItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /topAFITHEHolders: get: summary: Get top AFIT (Hive-Engine) token holders description: Retrieves a list of top AFIT token holders on Hive-Engine. responses: '200': description: Successfully fetched top AFIT (Hive-Engine) holders. content: application/json: schema: type: array items: $ref: '#/components/schemas/AFITXHolderItem' # Assuming similar structure '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /topAFITXHolders: get: summary: Get top AFITX token holders description: Retrieves a list of top AFITX token holders, optionally formatted as a pretty markdown table. parameters: - in: query name: count schema: { type: 'integer', example: 100, default: 100 } required: false description: The maximum number of top holders to return. - in: query name: pretty schema: { type: 'boolean', example: false } required: false description: If true, returns a formatted markdown table. responses: '200': description: Successfully fetched top AFITX holders. content: application/json: schema: type: array items: $ref: '#/components/schemas/AFITXHolderItem' text/plain: # For pretty=true schema: $ref: '#/components/schemas/AFITXHolderPrettyResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /afitxData/{user}: get: summary: Get AFITX data for a specific user description: Retrieves AFITX token data for a given username. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch AFITX data for. responses: '200': description: Successfully fetched AFITX data. content: application/json: schema: $ref: '#/components/schemas/AFITXUserData' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /delegationPayments: get: summary: Get total delegation payments for a date description: Retrieves the total tokens distributed and count of users for delegation rewards on a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for which to fetch delegation payments. Defaults to today. responses: '200': description: Successfully fetched delegation payment statistics. content: application/json: schema: type: array items: $ref: '#/components/schemas/DelegationPaymentItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /totalTokensDistributed: get: summary: Get total tokens distributed by reward type for a date description: Retrieves total tokens distributed, categorized by reward activity, and a grand total for a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for which to fetch distribution data. Defaults to today. responses: '200': description: Successfully fetched total tokens distributed statistics. content: application/json: schema: type: array items: $ref: '#/components/schemas/TotalTokensDistributedItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /rewarded-activity-count: get: summary: Get count of rewarded activities/posts description: Retrieves the total count of posts/activities that have been rewarded. responses: '200': description: Successfully fetched rewarded activity count. content: application/json: schema: $ref: '#/components/schemas/RewardedActivityCount' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /charities: get: summary: Get supported charities description: Retrieves a list of enabled charities supported by Actifit. responses: '200': description: Successfully fetched charities. content: application/json: schema: type: array items: $ref: '#/components/schemas/CharityItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userBadges/{user}: get: summary: Get user's badges description: Retrieves a list of badges earned by a specific user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch badges for. responses: '200': description: Successfully fetched user badges. content: application/json: schema: type: array items: $ref: '#/components/schemas/UserBadgeItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userFriends/{user}: get: summary: Get user's friends list description: Retrieves a list of users marked as friends for a specific user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch friends for. responses: '200': description: Successfully fetched user friends list. content: application/json: schema: type: array items: $ref: '#/components/schemas/UserFriendItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /markRead/{notif_id}: get: summary: Mark a notification as read description: Marks a specific user notification as 'read'. Requires authentication. security: - bearerAuth: [] parameters: - in: path name: notif_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the notification to mark as read. responses: '200': description: Notification marked as read successfully. content: application/json: schema: $ref: '#/components/schemas/NotificationUpdateStatus' '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /markUnread/{notif_id}: get: summary: Mark a notification as unread description: Marks a specific user notification as 'unread'. Requires authentication. security: - bearerAuth: [] parameters: - in: path name: notif_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the notification to mark as unread. responses: '200': description: Notification marked as unread successfully. content: application/json: schema: $ref: '#/components/schemas/NotificationUpdateStatus' '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /markAllRead/: get: summary: Mark all user's notifications as read description: Marks all notifications for a specific user as 'read'. Requires authentication. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username whose notifications are to be marked as read. responses: '200': description: All notifications marked as read successfully. content: application/json: schema: $ref: '#/components/schemas/NotificationUpdateStatus' '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyAFITHive/{user}/{amnt}/{afitAmnt}/{blockNo}/{trxID}/{bchain}: get: summary: Buy AFIT with HIVE description: Processes a transaction to buy AFIT tokens using HIVE. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: amnt schema: { type: 'number', format: 'float', example: 10.5 } required: true description: The amount of HIVE paid. - in: path name: afitAmnt schema: { type: 'number', format: 'float', example: 100.0 } required: true description: The amount of AFIT requested by the buyer. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain used for payment. responses: '200': description: AFIT purchase successful. content: application/json: schema: $ref: '#/components/schemas/AFITBuyHiveResponse' '400': { description: 'Transaction already verified or verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /cancelAFITBuy: get: summary: Cancel AFIT purchase and refund description: (ADMIN ONLY) Cancels a previous AFIT purchase and issues a refund by deducting AFIT from the user. Refused when the balance no longer covers the amount, unless force=1. parameters: - in: query name: specPass schema: { type: 'string', example: 'your_secret_pass' } required: true description: Special password for access. - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user who had purchased AFIT. - in: query name: afit schema: { type: 'number', format: 'float', example: 100.0 } required: true description: The amount of AFIT to refund (deduct). - in: query name: force schema: { type: 'string', enum: ['1'] } required: false description: 'Ops claw-back override: 1 deducts the amount even if the balance goes negative (the ledger row is marked forced). Without it, a balance that does not cover the amount is refused.' responses: '200': description: AFIT purchase cancellation and refund processed. content: application/json: schema: $ref: '#/components/schemas/CancelRefundSuccess' '400': { description: 'Invalid specPass or missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /refundPurchase: get: summary: Refund a product purchase description: (ADMIN ONLY) Refunds a product purchase by crediting AFIT to the user. parameters: - in: query name: specPass schema: { type: 'string', example: 'your_secret_pass' } required: true description: Special password for access. - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user who purchased the product. - in: query name: product_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The ID of the product. - in: query name: afit_paid schema: { type: 'number', format: 'float', example: 500.0 } required: true description: The amount of AFIT to refund (credit). responses: '200': description: Product purchase refunded successfully. content: application/json: schema: $ref: '#/components/schemas/CancelRefundSuccess' '400': { description: 'Invalid specPass, product not found, or missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /updateProdStatus: get: summary: Update product order status description: (ADMIN ONLY) Updates the status of a real product order and notifies the user and management. parameters: - in: query name: specPass schema: { type: 'string', example: 'your_secret_pass' } required: true description: Special password for access. - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user who made the purchase. - in: query name: status schema: { type: 'string', example: 'shipped', enum: ['pending', 'processing', 'shipped', 'delivered', 'cancelled'] } required: true description: The new status of the product order. - in: query name: trx_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the product purchase transaction. - in: query name: note schema: { type: 'string', example: 'Tracking number ABC123' } required: false description: An optional note regarding the status update. responses: '200': description: Product status updated successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateProductStatusSuccess' '400': { description: 'Invalid specPass, transaction not found, or missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /confirmProdReceipt: get: summary: Confirm product receipt description: (USER AUTHENTICATED) Confirms the receipt of a purchased product, updating its status to 'delivered'. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user confirming receipt. - in: query name: trx_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the product purchase transaction. - in: query name: note schema: { type: 'string', example: 'Received and satisfied!' } required: false description: An optional note regarding the receipt confirmation. responses: '200': description: Product receipt confirmed successfully. content: application/json: schema: $ref: '#/components/schemas/UpdateProductStatusSuccess' '400': { description: 'Missing data or transaction not found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyGadgetHiveKeychain/{user}/{gadget}/{trxID}/{bchain}: get: summary: Buy a gadget with HIVE via Keychain description: Processes the purchase of an in-game gadget using HIVE, verified by a Keychain transaction. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: gadget schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the gadget to purchase. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID from Keychain. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain used for payment. responses: '200': description: Gadget purchase successful. content: application/json: schema: $ref: '#/components/schemas/BuyGadgetHiveResponse' '400': { description: 'Transaction already verified, product not found, or verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyGadgetHive/{user}/{gadget}/{blockNo}/{trxID}/{bchain}: get: summary: Buy a gadget with HIVE description: Processes the purchase of an in-game gadget using HIVE. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: gadget schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the gadget to purchase. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain used for payment. responses: '200': description: Gadget purchase successful. content: application/json: schema: $ref: '#/components/schemas/BuyGadgetHiveResponse' '400': { description: 'Transaction already verified, product not found, or verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /registerUserNotification: post: summary: Register user notification token description: Registers a device/app notification token for a user. requestBody: required: true content: application/json: schema: type: object properties: token: { type: 'string', example: 'ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]' } user: { type: 'string', example: 'actifit-user' } app: { type: 'string', example: 'actifit_app', enum: ['actifit_app', 'web_notifications'] } webid: { type: 'string', example: 'web_client_id_123', nullable: true } # For web notifications required: [token, user, app] responses: '200': description: Notification token registered successfully. content: application/json: schema: $ref: '#/components/schemas/RegisterUserNotificationSuccess' '400': { description: 'Missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /mintProducts: get: summary: Mint in-game products description: (ADMIN ONLY) Increments the count of in-game products that have a count less than or equal to a minimum amount. parameters: - in: query name: secret schema: { type: 'string', example: 'your_minting_secret' } required: true description: The secret key for authorization. - in: query name: minAmount schema: { type: 'integer', example: 10, default: 0 } required: false description: The minimum count threshold for products to be minted. - in: query name: mintedAmount schema: { type: 'integer', example: 50, default: 50 } required: false description: The amount to add to the product count. responses: '200': description: Products minted successfully. content: application/json: schema: $ref: '#/components/schemas/MintProductsResponse' '400': { description: 'Invalid secret.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /realProductsBought/: get: summary: Get real products bought description: Retrieves a list of real products purchased by users. Requires moderator access or filtering by authenticated user. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'moderator-user' } required: true description: The authenticated user's username (must be a moderator or match `buyer`). - in: query name: buyer schema: { type: 'string', example: 'actifit-user' } required: false description: Optional buyer's username to filter transactions. - in: query name: pretty schema: { type: 'boolean', example: false } required: false description: If true, returns a formatted markdown table. responses: '200': description: Successfully fetched real products bought. content: application/json: schema: type: array items: $ref: '#/components/schemas/RealProductsBoughtItem' text/plain: # For pretty=true schema: $ref: '#/components/schemas/RealProductsBoughtPrettyResponse' '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '403': { description: 'Account does not have proper privileges.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /purchaseRealProduct/: post: summary: Purchase a real product description: Allows an authenticated user to purchase a real product using AFIT and HIVE, including shipping details. security: - bearerAuth: [] parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username making the purchase. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PurchaseRealProductRequest' responses: '200': description: Product purchase successful. content: application/json: schema: $ref: '#/components/schemas/PurchaseRealProductSuccess' '400': { description: 'Missing data, product not found, not enough balance, or pricing changed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyMultiGadgetHiveKeychain/{user}/{gadgets}/{trxID}/{bchain}: get: summary: Buy multiple in-game gadgets with HIVE via Keychain description: Processes the purchase of multiple in-game gadgets using HIVE, verified by a Keychain transaction. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: gadgets schema: { type: 'string', example: 'id1-id2-id3' } required: true description: Hyphen-separated MongoDB _ids of the gadgets to purchase. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID from Keychain. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain used for payment. responses: '200': description: Gadgets purchase successful. content: application/json: schema: $ref: '#/components/schemas/MultiBuyHiveResponse' '400': { description: 'Transaction already verified, product not found, or verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyMultiGadgetHive/{user}/{gadgets}/{blockNo}/{trxID}/{bchain}: get: summary: Buy multiple in-game gadgets with HIVE description: Processes the purchase of multiple in-game gadgets using HIVE. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: gadgets schema: { type: 'string', example: 'id1-id2-id3' } required: true description: Hyphen-separated MongoDB _ids of the gadgets to purchase. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain used for payment. responses: '200': description: Gadgets purchase successful. content: application/json: schema: $ref: '#/components/schemas/MultiBuyHiveResponse' '400': { description: 'Transaction already verified, product not found, or verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /recentGadgetBuyPrizeCycle: get: summary: Get data for the most recent gadget buy prize cycle description: Retrieves details about the latest prize drawing cycle for gadget purchases. responses: '200': description: Successfully fetched recent prize cycle data. content: application/json: schema: $ref: '#/components/schemas/RecentGadgetBuyPrizeCycle' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeGadgetBuyTickets/: get: summary: Get all current active gadget buy entry tickets description: Retrieves a list of all active tickets for the gadget prize draw. responses: '200': description: Successfully fetched active gadget buy tickets. content: application/json: schema: type: array items: $ref: '#/components/schemas/ActiveGadgetBuyTicket' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userActiveGadgetBuyTicketsByUser/: get: summary: Get active gadget buy tickets statistics per user description: Retrieves the total count of users and tickets collected during the current prize draw period, grouped by user. responses: '200': description: Successfully fetched user-grouped active gadget buy tickets. content: application/json: schema: $ref: '#/components/schemas/UserActiveGadgetBuyTicketsByUserResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userActiveGadgetBuyTickets/{user}: get: summary: Get a user's active gadget buy tickets description: Retrieves the number of active gadget buy tickets for a specific user during the current prize draw period. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch tickets for. responses: '200': description: Successfully fetched user's active gadget buy tickets. content: application/json: schema: $ref: '#/components/schemas/UserActiveGadgetBuyTicketsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyMultiGadgetKeychain/{user}/{gadgets}/{trxID}/{bchain}: get: summary: Buy multiple in-game gadgets via Keychain (AFIT) description: Processes the purchase of multiple in-game gadgets using AFIT, verified by a Keychain transaction. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: gadgets schema: { type: 'string', example: 'id1-id2-id3' } required: true description: Hyphen-separated MongoDB _ids of the gadgets to purchase. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID from Keychain. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Gadgets purchase successful. content: application/json: schema: $ref: '#/components/schemas/BuyGadgetAFITResponse' '400': { description: 'Transaction verification failed, product not found, or insufficient AFIT funds.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /buyMultiGadget/{user}/{gadgets}/{blockNo}/{trxID}/{bchain}: get: summary: Buy multiple in-game gadgets (AFIT) description: Processes the purchase of multiple in-game gadgets using AFIT. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: path name: gadgets schema: { type: 'string', example: 'id1-id2-id3' } required: true description: Hyphen-separated MongoDB _ids of the gadgets to purchase. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Gadgets purchase successful. content: application/json: schema: $ref: '#/components/schemas/BuyGadgetAFITResponse' '400': { description: 'Transaction verification failed, product not found, or insufficient AFIT funds.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /generateWorkoutKeychain/{user}/{trxID}/{bchain}: get: summary: Buy a workout generation (Keychain / on-device signing) description: Requires a session (x-acti-token) for the same user. Charges the workout generation fee after the generate-workout-wizard transaction, signed by the user, is confirmed on chain. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user buying the workout (must be the session user). - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE' } required: true description: The blockchain of the transaction. - in: query name: operation schema: { type: 'string' } required: true description: JSON of the signed transaction's operations, compared with the transaction found on chain. responses: '200': description: Outcome of the request. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' /generateWorkout/{user}/{blockNo}/{trxID}/{bchain}: get: summary: Purchase workout generation description: Allows an authenticated user to purchase workout generation using AFIT tokens. security: - bearerAuth: [] parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username purchasing the workout generation. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Workout generation purchased successfully. content: application/json: schema: $ref: '#/components/schemas/BuyWorkoutResponse' '400': { description: 'Error verifying transaction or insufficient AFIT funds.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '401': { description: 'Authenticated user not identified.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userFriendRequests/{user}: get: summary: Get user's pending friend requests description: Retrieves a list of sent and received pending friendship requests for a user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch friend requests for. responses: '200': description: Successfully fetched user friend requests. content: application/json: schema: $ref: '#/components/schemas/UserFriendRequestsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userAddedVid/{user}/{vid}/{status?}: get: summary: Track user uploaded video status description: Stores or updates the status of a user's uploaded video. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username who uploaded the video. - in: path name: vid schema: { type: 'string', example: 'efqxuxlv' } required: true description: The video ID. - in: path name: status schema: { type: 'string', example: 'new', enum: ['new', 'processing', 'published'] } required: false description: The status of the video (defaults to 'new'). responses: '200': description: Video status tracked successfully. content: application/json: schema: $ref: '#/components/schemas/UserAddedVidResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userVidNotifier: get: summary: Process and notify on user video status updates description: (ADMIN ONLY) Scans for status updates on user-submitted videos and sends notifications. parameters: - in: query name: threshold schema: { type: 'integer', example: 7 } required: false description: Number of days to keep video links before cleanup (default 7). responses: '200': description: Video status notifications processed. content: application/json: schema: $ref: '#/components/schemas/UserVidNotifierResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /addFriendHiveKeychain/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Send friend request via Keychain description: Sends a friendship request from userA to userB, verified by a Keychain transaction. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: The username sending the request. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The username receiving the request. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship request sent successfully. content: application/json: schema: $ref: '#/components/schemas/AddFriendSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /addFriend/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Send friend request description: Sends a friendship request from userA to userB. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: The username sending the request. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The username receiving the request. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship request sent successfully. content: application/json: schema: $ref: '#/components/schemas/AddFriendSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /cancelFriendRequestHiveKeychain/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Cancel friend request via Keychain description: Cancels a pending friendship request from userA to userB, verified by a Keychain transaction. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: The username initiating the cancellation. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The username whose request is being cancelled. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship request cancelled successfully. content: application/json: schema: $ref: '#/components/schemas/CancelFriendRequestSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /cancelFriendRequest/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Cancel friend request description: Cancels a pending friendship request from userA to userB. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: The username initiating the cancellation. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The username whose request is being cancelled. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship request cancelled successfully. content: application/json: schema: $ref: '#/components/schemas/CancelFriendRequestSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /acceptFriendHiveKeychain/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Accept friend request via Keychain description: Accepts a pending friendship request from userB to userA, verified by a Keychain transaction. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: The username accepting the request. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The username who sent the original request. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship request accepted successfully. content: application/json: schema: $ref: '#/components/schemas/AcceptFriendSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /acceptFriend/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Accept friend request description: Accepts a pending friendship request from userB to userA. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: The username accepting the request. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The username who sent the original request. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship request accepted successfully. content: application/json: schema: $ref: '#/components/schemas/AcceptFriendSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /dropFriendshipHiveKeychain/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Drop friendship via Keychain description: Removes an existing friendship between userA and userB, verified by a Keychain transaction. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: One of the usernames in the friendship. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The other username in the friendship. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship dropped successfully. content: application/json: schema: $ref: '#/components/schemas/DropFriendshipSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /dropFriendship/{userA}/{userB}/{blockNo}/{trxID}/{bchain}: get: summary: Drop friendship description: Removes an existing friendship between userA and userB. parameters: - in: path name: userA schema: { type: 'string', example: 'userA' } required: true description: One of the usernames in the friendship. - in: path name: userB schema: { type: 'string', example: 'userB' } required: true description: The other username in the friendship. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Friendship dropped successfully. content: application/json: schema: $ref: '#/components/schemas/DropFriendshipSuccess' '400': { description: 'Transaction verification failed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeNotifications/{user}: get: summary: Get user's unread notifications description: Retrieves a list of unread notifications for a specific user, sorted by date. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch notifications for. responses: '200': description: Successfully fetched active notifications. content: application/json: schema: type: array items: $ref: '#/components/schemas/NotificationItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /readNotifications/{user}: get: summary: Get user's read notifications description: Retrieves a list of read notifications for a specific user, sorted by date. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch notifications for. responses: '200': description: Successfully fetched read notifications. content: application/json: schema: type: array items: $ref: '#/components/schemas/NotificationItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /allNotifications/{user}: get: summary: Get all user's notifications description: Retrieves a list of all notifications (read and unread) for a specific user, sorted by date. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch notifications for. responses: '200': description: Successfully fetched all notifications. content: application/json: schema: type: array items: $ref: '#/components/schemas/NotificationItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /allUserBadges/: get: summary: Get all user badges and unique user count description: Retrieves all badges across all users and the total count of unique users who have badges. responses: '200': description: Successfully fetched all user badges and count. content: application/json: schema: $ref: '#/components/schemas/AllUserBadgesResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /luckyWinner/{user}: get: summary: Check if user is a lucky winner description: Checks if a specific user has ever been a "lucky winner" for a post reward. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. responses: '200': description: Successfully fetched lucky winner status. content: application/json: schema: type: array items: $ref: '#/components/schemas/LuckyWinnerItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /charityDonor/{user}: get: summary: Check if user is a charity donor description: Checks if a specific user has ever contributed to charity via "Charity Post" reward activity. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. responses: '200': description: Successfully fetched charity donor status. content: application/json: schema: type: array items: $ref: '#/components/schemas/CharityDonorItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /luckyWinnerList/: get: summary: Get list of all lucky winners description: Retrieves a list of all users who have been "lucky winners" for a post reward. responses: '200': description: Successfully fetched lucky winner list. content: application/json: schema: type: array items: $ref: '#/components/schemas/LuckyWinnerItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /claimBadge/: get: summary: Claim a user badge description: Allows a user to claim a specific badge if they meet the eligibility criteria. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username claiming the badge. - in: query name: badge schema: { type: 'string', example: 'iso', enum: ['iso', 'rewarded_activity_lev_1', 'doubledup_badge', 'charity_badge'] } # Example enum, expand as needed required: true description: The name of the badge to claim. responses: '200': description: Badge claimed successfully. content: application/json: schema: $ref: '#/components/schemas/ClaimBadgeSuccess' '400': { description: 'Missing user/badge or user not eligible.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /isoParticipant/{user}: get: summary: Check if user is an ISO participant description: Checks if a specific user took part in the ISO event. parameters: - in: path name: user schema: { type: 'string', example: 'iso-user' } required: true description: The username to check. responses: '200': description: Successfully fetched ISO participation status. content: application/json: schema: type: array items: $ref: '#/components/schemas/ISOParticipantItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /isoParticipantList/: get: summary: Get list of all ISO participants description: Retrieves a list of all users who took part in the ISO event. responses: '200': description: Successfully fetched ISO participant list. content: application/json: schema: type: array items: $ref: '#/components/schemas/ISOParticipantItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /topDelegators: get: summary: Get top AFIT delegators description: Retrieves a list of top delegators for STEEM and HIVE, optionally limited by count. parameters: - in: query name: count schema: { type: 'integer', example: 10 } required: false description: The maximum number of top delegators to return. responses: '200': description: Successfully fetched top delegators. content: application/json: schema: $ref: '#/components/schemas/TopDelegatorsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /delegation/{user}: get: summary: Get a single user's last recorded active delegation amount description: Retrieves the active delegation amount for a specific user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query delegation for. responses: '200': description: Successfully fetched user delegation. content: application/json: schema: $ref: '#/components/schemas/DelegationDetails' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /moderators: get: summary: Get current active moderators description: Retrieves a list of all active moderators. responses: '200': description: Successfully fetched moderator list. content: application/json: schema: type: array items: $ref: '#/components/schemas/TeamMember' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /ambassadors: get: summary: Get current active ambassadors description: Retrieves a list of all active ambassadors. responses: '200': description: Successfully fetched ambassador list. content: application/json: schema: type: array items: $ref: '#/components/schemas/TeamMember' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /professionals: get: summary: Get current active professionals description: Retrieves a list of all active professionals. responses: '200': description: Successfully fetched professionals list. content: application/json: schema: type: array items: $ref: '#/components/schemas/ProfessionalItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /products: get: summary: Get current active products description: Retrieves a list of all active products. responses: '200': description: Successfully fetched products list. content: application/json: schema: type: array items: $ref: '#/components/schemas/ProductItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /topTokenHolders: get: summary: Get top AFIT token holders description: Retrieves a list of top AFIT token holders, excluding banned users, optionally formatted as a pretty markdown table. parameters: - in: query name: count schema: { type: 'integer', example: 10 } required: false description: The maximum number of top holders to return. - in: query name: pretty schema: { type: 'boolean', example: false } required: false description: If true, returns a formatted markdown table. responses: '200': description: Successfully fetched top token holders. content: application/json: schema: type: array items: $ref: '#/components/schemas/TopTokenHolderItem' text/plain: # For pretty=true schema: $ref: '#/components/schemas/TopTokenHoldersPrettyResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /banned_users: get: summary: Get list of banned users description: Retrieves a list of all currently banned accounts. responses: '200': description: Successfully fetched banned users list. content: application/json: schema: type: array items: $ref: '#/components/schemas/BannedUserItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /is_banned/{user}: get: summary: Check if a user is banned description: Checks if a specific user account is currently banned. parameters: - in: path name: user schema: { type: 'string', example: 'banned-user' } required: true description: The username to check for ban status. responses: '200': description: User ban status. content: application/json: schema: $ref: '#/components/schemas/IsBannedResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /isPoweringDown/{user}: get: summary: Check if a user is powering down AFIT description: Retrieves details if a user is currently powering down AFIT from Hive-Engine. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. responses: '200': description: Powering down status for the user. Returns an empty object if not found. content: application/json: schema: $ref: '#/components/schemas/PoweringDownItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /poweringDownList/: get: summary: Get list of users powering down AFIT description: Retrieves a list of all users currently powering down AFIT from Hive-Engine. responses: '200': description: Successfully fetched list of users powering down. content: application/json: schema: type: array items: $ref: '#/components/schemas/PoweringDownItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /cancelAFITMoveSE: post: summary: Cancel AFIT move to Hive-Engine (Power Down) description: Cancels the logged-in user's pending AFIT move to Hive-Engine. Authorised by the login session (x-acti-token or Authorization Bearer) only; the funds password is no longer used. security: - bearerAuth: [] requestBody: required: false content: application/json: schema: type: object properties: user: { type: string, example: 'actifit-user', description: 'Optional; must match the session user.' } responses: '200': description: "{status: 'Success'} or {error} ('User mismatch', 'generic error', or an invalid/expired session)" content: application/json: schema: $ref: '#/components/schemas/CancelRefundSuccess' '401': { description: 'LOGIN_AGAIN - the posting key changed since this session was issued.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '403': { description: 'KEY_ROTATION_REQUIRED - the account must rotate its keys first.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '429': { description: 'Rate limited (5 per 15 minutes per IP).' } /initiateAFITMoveSE: get: summary: Initiate AFIT move to Hive-Engine (Power Down) description: Records a standing daily order to move AFIT tokens to Hive-Engine (power down); the daily job sends it. Authorised by the login session (the user is the session's account). Amount: positive, at most 3 decimals, within max_afit_to_se_day. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username initiating the move. - in: query name: amount schema: { type: 'number', format: 'float', example: 500.0 } required: true description: The amount of AFIT to move. responses: '200': description: AFIT move to Hive-Engine initiated successfully. content: application/json: schema: $ref: '#/components/schemas/InitiateAFITMoveSESuccess' '400': { description: 'Missing data, invalid amount, banned account, or insufficient AFIT/AFITX funds.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /tipAccount: get: summary: Tip AFIT to another account description: Sends AFIT tokens as a tip to another existing Hive account (not yourself). Authorised by the login session (the sender is the session's account). Amount: positive, at most 3 decimals, within the daily tip cap. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-sender' } required: true description: The username sending the tip. - in: query name: targetUser schema: { type: 'string', example: 'actifit-recipient' } required: true description: The username receiving the tip. - in: query name: amount schema: { type: 'number', format: 'float', example: 10.0 } required: true description: The amount of AFIT to tip. - in: query name: note schema: { type: 'string', example: 'Thanks for the great post!', nullable: true } required: false description: An optional note for the tip. responses: '200': description: AFIT tipped successfully. content: application/json: schema: $ref: '#/components/schemas/TipActionSuccess' '400': { description: 'Missing data, banned account, invalid funds password, or daily tip limit exceeded.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /totalTipped: get: summary: Get total AFIT tipped today description: Retrieves the total amount of AFIT tokens tipped across all users for the current day. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: Optional date (YYYY-MM-DD) to get total tips for. Defaults to today. responses: '200': description: Successfully fetched total tipped amount. content: application/json: schema: $ref: '#/components/schemas/TotalTipAmountResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /tippedToday/{user}: get: summary: Get total AFIT tipped by a user today description: Retrieves the total amount of AFIT tokens tipped by a specific user for the current day. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-sender' } required: true description: The username to query. - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: Optional date (YYYY-MM-DD) to get total tips for. Defaults to today. responses: '200': description: Successfully fetched total tipped amount by user. content: application/json: schema: $ref: '#/components/schemas/TotalTipAmountResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /reblogCount: get: summary: Get reblog count for a date description: Retrieves the total number of "Post Reblog" transactions for a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for which to fetch reblog count. Defaults to today. responses: '200': description: Successfully fetched reblog count. content: application/json: schema: $ref: '#/components/schemas/CountResponse' # Contains reblog_count '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /upvoteCount: get: summary: Get upvote count for a date description: Retrieves the total number of "Post Vote" transactions for a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for which to fetch upvote count. Defaults to today. responses: '200': description: Successfully fetched upvote count. content: application/json: schema: allOf: - $ref: '#/components/schemas/CountResponse' - type: object # <--- ADD THIS LINE properties: upvote_count: { type: 'integer', example: 150 } required: [upvote_count] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /rewardedPostCount: get: summary: Get rewarded post count for a date description: Retrieves the total number of "Post" transactions for a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for which to fetch rewarded post count. Defaults to today. responses: '200': description: Successfully fetched rewarded post count. content: application/json: schema: allOf: - $ref: '#/components/schemas/CountResponse' - type: object # <--- ADD THIS LINE properties: rewarded_post_count: { type: 'integer', example: 75 } required: [rewarded_post_count] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userRewardedPostCount/{user}: get: summary: Get user's rewarded post count description: Retrieves the number of rewarded posts for a specific user, optionally filtered by period or start date. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. - in: query name: period schema: { type: 'integer', example: 30 } required: false description: Number of days in the past to consider for the period. - in: query name: delay schema: { type: 'integer', example: 2 } required: false description: Number of days to delay the start date for the period. - in: query name: startDate schema: { type: 'string', format: 'date', example: '2023-09-01' } required: false description: Specific start date (YYYY-MM-DD) for the filter. responses: '200': description: Successfully fetched user's rewarded post count. content: application/json: schema: $ref: '#/components/schemas/UserRewardedPostCountResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getRank/{user}: get: summary: Get user's Actifit rank description: Calculates and retrieves the Actifit rank for a specific user, based on various components. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to calculate rank for. responses: '200': description: Successfully fetched user rank. content: application/json: schema: $ref: '#/components/schemas/UserRankDetails' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getAltAccountStatus/{user?}: get: summary: Get alternative account delegation status description: Retrieves information about an alt-account's delegation status, either for a specific user or all. parameters: - in: path name: user schema: { type: 'string', example: 'main-account' } required: false description: Optional username of the delegator to check. responses: '200': description: Successfully fetched alt account status. content: application/json: schema: oneOf: - $ref: '#/components/schemas/AltAccountStatus' # Single object if user param - type: array items: $ref: '#/components/schemas/AltAccountStatus' # Array if no user param '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getPostReward: get: summary: Get a post's AFIT reward description: Retrieves the AFIT token reward for a specific user and post URL, based on "Post" reward activity. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username of the post owner. - in: query name: url schema: { type: 'string', example: 'https://hive.blog/actifit/@actifit-user/my-post' } required: true description: The full URL of the post. responses: '200': description: Successfully fetched post reward. Returns 0 if not found. content: application/json: schema: $ref: '#/components/schemas/PostRewardResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getPostFullAFITPayReward: get: summary: Get a post's full AFIT Pay reward description: Retrieves the full AFIT Pay reward for a specific user and post permalink, based on "Full AFIT Payout" reward activity. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username of the post owner. - in: query name: url schema: { type: 'string', example: 'https://hive.blog/actifit/@actifit-user/my-post' } required: true description: The full URL of the post (permlink will be extracted). responses: '200': description: Successfully fetched full AFIT Pay reward. Returns 0 if not found. content: application/json: schema: $ref: '#/components/schemas/PostRewardResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getCharityRewards: get: summary: Get total charity rewards and donor count description: Retrieves the total number of rewarded tokens to charities and the count of unique users who donated. responses: '200': description: Successfully fetched charity rewards statistics. content: application/json: schema: $ref: '#/components/schemas/CharityRewardsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getFullAFITPayPosts: get: summary: Get full AFIT Payout posts data description: Retrieves up to 1000 "Full AFIT Payout" posts, sorted by date. responses: '200': description: Successfully fetched full AFIT Payout posts. content: application/json: schema: type: array items: $ref: '#/components/schemas/FullAFITPayPostItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getFullAFITPayStats: get: summary: Get full AFIT Pay statistics description: Retrieves aggregated statistics for "Full AFIT Payout" transactions, including AFIT, SBD, STEEM, SP amounts, and transaction count. responses: '200': description: Successfully fetched full AFIT Pay statistics. content: application/json: schema: $ref: '#/components/schemas/FullAFITPayStatsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /moderatorActivity: get: summary: Get moderator activity description: Retrieves activity logs for active moderators within a specified date range. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for activity. Defaults to today. - in: query name: days schema: { type: 'integer', example: 1, default: 1 } required: false description: The number of days prior to `targetDate` to include in the activity. responses: '200': description: Successfully fetched moderator activity. content: application/json: schema: type: array items: $ref: '#/components/schemas/ModeratorActivityItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /moderatorWeeklyStats: get: summary: Get moderator weekly statistics description: Retrieves weekly activity statistics for active moderators, focusing on comments and votes. parameters: - in: query name: priorWeek schema: { type: 'boolean', example: false } required: false description: If true, fetches stats for the previous full week (7 days). responses: '200': description: Successfully fetched moderator weekly stats. content: application/json: schema: type: array items: $ref: '#/components/schemas/ModeratorWeeklyStatsItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /exchangeAFITPrice: get: summary: Get current AFIT token exchange price description: Retrieves the current exchange rates for AFIT (e.g., to HIVE/USD). responses: '200': description: Successfully fetched AFIT exchange prices. content: application/json: schema: $ref: '#/components/schemas/ExchangeAFITPriceResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /curAFITPrice: get: summary: Get current AFIT USD price description: Retrieves the current USD price of AFIT. responses: '200': description: Successfully fetched current AFIT price. content: application/json: schema: $ref: '#/components/schemas/CurAFITPriceResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /confirmPayment: post: summary: Confirm signup payment description: Confirms a new user signup payment (either via promo code or direct transfer) and initiates account creation and delegation. Credentials are sent in the request body to avoid exposure in server logs and browser history. requestBody: required: true content: application/json: schema: type: object required: [confirm_payment_token, new_account, new_pass, cur_bchain] properties: confirm_payment_token: type: string example: 'your_payment_confirmation_token' description: Security token to confirm payment. promo_code: type: string example: 'FREEACCT123' nullable: true description: Optional promo code used for signup. new_account: type: string example: 'new-user' description: The username for the new account. new_pass: type: string example: 'generated-password' description: The password for the new account. cur_bchain: type: string example: 'HIVE' enum: ['HIVE', 'STEEM'] description: The blockchain for the new account. usd_invest: type: number format: float example: 1.0 description: USD amount invested. steem_invest: type: number format: float example: 5.0 description: STEEM amount invested. afit_reward: type: number format: float example: 100.0 description: AFIT reward for signup. memo: type: string example: 'signup_memo_hash' nullable: true description: The memo from the payment transaction. confirming_tx: type: string example: 'payment_tx_id_123' nullable: true description: The transaction ID confirming payment. referrer: type: string example: 'actifit-referrer' nullable: true description: Optional referrer username. email: type: string format: email example: 'user@example.com' nullable: true description: Optional user email. responses: '200': description: Payment confirmed and account creation initiated. content: application/json: schema: $ref: '#/components/schemas/ConfirmPaymentResponse' '400': { description: 'Invalid confirmation token or payment already processed.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '405': { description: 'Method Not Allowed — endpoint only accepts POST.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /app/confirmPayment: post: summary: Confirm signup payment (mobile app) description: >- App-facing variant of /confirmPayment. Identical behaviour and response, except the caller does NOT supply confirm_payment_token — the server injects it. This exists so the mobile app never has to ship the payment token inside its APK, where it would be extractable. Rate limited to 20 requests per 15 minutes per IP. afit_reward is capped server-side to the amount the recorded payment entitles the user to. requestBody: required: true content: application/json: schema: type: object required: [new_account, new_pass, cur_bchain] properties: promo_code: type: string example: 'FREEACCT123' nullable: true description: Optional promo code used for signup. new_account: type: string example: 'new-user' description: The username for the new account. new_pass: type: string example: 'generated-password' description: The master password for the new account. cur_bchain: type: string example: 'HIVE|' description: Target blockchain marker, as built by the clients (e.g. 'HIVE|'). sent_cur: type: string example: 'HIVE' enum: ['HIVE', 'HBD', 'STEEM', 'SBD'] description: Currency the user actually paid in. usd_invest: type: number format: float example: 2.0 description: USD amount invested (0 when a promo code is used). steem_invest: type: number format: float example: 33.898 description: Crypto amount sent, matching sent_cur. afit_reward: type: number format: float example: 100.0 description: Requested AFIT reward. Capped server-side; never trusted as sent. memo: type: string example: 'ABCD234XYZ' nullable: true description: The memo used in the payment transaction. referrer: type: string example: 'actifit-referrer' nullable: true description: Optional referrer username. Omit the key entirely when there is no referrer. email: type: string format: email example: 'user@example.com' nullable: true description: Optional user email. responses: '200': description: Payment confirmed and account creation initiated. content: application/json: schema: $ref: '#/components/schemas/ConfirmPaymentResponse' '429': { description: 'Too many requests from this IP.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getRC: get: summary: Get user's Resource Credits (RC) description: Retrieves the current Resource Credits percentage and details for a specified user on a given blockchain. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch RC for. - in: query name: chain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain to query. responses: '200': description: Successfully fetched user RC. Returns an empty object if no user. content: application/json: schema: $ref: '#/components/schemas/GetRCResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /sendNotification: get: summary: Send a notification description: Sends various types of notifications to users. Requires a specific security token. parameters: - in: query name: verifyNotifParam # This is dynamic in code, assuming 'token' for example schema: { type: 'string', example: 'your_notification_token' } required: true description: Security token to verify notification sending. - in: query name: notifType schema: { type: 'string', example: 'new_post', enum: ['new_post', 'new_comment', 'mention', 'transfer', 'vote', 'reblog', 'payment', 'hetokens'] } required: true description: The type of notification to send. - in: query name: user schema: { type: 'string', example: 'target-user' } required: true description: The recipient's username. - in: query name: actionTaker schema: { type: 'string', example: 'action-user' } required: false description: The username who triggered the action. - in: query name: title schema: { type: 'string', example: 'Your new report!', nullable: true } required: false description: Title or short description for the notification. - in: query name: permlink schema: { type: 'string', example: 'my-new-post', nullable: true } required: false description: Permlink related to the notification. - in: query name: subType schema: { type: 'string', example: 'author_reward', nullable: true } required: false description: Sub-type for 'payment' or 'hetokens' notifications. - in: query name: weight schema: { type: 'integer', example: 100, nullable: true } required: false description: Voting weight for 'vote' notifications. - in: query name: reward schema: { type: 'string', example: '1000.000 VESTS', nullable: true } required: false description: Reward amount for 'payment' sub-types. - in: query name: hbd_payout schema: { type: 'string', example: '1.234 HBD', nullable: true } required: false description: HBD payout for 'payment' sub-types. - in: query name: hive_payout schema: { type: 'string', example: '0.500 HIVE', nullable: true } required: false description: HIVE payout for 'payment' sub-types. - in: query name: vesting_payout schema: { type: 'string', example: '2000.000 VESTS', nullable: true } required: false description: Vesting payout for 'payment' sub-types. - in: query name: amount schema: { type: 'string', example: '500.000 VESTS', nullable: true } required: false description: Amount for 'return_vesting_delegation' or 'fill_vesting_withdraw'. - in: query name: amount_filled schema: { type: 'string', example: '10.000 AFIT', nullable: true } required: false description: Amount filled for 'fill_order'. - in: query name: amount_received schema: { type: 'string', example: '2.000 HIVE', nullable: true } required: false description: Amount received for 'fill_order'. - in: query name: quantity schema: { type: 'string', example: '5.0', nullable: true } required: false description: Quantity for 'hetokens' notifications. - in: query name: symbol schema: { type: 'string', example: 'AFIT', nullable: true } required: false description: Token symbol for 'hetokens' notifications. - in: query name: memo schema: { type: 'string', example: 'Your AFIT transfer', nullable: true } required: false description: Memo for 'hetokens' notifications. - in: query name: author schema: { type: 'string', example: 'post-author', nullable: true } required: false description: Author for 'payment' sub-types. responses: '200': description: Notification sent successfully. content: application/json: schema: $ref: '#/components/schemas/SendNotificationResponse' '400': { description: 'Missing security token or unsupported notification type.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /findUniqueUsers: get: summary: Find unique users over a period description: Queries the number of unique authors who have submitted verified posts within a specified number of days. parameters: - in: query name: days schema: { type: 'integer', example: 30, maximum: 30, default: 30 } required: false description: Number of days in the past to consider (max 30). responses: '200': description: Successfully fetched unique user count. content: application/json: schema: $ref: '#/components/schemas/FindUniqueUsersResponse' '400': { description: 'Invalid days parameter.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /appendVerifiedPost: get: summary: Append a verified post description: Stores a post as "verified" in the database, ensuring it came through the Actifit API. parameters: - in: query name: verifyParam # This is dynamic in code, assuming 'token' for example schema: { type: 'string', example: 'your_verify_post_token' } required: true description: Security token to verify post authenticity. - in: query name: author schema: { type: 'string', example: 'actifit-user' } required: true description: The author of the post. - in: query name: permlink schema: { type: 'string', example: 'my-fitness-report' } required: true description: The permlink of the post. - in: query name: json_metadata schema: { type: 'string', example: '{"tags":["actifit"],"activity_type":"walking"}' } required: true description: JSON string of the post's metadata. responses: '200': description: Post verified and stored. content: text/plain: schema: $ref: '#/components/schemas/AppendVerifiedPostResponse' '400': { description: 'Missing security token.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /fetchVerifiedPost: get: summary: Fetch a verified post description: Retrieves a specific post from the verified posts collection. parameters: - in: query name: author schema: { type: 'string', example: 'actifit-user' } required: true description: The author of the post. - in: query name: permlink schema: { type: 'string', example: 'my-fitness-report' } required: true description: The permlink of the post. responses: '200': description: Successfully fetched verified post. Returns an empty object if not found. content: application/json: schema: $ref: '#/components/schemas/VerifiedPostItem' '400': { description: 'Missing author or permlink.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } /userHasFundsPassSet/{user}: get: summary: Check if user has funds password set (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /setUserFundsPass: post: summary: Set a user's funds password (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /confirmPaymentPasswordVerify: get: summary: Confirm funds password verification payment (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /userHasPendingTokenSwap/{user}: get: summary: Check for pending AFIT token swap description: Checks if a user has an unprocessed AFIT to STEEM upvote exchange request. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. responses: '200': description: Pending token swap status. content: application/json: schema: type: object properties: user_pending_swap: oneOf: - $ref: '#/components/schemas/UserPendingTokenSwap' - type: object # For null case example: { "user_pending_swap": { "_id": "651a9e8f1d2e3f4a5b6c7d8e", "user": "actifit-user", "paid_afit": 50, "upvote_processed": false, "date": "2023-10-01T12:00:00.000Z" } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getUserTokenSwapHistory/{user}: get: summary: Get user's AFIT token swap history description: Retrieves a user's historical AFIT to STEEM upvote exchange transactions. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch history for. responses: '200': description: Successfully fetched token swap history. content: application/json: schema: $ref: '#/components/schemas/GetUserTokenSwapHistoryResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getPendingTokenSwapTransCount/: get: summary: Get count of pending AFIT to STEEM upvote exchanges description: Retrieves the total number of pending AFIT to STEEM upvote exchange requests. responses: '200': description: Successfully fetched pending token swap count. content: application/json: schema: $ref: '#/components/schemas/PendingTokenSwapCount' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getPendingTokenSwapTrans/: get: summary: Get pending AFIT to STEEM upvote exchanges description: Retrieves a list of all pending AFIT to STEEM upvote exchange requests, excluding banned users. responses: '200': description: Successfully fetched pending token swap transactions. content: application/json: schema: $ref: '#/components/schemas/GetPendingTokenSwapTransResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getProcessedTokenSwapTrans/: get: summary: Get processed AFIT to STEEM upvote exchanges description: Retrieves a list of all processed AFIT to STEEM upvote exchange transactions. parameters: - in: query name: limit schema: { type: 'integer', example: 300, default: 300 } required: false description: The maximum number of processed transactions to return. responses: '200': description: Successfully fetched processed token swap transactions. content: application/json: schema: $ref: '#/components/schemas/GetProcessedTokenSwapTransResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /getUnverifiedFundsAccountList/: get: summary: Get list of unverified funds accounts (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /getFullFundsAccountList/: get: summary: Get full funds account list (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /performAfitSteemExchange: post: summary: Exchange AFIT for a vote reward boost description: Spends AFIT for an extra upvote on the user's next report. Authorised by the login session (x-acti-token or Authorization Bearer); the funds password is no longer used. One pending exchange per reward cycle; the amount must be a tier. security: [{ actiToken: [] }] requestBody: required: true content: application/json: schema: type: object required: [tokens] properties: user: { type: string, example: 'actifit-user', description: 'Optional; must match the session user.' } tokens: { type: number, enum: [50, 100, 150, 200], example: 50 } responses: '200': description: "{status: 'Success'} or {error} (not enough AFIT, pending exchange, invalid amount, already being processed, user mismatch, invalid or expired session)" content: application/json: schema: $ref: '#/components/schemas/PerformAfitSteemExchangeSuccess' '401': { description: 'LOGIN_AGAIN - the posting key changed since this session was issued.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '403': { description: 'KEY_ROTATION_REQUIRED - the account must rotate its keys first.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '429': { description: 'Rate limited (5 per 15 minutes per IP).' } '503': { description: 'TRY_AGAIN - the chain could not be read to check the account.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /cancelOutdatedAfitSteemExchange: get: summary: Cancel outdated AFIT to STEEM upvote exchanges description: (ADMIN ONLY) Cancels pending AFIT to STEEM upvote exchange requests that are overdue and refunds the AFIT tokens. responses: '200': description: Outdated exchange transactions cancelled and refunded. content: application/json: schema: $ref: '#/components/schemas/CancelOutdatedAfitSteemExchangeSuccess' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /fetchTokenHoldersByCategory: get: summary: Fetch AFIT token holders by category description: Categorizes AFIT token holders based on their balance ranges and returns counts per category, optionally formatted. parameters: - in: query name: pretty schema: { type: 'integer', example: 1, enum: [0, 1] } required: false description: Set to 1 for a pretty markdown table output. responses: '200': description: Successfully fetched token holders by category. content: application/json: schema: type: array items: $ref: '#/components/schemas/TokenHoldersByCategoryItem' text/plain: # For pretty=1 schema: $ref: '#/components/schemas/TokenHoldersByCategoryPrettyResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /rewardActifitWebVote/{user}: get: summary: Reward user for web vote description: Rewards a user with AFIT tokens for performing a voting action via the web interface. Requires security token. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to reward. - in: query name: web_vote_token schema: { type: 'string', example: 'your_web_vote_secret' } required: true description: Security token for web vote rewards. - in: query name: url schema: { type: 'string', example: 'https://actifit.io/@user/post-permlink' } required: true description: The URL of the post/comment voted on. responses: '200': description: Web vote rewarded successfully. content: application/json: schema: $ref: '#/components/schemas/RewardActifitWebActionResponse' '400': { description: 'Invalid security token, missing data, or already rewarded today.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } # Code returns {} for error '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /rewardActifitWebEdit/{user}: get: summary: Reward user for web edit description: Rewards a user with AFIT tokens for performing an edit action via the web interface. Requires security token. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to reward. - in: query name: web_edit_token schema: { type: 'string', example: 'your_web_edit_secret' } required: true description: Security token for web edit rewards. - in: query name: url schema: { type: 'string', example: 'https://actifit.io/@user/post-permlink' } required: true description: The URL of the post/comment edited. responses: '200': description: Web edit rewarded successfully. content: application/json: schema: $ref: '#/components/schemas/RewardActifitWebActionResponse' '400': { description: 'Invalid security token, missing data, or already rewarded today.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /rewardActifitWebComment/{user}: get: summary: Reward user for web comment description: Rewards a user with AFIT tokens for performing a commenting action via the web interface. Requires security token. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to reward. - in: query name: web_comment_token schema: { type: 'string', example: 'your_web_comment_secret' } required: true description: Security token for web comment rewards. - in: query name: url schema: { type: 'string', example: 'https://actifit.io/@user/post-permlink' } required: true description: The URL of the post/comment commented on. responses: '200': description: Web comment rewarded successfully. content: application/json: schema: $ref: '#/components/schemas/RewardActifitWebActionResponse' '400': { description: 'Invalid security token, missing data, or already rewarded today.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /recentVerifiedPosts: get: summary: Get recent unique verified authors description: Retrieves a list of unique authors who submitted verified posts within a date range, excluding banned users. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for posts. Defaults to today. - in: query name: maxCount schema: { type: 'integer', example: 100, default: 100 } required: false description: The maximum number of unique authors to return. - in: query name: exclude schema: { type: 'string', example: 'some-user' } required: false description: Optional username to exclude from the results. responses: '200': description: Successfully fetched recent unique verified authors. content: application/json: schema: $ref: '#/components/schemas/RecentVerifiedPostsResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /recentAuthorsData: get: summary: Get data for recent authors description: Retrieves data, including rank, for a limited number of recent authors who submitted verified posts. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for posts. Defaults to today. - in: query name: maxCount schema: { type: 'integer', example: 10, default: 10 } required: false description: The maximum number of authors to return data for. responses: '200': description: Successfully fetched recent authors data. content: application/json: schema: type: array items: $ref: '#/components/schemas/RecentAuthorsDataItem' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /totalPostsSubmitted: get: summary: Get total posts submitted for a date description: Retrieves the total count of verified posts submitted within a specific date range. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for posts. Defaults to today. responses: '200': description: Successfully fetched total posts submitted. content: application/json: schema: $ref: '#/components/schemas/TotalPostsSubmittedResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /trackedMeasurements/{user}: get: summary: Get user's tracked body measurements description: Retrieves a user's verified posts that contain body measurement data (e.g., weight, height, chest). parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch measurements for. responses: '200': description: Successfully fetched tracked measurements. content: application/json: schema: type: array items: $ref: '#/components/schemas/TrackedMeasurementPost' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /trackedActivity/{user}: get: summary: Get user's tracked activity records description: Retrieves all verified posts for a user, representing their activity records. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to fetch activity records for. responses: '200': description: Successfully fetched tracked activity records. content: application/json: schema: type: array items: $ref: '#/components/schemas/TrackedActivityPost' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /confirmAFITSEBulk: get: summary: Confirm AFIT Hive-Engine bulk transfers description: (ADMIN ONLY) Checks for and processes bulk AFIT transfers from Hive-Engine to Actifit wallets, updating user balances. parameters: - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'], default: 'HIVE' } required: false description: The blockchain to check for transfers. responses: '200': description: Successfully processed AFIT Hive-Engine bulk transfers. content: application/json: schema: $ref: '#/components/schemas/AFITSEBulkConfirmationResponse' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /availableTipBalance: get: summary: Get user's available tip balance description: Retrieves the current available tip balance for a specific user. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. responses: '200': description: Successfully fetched available tip balance. Returns empty object if not found. content: application/json: schema: $ref: '#/components/schemas/TipBalance' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /confirmAFITSEReceipt: get: summary: Confirm AFIT Hive-Engine receipt description: Confirms the receipt of AFIT tokens into the Actifit wallet on Hive-Engine and updates the user's AFIT balance. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user whose receipt is being confirmed. - in: query name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'], default: 'HIVE' } required: false description: The blockchain to check. responses: '200': description: AFIT receipt confirmed and balance updated. content: application/json: schema: $ref: '#/components/schemas/ConfirmAFITSEReceiptResponse' '400': { description: 'Missing user query parameter.', content: { 'application/json': { schema: { type: 'object', example: {} } } } } # Code returns {} on no user '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /processBuyOrder: get: summary: Process product buy order with AFIT description: Processes a product purchase where payment is made in AFIT. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The buyer's username. - in: query name: product_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The ID of the product being purchased. responses: '200': description: Product purchase processed successfully. content: application/json: schema: $ref: '#/components/schemas/ProcessBuyOrderResponse' '400': { description: 'Missing data, product not found, insufficient AFIT funds, or DB storing issue.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /gadgetBoughtName: get: summary: Check if a gadget has been bought by name description: Checks if a user has bought a specific gadget by its name and level. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. - in: query name: gadget_name schema: { type: 'string', example: 'XP Boost' } required: true description: The name of the gadget. - in: query name: gadget_level schema: { type: 'integer', example: 1 } required: true description: The level of the gadget. responses: '200': description: Successfully fetched matching gadgets. content: application/json: schema: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' # Reusing schema structure '400': { description: 'Missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /gadgetsBought: get: summary: Get all bought gadgets description: Retrieves a list of all gadgets bought by all users. responses: '200': description: Successfully fetched all bought gadgets. content: application/json: schema: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /gadgetsBoughtByDate: get: summary: Get count of gadgets bought by date description: Retrieves the total count of gadgets bought and unique users who bought them for a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for purchases. Defaults to today. responses: '200': description: Successfully fetched gadget purchase count by date. content: application/json: schema: type: object properties: totalGadgets: { type: 'integer', example: 50 } uniqueUsers: { type: 'integer', example: 20 } required: [totalGadgets, uniqueUsers] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /gadgetsBoughtByDateDetails: get: summary: Get details of gadgets bought by date description: Retrieves detailed information about gadgets bought and unique users who bought them for a specific date. parameters: - in: query name: targetDate schema: { type: 'string', format: 'date', example: '2023-10-01' } required: false description: The target date (YYYY-MM-DD) for purchases. Defaults to today. responses: '200': description: Successfully fetched gadget purchase details by date. content: application/json: schema: type: object properties: totalGadgets: { type: 'integer', example: 50 } uniqueUsers: { type: 'integer', example: 20 } gadgets: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' required: [totalGadgets, uniqueUsers, gadgets] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /friendships: get: summary: Get all friendships description: Retrieves a list of all established friendships. responses: '200': description: Successfully fetched friendships. content: application/json: schema: type: array items: type: object properties: userA: { type: 'string', example: 'user1' } userB: { type: 'string', example: 'user2' } date: { type: 'string', format: 'date-time' } required: [userA, userB, date] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /pendingFriendships: get: summary: Get all pending friendship requests description: Retrieves a list of all pending friendship requests. responses: '200': description: Successfully fetched pending friendships. content: application/json: schema: type: array items: type: object # Assuming structure similar to sent/received in UserFriendRequestsResponse properties: initiator: { type: 'string', example: 'userA' } request: { type: 'string', example: 'friendship' } target: { type: 'string', example: 'userB' } date: { type: 'string', format: 'date-time' } status: { type: 'string', example: 'pending' } required: [initiator, target, status, date] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /userRequests: get: summary: Get all user requests description: Retrieves a list of all user requests (including friendships, etc.). responses: '200': description: Successfully fetched all user requests. content: application/json: schema: type: array items: type: object # Generic, refine as needed '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeGadgets: get: summary: Get all active gadgets description: Retrieves a list of all currently active in-game gadgets, with product details. responses: '200': description: Successfully fetched active gadgets. content: application/json: schema: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /nonConsumedGadgetsByUser/{user}: get: summary: Get user's non-consumed gadgets description: Retrieves a list of gadgets belonging to a user that are not yet consumed. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. responses: '200': description: Successfully fetched non-consumed gadgets. content: application/json: schema: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /consumedGadgetsByUser/{user}: get: summary: Get user's consumed gadgets description: Retrieves a list of gadgets belonging to a user that have been consumed. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. responses: '200': description: Successfully fetched consumed gadgets. content: application/json: schema: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeGadgetsByUserApp/{user}: get: summary: Get user's active gadgets (app view) description: Retrieves a user's own active gadgets, primarily for app display (does not include beneficiary gadgets). parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. responses: '200': description: Successfully fetched user's active gadgets. content: application/json: schema: type: object properties: own: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' required: [own] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activeGadgetsByUser/{user}: get: summary: Get user's active gadgets (full view) description: Retrieves a user's own active gadgets and gadgets where they are a beneficiary. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. responses: '200': description: Successfully fetched user's active gadgets. content: application/json: schema: type: object properties: own: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' benefic: type: array items: $ref: '#/components/schemas/ActiveGadgetEntry' required: [own, benefic] '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /boughtGadgetCountByUser/{user}: get: summary: Get count of gadgets bought by user description: Aggregates the count of gadgets bought by a user, grouped by gadget ID and status. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to query. responses: '200': description: Successfully fetched gadget counts by user. content: application/json: schema: type: array items: $ref: '#/components/schemas/GadgetCountByStatus' '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /gadgetBought: get: summary: Check if a specific gadget has been bought by user description: Checks if a user has bought a specific gadget by its ID. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. - in: query name: gadget_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the gadget. responses: '200': description: Successfully fetched gadget purchase status. content: application/json: schema: $ref: '#/components/schemas/ProductBoughtMatch' # Reusing schema from a similar productBought endpoint '400': { description: 'Missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activateMultiGadgetKeychain/{user}/{gadgets}/{trxID}/{bchain}/{benefic?}: get: summary: Activate multiple gadgets via Keychain description: Activates multiple in-game gadgets for a user, with optional beneficiary, verified by a Keychain transaction. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user activating the gadgets. - in: path name: gadgets schema: { type: 'string', example: 'id1-id2-id3' } required: true description: Hyphen-separated MongoDB _ids of the gadgets to activate. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID from Keychain. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. - in: path name: benefic schema: { type: 'string', example: '@friend-user', nullable: true } required: false description: Optional username of the beneficiary. responses: '200': description: Gadgets activated successfully. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' # Assuming {status: 'success'} '400': { description: 'User and beneficiary cannot be the same, or transaction verification failed/product not found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activateMultiGadget/{user}/{gadgets}/{blockNo}/{trxID}/{bchain}/{benefic?}: get: summary: Activate multiple gadgets description: Activates multiple in-game gadgets for a user, with optional beneficiary. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user activating the gadgets. - in: path name: gadgets schema: { type: 'string', example: 'id1-id2-id3' } required: true description: Hyphen-separated MongoDB _ids of the gadgets to activate. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. - in: path name: benefic schema: { type: 'string', example: '@friend-user', nullable: true } required: false description: Optional username of the beneficiary. responses: '200': description: Gadgets activated successfully. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '400': { description: 'User and beneficiary cannot be the same, or transaction verification failed/product not found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /activateGadgetKeychain/{user}/{gadget}/{trxID}/{bchain}/{benefic?}: get: summary: Activate a gadget (Keychain / on-device signing) description: Activates one bought gadget after its activate-gadget transaction, signed by the user, is confirmed on chain. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user activating the gadget. - in: path name: gadget schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The gadget's product id (user_gadgets.gadget), as in the signed transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE' } required: true description: The blockchain of the transaction. - in: path name: benefic schema: { type: 'string', example: 'friend-user' } required: false description: Optional reward beneficiary; must match the signed transaction. - in: query name: operation schema: { type: 'string' } required: true description: JSON of the signed transaction's operations, compared with the transaction found on chain. responses: '200': description: Outcome of the request. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' /activateGadget/{user}/{gadget}/{blockNo}/{trxID}/{bchain}/{benefic?}: get: summary: Activate a gadget (Deprecated) description: '(DEPRECATED: Use /activateMultiGadget instead) Activates a single in-game gadget for a user, with optional beneficiary.' parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user activating the gadget. - in: path name: gadget schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The gadget's product id (user_gadgets.gadget), as in the signed transaction. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. - in: path name: benefic schema: { type: 'string', example: '@friend-user', nullable: true } required: false description: Optional username of the beneficiary. responses: '200': description: Gadget activated successfully. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '400': { description: 'User and beneficiary cannot be the same, or transaction verification failed/product not found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /deactivateGadgetKeychain/{user}/{gadget}/{trxID}/{bchain}: get: summary: Deactivate a gadget via Keychain description: Deactivates an active in-game gadget for a user, verified by a Keychain transaction. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user deactivating the gadget. - in: path name: gadget schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the gadget to deactivate. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID from Keychain. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Gadget deactivated successfully. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '400': { description: 'Transaction verification failed or product not found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /deactivateGadget/{user}/{gadget}/{blockNo}/{trxID}/{bchain}: get: summary: Deactivate a gadget description: Deactivates an active in-game gadget for a user. parameters: - in: path name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The user deactivating the gadget. - in: path name: gadget schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The MongoDB _id of the gadget to deactivate. - in: path name: blockNo schema: { type: 'integer', example: 123456789 } required: true description: The blockchain block number of the transaction. - in: path name: trxID schema: { type: 'string', example: 'tx_hash_abc123' } required: true description: The transaction ID. - in: path name: bchain schema: { type: 'string', example: 'HIVE', enum: ['HIVE', 'STEEM'] } required: true description: The blockchain of the transaction. responses: '200': description: Gadget deactivated successfully. content: application/json: schema: $ref: '#/components/schemas/GenericResponse' '400': { description: 'Transaction verification failed or product not found.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /productBought: get: summary: Check if a product has been bought description: Checks if a user has bought a specific product by its ID. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. - in: query name: product_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The product ID. responses: '200': description: Successfully fetched product purchase status. content: application/json: schema: type: object properties: user: { type: 'string', example: 'actifit-user' } product_id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: [user, product_id] '400': { description: 'Missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /productBoughtToken: get: summary: Check if a product has been bought with an access token description: Checks if a user has bought a specific product with a given access token. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username to check. - in: query name: access_token schema: { type: 'string', example: 'download_token_abc' } required: true description: The access token. - in: query name: product_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The product ID. responses: '200': description: Successfully fetched product purchase with token. content: application/json: schema: type: object properties: user: { type: 'string', example: 'actifit-user' } product_id: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } access_token: { type: 'string', example: 'download_token_abc' } enabled: { type: 'boolean', example: true } date: { type: 'string', format: 'date-time' } required: [user, product_id, access_token] '400': { description: 'Missing data.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /validatePassForDownload: get: summary: Validate funds password for ebook download (retired) deprecated: true description: Funds passwords have been retired. This route only answers 410 FUNDS_PASS_RETIRED. Use GET /reissueDownloadToken with the login session instead. responses: '410': description: FUNDS_PASS_RETIRED - funds passwords are retired; the login session is used instead. content: application/json: schema: $ref: '#/components/schemas/FundsPassRetired' /reissueDownloadToken: get: summary: Re-enable the download token for a bought ebook description: >- Issues the logged-in user a new download access token for a product they bought (any earlier token stops working) and returns it, in the same response shape as the retired /validatePassForDownload. The account is taken from the login session (x-acti-token or Authorization Bearer) only. security: - bearerAuth: [] parameters: - in: query name: product_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The product ID of the ebook. responses: '200': description: "{success: 'success', access_token} or {error} ('generic error' for a missing product_id, 'Access token record not found' when the session user did not buy it, or an invalid/expired session)" content: application/json: schema: $ref: '#/components/schemas/ValidatePassForDownloadSuccess' '401': { description: 'LOGIN_AGAIN - the posting key changed since this session was issued.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '403': { description: 'KEY_ROTATION_REQUIRED - the account must rotate its keys first.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '429': { description: 'Rate limited (20 per 15 minutes per IP).' } '500': { description: "{error: 'Database update failed'}", content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } /downEbook: get: summary: Download an ebook description: Facilitates the download of an ebook if the user has a valid access token. Access token is disabled after use. parameters: - in: query name: user schema: { type: 'string', example: 'actifit-user' } required: true description: The username. - in: query name: access_token schema: { type: 'string', example: 'download_token_abc' } required: true description: The access token for the ebook. - in: query name: product_id schema: { type: 'string', example: '651a9e8f1d2e3f4a5b6c7d8e' } required: true description: The product ID of the ebook. responses: '200': description: Ebook file stream. content: application/pdf: schema: type: string format: binary '400': { description: 'Access not permitted, user access not permitted, or file does not exist.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } } '500': { description: 'Internal server error.', content: { 'application/json': { schema: { $ref: '#/components/schemas/ErrorResponse' } } } }