package
0.0.0-20230922172947-9b0c1e2ac847
Repository: https://github.com/openaccounting/oa-server.git
Documentation: pkg.go.dev
# Functions
*
* @api {delete} /orgs/:orgId/accounts/:accountId Delete an Account
* @apiVersion 1.4.0
* @apiName DeleteAccount
* @apiGroup Account
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {delete} /apikeys/:apiKeyId Delete an API key
* @apiVersion 1.4.0
* @apiName DeleteApiKey
* @apiGroup ApiKey
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {delete} /orgs/:orgId/budget Delete Budget
* @apiVersion 1.4.0
* @apiName DeleteBudget
* @apiGroup Budget
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {delete} /orgs/:orgId/invites/:inviteId Delete Invite
* @apiVersion 1.4.0
* @apiName DeleteInvite
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {delete} /orgs/:orgId/prices/:priceId Delete a Price
* @apiVersion 1.4.0
* @apiName DeletePrice
* @apiGroup Price
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {delete} /sessions/:sessionId Log out of a Session
* @apiVersion 1.4.0
* @apiName DeleteSession
* @apiGroup Session
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {delete} /orgs/:orgId/transactions/:transactionId Delete a Transaction
* @apiVersion 1.4.0
* @apiName DeleteTransaction
* @apiGroup Transaction
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {get} /apikeys Get API keys
* @apiVersion 1.4.0
* @apiName GetApiKeys
* @apiGroup ApiKey
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the ApiKey.
*
* @api {get} /orgs/:orgId/budget Get Budget
* @apiVersion 1.4.0
* @apiName GetBudget
* @apiGroup Budget
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} orgId Id of the Org.
*
* @api {get} /orgs/:orgId/invites Get Org invites
* @apiVersion 1.4.0
* @apiName GetInvites
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Invite
* @apiSuccess {orgId} id Id of the Org
* @apiSuccess {Date} inserted Date Invite was created
* @apiSuccess {Date} updated Date Invite was updated/accepted
* @apiSuccess {String} email Email address of user
* @apiSuccess {String} accepted true if user has accepted
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* [
* {
* "id": "a1b2c3d4",
* "orgId": "11111111111111111111111111111111",
* "inserted": "2018-09-11T18:05:04.420Z",
* "updated": "2018-09-11T18:05:04.420Z",
* "email": "[email protected]",
* "accepted": true
* }
* ]
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {get} /org/:orgId Get Org by id
* @apiVersion 1.4.0
* @apiName GetOrg
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Org.
*
* @api {get} /orgs/:orgId/accounts/:accountId Get Acount by Org id and Account id
* @apiVersion 1.4.0
* @apiName GetOrgAccount
* @apiGroup Account
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Account.
*
* @api {get} /orgs/:orgId/accounts Get Accounts by Org id
* @apiVersion 1.4.0
* @apiName GetOrgAccounts
* @apiGroup Account
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Account.
*
* @api {get} /orgs Get a User's Orgs
* @apiVersion 1.4.0
* @apiName GetOrgs
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Org.
*
* @api {get} /org/:orgId/prices Get prices nearest in time or by currency
* @apiVersion 1.4.0
* @apiName GetPrices
* @apiGroup Price
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {Number} nearestDate Milliseconds since epoch
* @apiParam {String} currency Currency code
*
* @apiSuccess {String} id Id of the Price.
No description provided by the author
*
* @api {get} /health-check Get system health status
* @apiVersion 1.4.0
* @apiName GetSystemHealthStatus
* @apiGroup SystemHealth
*
*
* @apiHeader {String} Accept-Version: 1.4.0 semver versioning
*
* @apiSuccess {String} database Database status: "ok"; "fail"
* @apiSuccess {String} api API status: "ok"
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "database": "ok",
* "api": "ok",
* }
*
* @apiUse InternalServerError
*/.
*
* @api {get} /orgs/:orgId/accounts/:accountId/transactions Get Transactions by Account Id
* @apiVersion 1.4.0
* @apiName GetAccountTransactions
* @apiGroup Transaction
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Transaction.
*
* @api {get} /orgs/:orgId/transactions Get Transactions by Org Id
* @apiVersion 1.4.0
* @apiName GetOrgTransactions
* @apiGroup Transaction
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the Transaction.
*
* @api {get} /user Get Authenticated User
* @apiVersion 1.4.0
* @apiName GetUser
* @apiGroup User
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiSuccess {String} id Id of the User.
No description provided by the author
*
* @api {post} /orgs/:orgId/accounts Create a new Account
* @apiVersion 1.4.0
* @apiName PostAccount
* @apiGroup Account
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id Id 32 character hex string
* @apiParam {String} name Name of the Account.
No description provided by the author
*
* @api {post} /apikeys Create a new API key
* @apiVersion 1.4.0
* @apiName PostApiKey
* @apiGroup ApiKey
*
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
* @apiHeader {String} Authorization HTTP Basic Auth
*
* @apiParam {String} id 32 character hex string
* @apiParam {String} label Label
*
* @apiSuccess {String} id Id of the ApiKey.
*
* @api {post} /orgs/:orgId/budget Create a Budget
* @apiVersion 1.4.0
* @apiName PostBudget
* @apiGroup Budget
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {Object[]} items Array of Budget Items.
*
* @api {post} /orgs/:orgId/invites Invite a user to an Org
* @apiVersion 1.4.0
* @apiName PostInvite
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} email Email address of user
*
* @apiSuccess {String} id Id of the Invite
* @apiSuccess {orgId} id Id of the Org
* @apiSuccess {Date} inserted Date Invite was created
* @apiSuccess {Date} updated Date Invite was updated/accepted
* @apiSuccess {String} email Email address of user
* @apiSuccess {String} accepted true if user has accepted
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "id": "a1b2c3d4",
* "orgId": "11111111111111111111111111111111",
* "inserted": "2018-09-11T18:05:04.420Z",
* "updated": "2018-09-11T18:05:04.420Z",
* "email": "[email protected]",
* "accepted": false
* }
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {post} /orgs Create a new Org
* @apiVersion 1.4.0
* @apiName PostOrg
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id Id 32 character hex string
* @apiParam {String} name Name of the Org.
*
* @api {post} /orgs/:orgId/prices Create a new Price
* @apiVersion 1.4.0
* @apiName PostPrice
* @apiGroup Price
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id Id 32 character hex string.
*
* @api {post} /sessions Create a new Session
* @apiVersion 1.4.0
* @apiName PostSession
* @apiGroup Session
*
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
* @apiHeader {String} Authorization HTTP Basic Auth
*
* @apiParam {String} id 32 character hex string
*
* @apiSuccess {String} id Id of the Session.
*
* @api {post} /orgs/:orgId/transactions Create a new Transaction
* @apiVersion 1.4.0
* @apiName PostTransaction
* @apiGroup Transaction
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id Id 32 character hex string
* @apiParam {Date} date Date of the Transaction
* @apiParam {String} description Description of Transaction
* @apiParam {String} data Extra data field
* @apiParam {Object[]} splits Array of Transaction Splits.
*
* @api {post} /users Create a new User
* @apiVersion 1.4.0
* @apiName PostUser
* @apiGroup User
*
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id 32 character hex string
* @apiParam {String} firstName First name of the User.
*
* @api {put} /orgs/:orgId/accounts/:accountId Modify an Account
* @apiVersion 1.4.0
* @apiName PutAccount
* @apiGroup Account
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id Id 32 character hex string
* @apiParam {String} name Name of the Account.
*
* @api {put} /apikeys Modify an API key
* @apiVersion 1.4.0
* @apiName PutApiKey
* @apiGroup ApiKey
*
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
* @apiHeader {String} Authorization HTTP Basic Auth
*
* @apiParam {String} id 32 character hex string
* @apiParam {String} label Label
*
* @apiSuccess {String} id Id of the ApiKey.
*
* @api {put} /orgs/:orgId/invites/:inviteId Accept an invitation
* @apiVersion 1.4.0
* @apiName PutInvite
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} accepted true
*
* @apiSuccess {String} id Id of the Invite
* @apiSuccess {orgId} id Id of the Org
* @apiSuccess {Date} inserted Date Invite was created
* @apiSuccess {Date} updated Date Invite was updated/accepted
* @apiSuccess {String} email Email address of user
* @apiSuccess {String} accepted true if user has accepted
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "id": "a1b2c3d4",
* "orgId": "11111111111111111111111111111111",
* "inserted": "2018-09-11T18:05:04.420Z",
* "updated": "2018-09-11T18:05:04.420Z",
* "email": "[email protected]",
* "accepted": true
* }
*
* @apiUse NotAuthorizedError
* @apiUse InternalServerError
*/.
*
* @api {put} /orgs/:orgId Modify an Org
* @apiVersion 1.4.0
* @apiName PutOrg
* @apiGroup Org
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} name Name of the Org.
*
* @api {put} /orgs/:orgId/transactions/:transactionId Modify a Transaction
* @apiVersion 1.4.0
* @apiName PutTransaction
* @apiGroup Transaction
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} id 32 character hex string
* @apiParam {Date} date Date of the Transaction
* @apiParam {String} description Description of Transaction
* @apiParam {String} data Extra data field
* @apiParam {Object[]} splits Array of Transaction Splits.
*
* @api {put} /user Modify User
* @apiVersion 1.4.0
* @apiName PutUser
* @apiGroup User
*
* @apiHeader {String} Authorization HTTP Basic Auth
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} password New password
* @apiParam {String} code Password reset code.
*
* @api {post} /user/reset-password Send reset password email
* @apiVersion 1.4.0
* @apiName ResetPassword
* @apiGroup User
*
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} email Email address for user
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse InternalServerError
*/.
*
* @api {post} /user/verify Verify user email address
* @apiVersion 1.4.0
* @apiName VerifyUser
* @apiGroup User
*
* @apiHeader {String} Accept-Version ^1.4.0 semver versioning
*
* @apiParam {String} code Email verification code
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
*
* @apiUse InternalServerError
*/.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author