openapi: 3.0.3 info: description: "" title: "" version: 0.0.0 servers: - url: http://localhost:3333 security: - ApiKeyAuth: [] paths: /accounts: get: description: Get all Accounts for a Business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AllAccountsResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get all Accounts for a Business tags: - Accounts post: description: Create an Account for a Business requestBody: content: application/json; charset=utf8: schema: $ref: '#/components/schemas/PostAccountRequest' required: true responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AccountResponse' description: Response "400": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "409": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Create an Account for a Business tags: - Accounts /accounts/:accountId: delete: description: Delete an Account of a Business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Delete an Account of a Business tags: - Accounts get: description: Get an account for a Business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AccountResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get an account for a Business tags: - Accounts patch: description: Update Account for Business requestBody: content: application/json; charset=utf8: schema: $ref: '#/components/schemas/PatchAccountRequest' required: true responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AccountResponse' description: Response "400": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Update Account for Business tags: - Accounts /accounts/:accountId/transactions: get: description: Get Transactions for an Account responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AllTransactionsResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get Transactions for an Account tags: - Accounts /accounts/:accountId/usage: get: description: Get an Account's current Usage Billing Rate Adjustments responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AccountUsageBillingAdjustmentsResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get an Account's current Usage Billing Rate Adjustments tags: - Usage post: description: Set an Account's Usage Billing Rate requestBody: content: application/json; charset=utf8: schema: $ref: '#/components/schemas/PostAccountUsageBillingRateAdjustmentRequest' required: true responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Response "400": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Set an Account's Usage Billing Rate tags: - Usage /businesses/:businessId: get: description: |2 Use this to get the name and other business details. Here is a link: [to google](https://google.com). Let's see if it works. responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/BusinessResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get Business Details tags: - Businesses patch: description: Update Business Details requestBody: content: application/json; charset=utf8: schema: $ref: '#/components/schemas/PatchBusinessRequest' required: true responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/BusinessResponse' description: Response "400": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Update Business Details tags: - Businesses /businesses/:businessId/settings: get: description: Get Settings for a business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/BusinessSettingsResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get Settings for a business tags: - Businesses /transactions: get: description: Get all Transactions for a Business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/AllTransactionsResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get all Transactions for a Business tags: - Transactions post: description: Creates a Transaction for an Business requestBody: content: application/json; charset=utf8: schema: $ref: '#/components/schemas/PostTransactionRequest' required: true responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/TransactionResponse' description: Response "400": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Creates a Transaction for an Business tags: - Transactions /transactions/:transactionId: delete: description: Delete Transaction for an Business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Delete Transaction for an Business tags: - Transactions get: description: Get a Transaction for a Business responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/TransactionResponse' description: Response "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Get a Transaction for a Business tags: - Transactions patch: description: Update a Transaction for a Business requestBody: content: application/json; charset=utf8: schema: $ref: '#/components/schemas/PatchTransactionRequest' required: true responses: "200": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/TransactionResponse' description: Response "400": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "401": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error "404": content: application/json; charset=utf8: schema: $ref: '#/components/schemas/EmptyResponse' description: Error summary: Update a Transaction for a Business tags: - Transactions components: schemas: PostAccountRequest: additionalProperties: false example: accountId: accountId accountName: accountName properties: accountId: description: This is your own internal account ID. We will index it based upon your business ID. minLength: 1 type: string accountName: type: string required: - accountId type: object AccountResponse: additionalProperties: false example: accountId: accountId createdAt: 0.8008281904610115 usageBillingRate: 5.962133916683182 remainingHoursOnBalance: 5.637376656633329 balance: 1.4658129805029452 accountName: accountName modifiedAt: 6.027456183070403 businessId: businessId properties: businessId: type: string accountId: type: string accountName: type: string createdAt: type: number modifiedAt: type: number balance: type: number usageBillingRate: type: number remainingHoursOnBalance: type: number required: - accountId - balance - businessId - createdAt - modifiedAt - usageBillingRate type: object EmptyResponse: additionalProperties: false type: object AllAccountsResponse: additionalProperties: false example: total: 9.301444243932576 accounts: Items: - accountId: accountId createdAt: 0.8008281904610115 usageBillingRate: 5.962133916683182 remainingHoursOnBalance: 5.637376656633329 balance: 1.4658129805029452 accountName: accountName modifiedAt: 6.027456183070403 businessId: businessId - accountId: accountId createdAt: 0.8008281904610115 usageBillingRate: 5.962133916683182 remainingHoursOnBalance: 5.637376656633329 balance: 1.4658129805029452 accountName: accountName modifiedAt: 6.027456183070403 businessId: businessId Count: 2.3021358869347655 ScannedCount: 7.061401241503109 LastEvaluatedKey: key: LastEvaluatedKey properties: accounts: $ref: '#/components/schemas/AllAccountsResponse_accounts' total: type: number required: - accounts - total type: object TransactionResponse: additionalProperties: false example: accountId: accountId note: note createdAt: 6.027456183070403 amount: 0.8008281904610115 paymentProvider: stripe paymentId: paymentId modifiedAt: 1.4658129805029452 businessId: businessId transactionId: transactionId properties: transactionId: type: string accountId: type: string businessId: type: string amount: type: number note: type: string paymentProvider: enum: - stripe type: string paymentId: type: string createdAt: type: number modifiedAt: type: number required: - accountId - amount - businessId - createdAt - modifiedAt - transactionId type: object AllTransactionsResponse: additionalProperties: false example: total: 2.3021358869347655 transactions: Items: - accountId: accountId note: note createdAt: 6.027456183070403 amount: 0.8008281904610115 paymentProvider: stripe paymentId: paymentId modifiedAt: 1.4658129805029452 businessId: businessId transactionId: transactionId - accountId: accountId note: note createdAt: 6.027456183070403 amount: 0.8008281904610115 paymentProvider: stripe paymentId: paymentId modifiedAt: 1.4658129805029452 businessId: businessId transactionId: transactionId Count: 5.962133916683182 ScannedCount: 5.637376656633329 LastEvaluatedKey: key: LastEvaluatedKey properties: transactions: $ref: '#/components/schemas/AllTransactionsResponse_transactions' total: type: number required: - total - transactions type: object PatchAccountRequest: additionalProperties: false example: accountName: accountName properties: accountName: type: string type: object AccountUsageBillingAdjustmentsResponse: additionalProperties: false example: adjustments: - accountId: accountId createdAt: 6.027456183070403 billingId: billingId modifiedAt: 1.4658129805029452 hourlyCost: 0.8008281904610115 - accountId: accountId createdAt: 6.027456183070403 billingId: billingId modifiedAt: 1.4658129805029452 hourlyCost: 0.8008281904610115 properties: adjustments: items: $ref: '#/components/schemas/AccountUsageBillingAdjustmentsResponse_adjustments_inner' type: array required: - adjustments type: object PostAccountUsageBillingRateAdjustmentRequest: additionalProperties: false example: billingCost: 0.08008281904610115 properties: billingCost: minimum: 0 type: number required: - billingCost type: object BusinessResponse: additionalProperties: false example: businessId: businessId businessName: businessName properties: businessId: type: string businessName: type: string required: - businessId - businessName type: object BusinessSettingsResponse: additionalProperties: false example: currencyLabelSuffixed: true businessId: businessId accountsOverdraftable: true currencyLabel: currencyLabel properties: businessId: type: string currencyLabel: type: string currencyLabelSuffixed: type: boolean accountsOverdraftable: type: boolean required: - accountsOverdraftable - businessId - currencyLabel - currencyLabelSuffixed type: object BillingType: enum: - microTransaction - usage type: string PatchBusinessSettingsRequest: additionalProperties: false properties: currencyLabel: type: string currencyLabelSuffixed: type: boolean accountsOverdraftable: type: boolean billingType: $ref: '#/components/schemas/BillingType' paymentProviders: items: enum: - paypal - stripe type: string type: array stripeSandboxPublishableKey: type: string stripeSandboxSecretKey: type: string stripePublishableKey: type: string stripeSecretKey: type: string paypalClientId: type: string paypalClientSecret: type: string type: object PatchBusinessRequest: additionalProperties: false example: businessName: businessName properties: businessName: description: "I am curious to see if this works with markdown like this\ \ link: [to google](https://www.google.com)" minLength: 1 type: string type: object PaymentProvider: enum: - paypal - stripe type: string PostTransactionRequest: additionalProperties: false example: accountId: accountId note: note amount: 0.8008281904610115 paymentProvider: null paymentId: paymentId properties: accountId: minLength: 1 type: string amount: type: number note: minLength: 3 type: string paymentProvider: $ref: '#/components/schemas/PaymentProvider' paymentId: type: string required: - accountId - amount type: object PatchTransactionRequest: additionalProperties: false example: accountId: accountId note: note amount: 0.8008281904610115 paymentProvider: null paymentId: paymentId properties: accountId: minLength: 1 type: string amount: type: number note: type: string paymentProvider: $ref: '#/components/schemas/PaymentProvider' paymentId: type: string type: object AllAccountsResponse_accounts: additionalProperties: false example: Items: - accountId: accountId createdAt: 0.8008281904610115 usageBillingRate: 5.962133916683182 remainingHoursOnBalance: 5.637376656633329 balance: 1.4658129805029452 accountName: accountName modifiedAt: 6.027456183070403 businessId: businessId - accountId: accountId createdAt: 0.8008281904610115 usageBillingRate: 5.962133916683182 remainingHoursOnBalance: 5.637376656633329 balance: 1.4658129805029452 accountName: accountName modifiedAt: 6.027456183070403 businessId: businessId Count: 2.3021358869347655 ScannedCount: 7.061401241503109 LastEvaluatedKey: key: LastEvaluatedKey properties: Items: items: $ref: '#/components/schemas/AccountResponse' type: array Count: type: number ScannedCount: type: number LastEvaluatedKey: additionalProperties: type: string type: object required: - Count - Items - LastEvaluatedKey - ScannedCount type: object AllTransactionsResponse_transactions: additionalProperties: false example: Items: - accountId: accountId note: note createdAt: 6.027456183070403 amount: 0.8008281904610115 paymentProvider: stripe paymentId: paymentId modifiedAt: 1.4658129805029452 businessId: businessId transactionId: transactionId - accountId: accountId note: note createdAt: 6.027456183070403 amount: 0.8008281904610115 paymentProvider: stripe paymentId: paymentId modifiedAt: 1.4658129805029452 businessId: businessId transactionId: transactionId Count: 5.962133916683182 ScannedCount: 5.637376656633329 LastEvaluatedKey: key: LastEvaluatedKey properties: Items: items: $ref: '#/components/schemas/TransactionResponse' type: array Count: type: number ScannedCount: type: number LastEvaluatedKey: additionalProperties: type: string type: object required: - Count - Items - LastEvaluatedKey - ScannedCount type: object AccountUsageBillingAdjustmentsResponse_adjustments_inner: additionalProperties: false example: accountId: accountId createdAt: 6.027456183070403 billingId: billingId modifiedAt: 1.4658129805029452 hourlyCost: 0.8008281904610115 properties: billingId: type: string accountId: type: string hourlyCost: type: number createdAt: type: number modifiedAt: type: number required: - accountId - billingId - createdAt - hourlyCost - modifiedAt type: object securitySchemes: ApiKeyAuth: in: header name: X-API-Key type: apiKey