@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api KumpeApps API
@base https://restapi.kumpeapps.com/v5
@version 5.0.0
@auth ApiKey X-Auth in header | ApiKey X-Auth in header
@endpoints 33
@hint download_for_search
@toc appkey(3), authkey(4), authentication(8), kkid(18)

@group appkey
@endpoint PUT /appkey
@required {app_key: str}
@returns(202) {success: bool}

@endpoint POST /appkey
@required {username: str, password: str(password), supportsYubikey: bool}
@returns(201) {success: bool, app_key: str}

@endpoint PATCH /appkey
@required {app_key: str}
@optional {comments: str}
@returns(202) {success: bool}

@endgroup

@group authkey
@endpoint GET /authkey
@required {username: str, password: str(password)}
@optional {otp: str(password)}
@returns(200) {success: bool, auth_key: str}
@errors {401, 403, 449}

@endpoint PUT /authkey
@required {auth_key: str(password)}
@returns(202) {success: bool}
@errors {401}

@endpoint POST /authkey
@required {username: str, password: str(password)}
@optional {otp: str(password)}
@returns(200) {success: bool, auth_key: str}
@errors {401, 403, 449}

@endpoint PATCH /authkey
@required {auth_key: str(password)}
@optional {comments: str}
@returns(202) {success: bool}
@errors {401}

@endgroup

@group authentication
@endpoint PUT /authentication/appkey
@required {app_key: str}
@returns(202) {success: bool}

@endpoint POST /authentication/appkey
@required {username: str, password: str(password), supportsYubikey: bool}
@returns(201) {success: bool, app_key: str}

@endpoint PATCH /authentication/appkey
@required {app_key: str}
@optional {comments: str}
@returns(202) {success: bool}

@endpoint GET /authentication/verifyotp
@required {otp: str}
@returns(200)
@errors {401, 403}

@endpoint GET /authentication/authkey
@required {username: str, password: str(password)}
@optional {otp: str(password), deviceName: str, identifierForVendor: str}
@returns(200) {success: bool, auth_key: str}
@errors {401, 403, 449}

@endpoint PUT /authentication/authkey
@required {auth_key: str(password)}
@returns(202) {success: bool}
@errors {401}

@endpoint POST /authentication/authkey
@required {username: str, password: str(password)}
@optional {otp: str(password)}
@returns(200) {success: bool, auth_key: str}
@errors {401, 403, 449}

@endpoint PATCH /authentication/authkey
@required {auth_key: str(password)}
@optional {comments: str}
@returns(202) {success: bool}
@errors {401}

@endgroup

@group kkid
@endpoint POST /kkid/masteruser
@required {username: str, password: str(password), email: str, firstName: str, lastName: str}
@returns(200) {user_id: int, login: str, pass: str, remember_key: str, pass_dattm: str, email: str, name_f: str, name_l: str, street: str, street2: str, city: str, state: str, zip: str, country: str, phone: str, added: str, remote_addr: str, user_agent: str, saved_form_id: str, status: str, unsubscribed: str, lang: str, i_agree: str, is_locked: str, disable_lock_until: str, reseller_id: str, comment: str, tax_id: str, last_login: str, aff_id: str, aff_added: str, is_affiliate: str, aff_payout_type: str, plain_password: str, pin: str, require_consent: str, subusers_parent_id: str, avatar: str}
@returns(202)
@errors {405, 409}

@endpoint GET /kkid/user
@optional {enableBool: bool}
@returns(200) {success: bool, user: [map]}

@endpoint GET /kkid/userlist
@optional {isChild: bool, isActive: bool, isAdmin: bool, enableAllowance: bool, enableChores: bool, userID: int, username: str, email: str}
@returns(200) {success: bool, user: [map]}
@returns(202)
@returns(204) {status: int, error: str}
@errors {400, 401, 403, 405, 412}

@endpoint PUT /kkid/userlist
@required {userID: int, username: str, email: str, firstName: str, lastName: str}
@optional {emoji: str, tmdbKey: str, enableWishList: bool, enableChores: bool, enableAllowance: bool, enableAdmin: bool, enableTmdb: bool, enableObjectDetection: bool}
@returns(200) {user_id: int, login: str, pass: str, remember_key: str, pass_dattm: str, email: str, name_f: str, name_l: str, street: str, street2: str, city: str, state: str, zip: str, country: str, phone: str, added: str, remote_addr: str, user_agent: str, saved_form_id: str, status: str, unsubscribed: str, lang: str, i_agree: str, is_locked: str, disable_lock_until: str, reseller_id: str, comment: str, tax_id: str, last_login: str, aff_id: str, aff_added: str, is_affiliate: str, aff_payout_type: str, plain_password: str, pin: str, require_consent: str, subusers_parent_id: str, avatar: str}
@returns(202)
@errors {405, 409, 412}

@endpoint POST /kkid/userlist
@required {username: str, password: str(password), email: str, firstName: str, lastName: str}
@returns(200) {user_id: int, login: str, pass: str, remember_key: str, pass_dattm: str, email: str, name_f: str, name_l: str, street: str, street2: str, city: str, state: str, zip: str, country: str, phone: str, added: str, remote_addr: str, user_agent: str, saved_form_id: str, status: str, unsubscribed: str, lang: str, i_agree: str, is_locked: str, disable_lock_until: str, reseller_id: str, comment: str, tax_id: str, last_login: str, aff_id: str, aff_added: str, is_affiliate: str, aff_payout_type: str, plain_password: str, pin: str, require_consent: str, subusers_parent_id: str, avatar: str}
@returns(202)
@errors {405, 409, 412}

@endpoint DELETE /kkid/userlist
@required {userID: int}
@returns(200)
@returns(202)
@errors {405, 409, 412}

@endpoint GET /kkid/chorelist
@optional {kidUsername: str, day: str(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Weekly), status: str, blockDash: bool, optional: bool, canSteal: bool, includeCalendar: bool}
@returns(200) {success: int, chore: [map]}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 412}

@endpoint PUT /kkid/chorelist
@required {idChoreList: int}
@optional {status: str, stolen: bool, stolenBy: str, nfcTag: str, notes: str, latitude: int, longitude: int, altitude: int, updatedByAutomation: bool, whereDay: str(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Weekly/Today), whereStatus: str, whereName: str}
@returns(200) {success: bool, message: str}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 412}

@endpoint POST /kkid/chorelist
@required {kidUsername: str, choreName: str}
@optional {day: str(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Weekly/Today), nfcTag: str, status: str, choreDescription: str, choreNumber: int, blockDash: bool, oneTime: bool, extraAllowance: int, optional: bool, reassignable: bool, canSteal: bool, startDate: str, notes: str, requireObjectDetection: bool, objectDetectionTag: str, updatedByAutomation: bool, aiIcon: str, isCalendar: bool}
@returns(200) {success: bool, message: str}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 409, 412}

@endpoint DELETE /kkid/chorelist
@required {idChoreList: int}
@returns(200) {success: bool, message: str}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 409, 412}

@endpoint GET /kkid/allowance
@required {kidUserId: int}
@optional {transactionDays: int}
@returns(200) {success: int, id: int, balance: int, lastUpdated: str, allowanceTransaction: [map]}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 412}

@endpoint POST /kkid/allowance
@required {kidUserId: int, amount: num, description: str, transactionType: str(Add/Subtract)}
@returns(200) {success: bool, message: str}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 412}

@endpoint POST /kkid/apns
@required {kidUserId: int, tool: str(register/subscribe/unsubscribe/send)}
@optional {token: str, devicename: str, title: str, message: str, badge: int, sound: str, section: str(Chores/Chores-New/Chores-Reminders/Allowance/Allowance-New/WishList), priority: str(passive/active/time-sensitive/critical)}
@returns(200) {success: bool, message: str}
@returns(202)
@returns(206) {status: int, error: str}
@errors {400, 401, 403, 405, 412}

@endpoint GET /kkid/wishlist
@optional {kidUserId: int}
@returns(200) {success: bool, wish: [map]}

@endpoint PUT /kkid/wishlist
@required {wishId: int}
@optional {title: str, description: str, priority: int, link: str}
@returns(201) {success: bool, message: str}

@endpoint POST /kkid/wishlist
@required {kidUserId: int, title: str}
@optional {description: str, priority: int, link: str}
@returns(201) {success: bool, message: str}

@endpoint DELETE /kkid/wishlist
@required {wishId: int}
@returns(200) {success: bool, message: str}

@endpoint GET /kkid/share
@required {linkUserId: str, link: str(https://khome.kumpeapps.com/portal/wish-list.php/https://khome.kumpeapps.com/portal/chores-today.php), scope: str(WishList/WishListAdmin/Chores/ChoresAdmin)}
@optional {scope2: str(WishList/WishListAdmin/Chores/ChoresAdmin), scope3: str(WishList/WishListAdmin/Chores/ChoresAdmin), scope4: str(WishList/WishListAdmin/Chores/ChoresAdmin)}
@returns(201) {success: bool, auth_link: str}

@endgroup

@end
