Repository navigation
API v2 0422 backup
The initial letter 'A' indicates that the API is located in a folder whose name begins with 'A'. Following this, the first two digits '01' specify the API's position in a sequence of folders, suggesting that it is the first folder starting with 'A'. The third digit '1' denotes the API's position within a subsequence of folders inside the initial folder starting with 'A', indicating it is in the first subfolder. Lastly, the final three digits '001' represent the API's sequence number within the subfolder, meaning it is the first API listed there.
-
A010001 -
POST /ask_ai-ask AI for help -
A010002 -
GET /ask_ai/[resultId]-get ai result from faith -
A020001 -
GET /company/:companyId/accounting_setting-accounting setting -
A020002 -
PUT /company/:companyId/accounting_setting-accounting setting -
A030001 -
GET /company/:companyId/account-accounting setting -
A030002 -
POST /company/:companyId/account-accounting setting -
A031001 -
GET /company/:companyId/account/:accountId-accounting setting -
A031002 -
PUT /company/:companyId/account/:accountId-accounting setting -
A031003 -
DELETE /company/:companyId/account/:accountId-accounting setting -
A030001 -
POST /job/:jobId/application-Create an application for a job -
A040001 -
GET /company/:companyId/assets-List all assets -
A040002 -
GET /company/:companyId/assets/:assetId-Get asset by ID -
A040003 -
POST /company/:companyId/assets-Create asset -
A040004 -
PUT /company/:companyId/assets/:assetId-Update asset -
A040005 -
DELETE /company/:companyId/assets/:assetId-Delete asset -
A040006 -
GET /company/:companyId/asset/suggested_number-Get suggested asset number for reference -
A040007 -
POST /company/:companyId/asset/bulk-Create multiple assets -
A050001 -
GET /user/:userId/account_book-List all account books and their team information- 1068-242687 1124-194901 4913-277971 4913-278543 4913-277390 4962-289006 4962-290059 -
A05002 -
GET /account_book/:accountBookId/connect-connectAccountBookByBookId4913-277971 4913-278543 -
A05003 -
GET /account_book/:accountBookId/info-getAccountBookInfoByBookId532-257386 -
A05004 -
PUT /account_book/:accountBookId-updateAccountBook5020-283607 -
A05005 -
PUT /account_book/:accountBookId/info-updateAccountBookInfo532-257386 -
A05006 -
DELETE /account_book/:accountBookId-Delete an account book by ID -
A05007 -
GET /account_book/:accountBookId/disconnect-disconnectAccountBook -
A05008 -
GET /user/:userId/account_book/info-listAccountBookInfoByUserID478-228551 -
C010001 -
GET /company/:companyId/counterparty-counterparty setting -
C010002 -
POST /company/:companyId/counterparty-counterparty setting -
C011001 -
GET /company/:companyId/counterparty_setting/:counterpartyId-counterparty setting -
C011002 -
PUT /company/:companyId/counterparty_setting/:counterpartyId-counterparty setting -
C011003 -
DELETE /company/:companyId/counterparty_setting/:counterpartyId-counterparty setting -
C030001 -
GET /company/certificate-get all certificate -
C030002 -
GET /company/certificate/[certificateId] -get one certificate` -
C030003 -
POST /company/certificate-post certificate -
C030004 -
DELETE /certificate/[certificateId]-Delete Certificate By id -
C040001 -
GET user/:userId/company-user normal setting,company list -
C040002 -
POST user/:userId/company-user normal setting,company list -
C041001 -
GET /company/:companyId-user normal setting,company list -
C041002 -
PUT /company/:companyId-user normal setting,company list -
C041003 -
DELETE /company/:companyId-user normal setting,company list -
C042001 -
PUT /user/:user/selected_company-ISFMK00004 -
C043001 -
PUT /company/:companyId/icon-update company icon -
E010001 -
POST /company/:companyId/asset/export-export asset list -
E020001 -
POST /company/:companyId/trial_balance/export-export trial balance list -
E030001 -
POST /company/:companyId/ledger/export-export ledger list -
F010001 -
POST /company/:companyId/file-ISFMK00004,ISFMK00058,ISFMK00061右邊 -
F011001 -
GET /company/:companyId/file/:fileId-ISFMK00058 -
F011002 -
DELETE /company/:companyId/file/:fileId-ISFMK00058 -
I010001 -
GET /company/:companyId/image/:imageId-ISFMK00058 -
J010001 -
GET /job-List all jobs -
J010002 -
GET /job/:jobId-Get details of a specific job -
L010001 -
GET /company/:companyId/ledger-List ledger details for a specific accounting account range -
N020001 -
GET /news-list news -
N020002 -
GET /news/:newsId-get news by id -
O010001 -
GET /company/:companyId/order -
O010002 -
POST /company/:companyId/order -
P010001 -
GET /company/:companyId/payment?orderId= -
P010002 -
POST /company/:companyId/payment -
P020001 -
GET /company/:companyId/pending_task-List all pending tasks -
P030001 -
GET /user/:userId/pending_task-List all pending tasks -
P040001 -
GET /payment_plan-List all available subscription plans- 4913-280277 -
R010001 -
POST user/:userId/role-create role for user -
R010002 -
GET user/:userId/role-list role for user -
R020001 -
PUT /user/:userId/selected_role-select role for user -
R021001 -
GET /company/:companyId/report-ISFMK00066 -
R031002 -
GET /role -
R040001 -
POST /room-create room -
R040002 -
GET /room-list room -
R041001 -
GET /room/:roomId-get room by id -
R041002 -
DELETE /room/:roomId-delete room by id -
S010001 -
POST /sign-out[不需驗證登入] -
S020001 -
GET /status_info-ISFMK00001[不需驗證登入] -
S030001 -
GET /api/v2/subscription-List all teams' subscription information -
S030002 -
PUT /api/v2/subscription/:teamId/subscription-Update team subscription information -
S030003 -
GET /api/v2/subscription/:teamId-Get team's subscription details by ID -
S030004 -
GET /api/v2/subscription/:teamId/invoice-List teams' subscription invoices -
S030005 -
GET /api/v2/subscription/:teamId/invoice/:invoiceId-Get team invoice details by ID -
T010001 -
GET /company/:companyId/trial_balance-List all trial balance items -
T020001 -
GET /user/:userId/todo-List all todo items -
T020002 -
POST /user/:userId/todo-Create a todo item -
T020003 -
GET /todo/:todoId-Get a todo item by ID -
T020004 -
PUT /todo/:todoId-Update a todo item -
T020005 -
DELETE /todo/:todoId-Delete a todo item -
T030001 -
POST /api/v2/team-create team4913-279656 -
T030002 -
GET /api/v2/team-List all teams1068-242687 1124-194901 -
T030003 -
GET /api/v2/team/:teamId-Get team details by ID4913-277390 4962-289006 4962-290059 -
T030004 -
GET /api/v2/team/:teamId/account_book-List team account books1124-194901 4913-277971 4913-278543 -
T030005 -
GET /api/v2/team/:teamId/member-List team members4913-276544 1150-247080 1150-255773 -
T030006 -
PUT /api/v2/team/:teamId/member-Add members to team4913-279873 4288-273123 4962-276359 -
T030007 -
GET /api/v2/team/:teamId/leave-member leave team4913-274684 -
T030008 -
POST /api/v2/account_book/:accountBookId/transfer-request transfer account book4913-274684 -
T030009 -
GET /api/v2/account_book/:accountBookId/cancel-cancel transfer account book1-21092 -
T030010 -
GET /api/v2/account_book/:accountBookId/accept-accept transfer account book -
T030011 -
GET /api/v2/account_book/:accountBookId/decline-decline transfer account book -
T030012 -
GET /api/v2/team/:teamId/payment_method-List team payment methods4913-278543 -
T030013 -
POST /api/v2/user/:userId/payment_method/:paymentMethodId/charge-charge payment method4964-217614 -
T03010 -
PUT /team/:teamId-update team by team id4962-289679 4962-289733 4962-289779 4962-289931 -
T03011 -
PUT /team/:teamId/member/:memberId-updateMemberByMemberId4962-289779 4962-289931 -
T03012 -
DELETE /team/:teamId/member/:memberId-deleteMemberByMemberId4962-289779 4962-289931 -
T03013 -
POST /file-updateTeamPictureByTeamId4913-277971 -
T03014 -
PUT /team/:teamId/icon-updateTeamIconByTeamId4913-277971 -
T04015 -
POST /account_book-create account book -
U011001 -
GET /user/:userId-user normal setting- 1068-242687 1124-194901 4913-277971 4913-278543 4913-277390 4962-289006 4962-290059 -
U011002 -
PUT /user/:userId-user normal setting -
U011003 -
DELETE /user/:userId-user normal setting -
U011004 -
GET /user/:userId/user_setting-user normal setting -
U011005 -
PUT /user/:userId/user_setting-user normal setting -
U011007 -
GET /user/:userId/user_action_log-user normal setting -
U011008 -
GET /user/:userId/agreement-login page -
U011009 -
PUT /user/:userId/deletion-normal setting page -
U020001 -
POST /api/v2/user/:userId/card/bind-bind card -
U020002 -
GET /api/v2/user/:userId/card-get card -
U020003 -
POST /api/v2/user/:userId/card/payment-make payment -
V010001 -
GET /company/voucher-Get all voucher -
V010002 -
GET /company/voucher/[voucherId]-GET One Voucher -
V010003 -
POST /company/voucher/readed-POST check already Read voucher -
V010004 -
POST /company/voucher-Post Voucher -
V010005 -
PUT /company/voucher/[voucherId]-Put Voucher -
V010006 -
DELETE /company/voucher/[voucherId]-Delete Voucher -
V010007 -
POST /company/:companyId/voucher/:voucherId/restore-Restore Deleted Voucher
-------------------- 以下是待確認 api v1 --------------------
- ❌ A010001 -
GET /audit_report- iSunFA-Landing-page-Animation10 [不需驗證登入] - J010001 -
GET /company/:companyId/journal-ISFMK00038 - J011001 -
GET /company/:companyId/journal/:journalId-ISFMK00015ISFMK00024 - J011002 -
DELETE /company/:companyId/journal/:journalId-ISFMK00025 - O011001 -
POST /company/:companyId/ocr - O011003 -
GET /company/:companyId/ocr - O011004 -
DELETE /company/:companyId/ocr/:resultId
------------------ 以上是待確認 api v1 -----------------------------------
- description: ask AI for help
POST /askAi| name | type | description | required | default |
|---|---|---|---|---|
| reason | string ('certificate', 'voucher') | the reason for asking AI, help is for stream chat, certificate is for analysis certificate ad return invoice json, voucher is will return voucher json | true | -- |
| name | type | description |
|---|---|---|
| fileId | number | the "fileId" of that certificate (because certificate has not been saved into database yet) |
POST /askAi?reason=certificate
const body = {
"targetIdList": 1001
}| name | type | description |
|---|---|---|
| certificateId | number | the "certificateId" of certificate, when user click "Please select certificate...", than will be activate |
POST /askAi?reason=voucher
const body = {
"certificateId": 1001
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | result | response data(AI if use "helper", result if "invoice", "voucher") |
| name | type | description |
|---|---|---|
| reason | string | the reason for asking AI |
| resultId | string | resultId for pusher sub |
| progressStatus | string | the status of the progress |
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": {
"reason": "voucher",
"resultId": "a1b2c3d4f5g6h7i8j9k0",
"progressStatus": "processing"
}
}- Description: Use this api if ai result is missing
GET /askAi/:resultIdSession data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required | default |
|---|---|---|---|---|
| resultId | string | the resultId of 'certificate', 'voucher' | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| reason | string ('help', 'certificate', 'voucher') | the reason for asking AI, help is for stream chat, certificate is for analysis certificate ad return invoice json, voucher is will return voucher json | true | -- |
GET /ask_ai/:resultId?reason=certificate
| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | certificate | voucher | base on helper type |
- this may not return all arguments in payload
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": {
"inputOrOutput": "input",
"certificateDate": 10000001, // second
"certificateNo": "AB-12345678", // to store special number to represent certificate, ex for invoice is invoiceNo
"currencyAlias": "TWD",
"priceBeforeTax": 4000,
"taxRatio": 5, // 5%, -1 for tax free
"taxPrice": 200, // how many price to pay taxes
"totalPrice": 4200,
"counterPartyId": 1, // use fuzzy search
"invoiceType": "triplicate_uniform_invoice",
"deductible": true,
}
}{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": {
"voucherDate": 1000000,
"type": "payment", // or transfer or receiving
"note": "This is a note",
"counterPartyId": 1001,
"lineItemsInfo": {
"sum": {
"debit": true,
"amount": 1000
},
"lineItems": [
{
"id": 1001,
"amount": 1000,
"description": "This is a description",
"debit": true,
"accountId": 1001,
},
{
"id": 1002,
"amount": 1001,
"description": "This is a description",
"debit": false,
"accountId": 1002,
}
]
}
}
}- description: list all customers and vendors
GET /company/:companyId/counterparty_setting| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company associated with the customer or vendor | true | -- |
GET /company/1000/counterparty_setting| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaginatedData<Counterparty[]> | response data |
| name | type | description |
|---|---|---|
| data | Counterparty[] | The counterparty data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| name | type | description |
|---|---|---|
| id | number | customer's or vendor's id |
| companyId | number | id of the company associated with the customer or vendor |
| name | string | customer's or vendor's name |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "List all customers and vendors successfully",
"payload": {
"data": [
{
"id": 1,
"companyId": 1,
"name": "Test Customer",
"taxId": "123456",
"type": "Customer",
"note": "Test Note",
"createdAt": 123456,
"updatedAt": 123456
},
{
"id": 2,
"companyId": 1,
"name": "Test Vendor",
"taxId": "123456",
"type": "Vendor",
"note": "Test Note",
"createdAt": 123456,
"updatedAt": 123456
}
],
"page": 1,
"totalPages": 5,
"totalCount": 23,
"pageSize": 5,
"hasNextPage": true,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "createdAt",
"sortOrder": "desc"
}
]
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: create a customer or vendor
POST /company/:companyId/counterparty| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company associated with the customer or vendor | true | -- |
| name | type | description |
|---|---|---|
| name | string | customer's or vendor's name |
| companyId | number | id of the company associated with the customer or vendor |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
POST /company/1000/counterparty_setting
const body = {
"name": "cafecaWW",
"companyId": 1000,
"country": "Taiwan",
"taxId": "3464",
"type": "both",
"note": "careful"
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | Counterparty | response data |
| name | type | description |
|---|---|---|
| id | number | customer's or vendor's id |
| companyId | number | id of the company associated with the customer or vendor |
| name | string | customer's or vendor's name |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Create a customer or vendor successfully",
"payload":
{
"id": 3,
"companyId": 1000,
"name": "cafecaWW",
"country": "Taiwan",
"taxId": "3464",
"type": "both",
"note": "careful",
"createdAt": 1630000000,
"updatedAt": 1630000000,
"deletedAt": null,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get a customer or vendor by id
GET /company/:companyId/counterparty_setting/:counterpartyId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company associated with the customer or vendor | true | -- |
| counterpartyId | string | id of the customer or vendor | true | -- |
GET /company/1000/counterparty_setting/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | Counterparty | response data |
| name | type | description |
|---|---|---|
| id | number | customer's or vendor's id |
| companyId | number | id of the company associated with the customer or vendor |
| name | string | customer's or vendor's name |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get a customer or vendor successfully",
"payload":
{
"id": 1,
"companyId": 1000,
"name": "cafeca",
"country": "Taiwan",
"taxId": "1234",
"type": "customer",
"note": "bad one",
"createdAt": 1630000000,
"updatedAt": 1630000000,
"deletedAt": null,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: update a customer or vendor by id
PUT /company/:companyId/counterparty_setting/:counterpartyId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company associated with the customer or vendor | true | -- |
| counterpartyId | string | id of the customer or vendor | true | -- |
| name | type | description |
|---|---|---|
| name | string | customer's or vendor's name |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
PUT /company/1000/counterparty_setting/1
const body = {
"name": "MOon",
"country": "Taiwan",
"taxId": "3464",
"type": "both",
"note": "careful very"
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | Counterparty | response data |
| name | type | description |
|---|---|---|
| id | number | customer's or vendor's id |
| companyId | number | id of the company associated with the customer or vendor |
| name | string | customer's or vendor's name |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Update a customer or vendor successfully",
"payload":
{
"id": 1,
"companyId": 1000,
"name": "MOon",
"country": "Taiwan",
"taxId": "3464",
"type": "both",
"note": "careful very",
"createdAt": 1630000001,
"updatedAt": 1630000001,
"deletedAt": null,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: soft delete a customer or vendor by id through update the delete time
DELETE /company/:companyId/counterparty_setting/:counterpartyId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company associated with the customer or vendor | true | -- |
| counterpartyId | string | id of the customer or vendor | true | -- |
DELETE /company/1000/counterparty_setting/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | Counterparty | response data |
| name | type | description |
|---|---|---|
| id | number | customer's or vendor's id |
| companyId | number | id of the company associated with the customer or vendor |
| name | string | customer's or vendor's name |
| country | string | which country the tax id belongs to |
| taxId | string | customer's or vendor's tax id |
| type | string | type of the customer or vendor |
| note | string | note of the customer or vendor |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Delete a customer or vendor successfully",
"payload":
{
"id": 1,
"companyId": 1000,
"name": "MOon",
"country": "Taiwan",
"taxId": "3464",
"type": "both",
"note": "careful very",
"createdAt": 1630000001,
"updatedAt": 1630000001,
"deletedAt": 1630560002,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- Description: Get all certificate in "Uploaded Certificate"
GET /company/certificate
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required |
|---|---|---|---|
| page | number | The page number, default is 1 | no |
| pageSize | number | how many items in one page, default is 10 | no |
| hasBeenUsed | boolean(true/false) | return certificate connect to something if true, return certificate connect to nothing if false, return all if undefined | no |
| sortBy | string | which column to sort by (ex: "createAt") | no |
| sortOrder | string ("asc"/"desc") | The order to sort by | no |
| startDate | integer(timestamp in second) | item include and after startDate, default is 0 |
no |
| endDate | integer(timestamp in second) | item include and before startDate, default is infinity |
no |
| searchQuery | string | this field is to search name | no |
To be continue
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Method not allowed",
"payload": {
"data": [
{
"id": 1
"inputOrOutput": "input",
"certificateDate": 10000001, // second
"certificateNo": "AB-12345678", // to store special number to represent certificate, ex for invoice is invoiceNo
"currencyAlias": "TWD",
"priceBeforeTax": 4000,
"taxRatio": 5, // 5%, -1 for tax free
"taxPrice": 200, // how many price to pay taxes
"totalPrice": 4200,
"counterPartyId": 1,
"invoiceType": "triplicate_uniform_invoice",
"deductible": true,
"connectToId": null // this can be interger or null, if null it has not been used on anything, if it has number, it will be
"name": "invoice001.jpg",
"url": "/api/v2/certificate/1", // decrypedted
"type": "invoice", // what kind f certificate is this
"connectTotype": "voucher",
"mimeTYpe": "image/jpeg",
"size": "3.0 MB",
"uploadProgress": 50, // 50 percent
"aiResultId": "douhvjax_-1", // or null?
"aiStatus": "success",
"createAt": 10000000, // second
"updateAt": 10000000, // second
}
],
"page": 1, // current page
"totalPages": 3,
"totalCount": 30,
"pageSize": 10,
"hasNextPage": true,
"hasPreviousPage": true,
"sort": [
{
"sortBy": "createAt",
"sortOrder": "desc"
}
]
}
}- Description: GET one certificate
GET /company/certificate/[certificateId]
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required |
|---|---|---|---|
| certificateId | number | The id of certain certificate | Yes |
To be continue
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Method not allowed",
"payload": {
"id": 1,
"inputOrOutput": "input",
"certificateDate": 10000001, // second
"certificateNo": "AB-12345678", // to store special number to represent certificate, ex for invoice is invoiceNo
"currencyAlias": "TWD",
"priceBeforeTax": 4000,
"taxRatio": 5, // 5%, -1 for tax free
"taxPrice": 200, // how many price to pay taxes
"totalPrice": 4200,
"counterPartyId": 1,
"invoiceType": "triplicate_uniform_invoice",
"deductible": true,
"connectToId": null, // this can be interger or null, if null it has not been used on anything, if it has number, it will be
"name": "invoice001.jpg",
"url": "/api/v2/certificate/1", // decrypedted
"type": "invoice", // what kind f certificate is this
"connectTotype": "voucher",
"mimeType": "image/jpeg",
"size": "3.0 MB",
"uploadProgress": 50, // 50 percent
"aiResultId": "douhvjax_-1", // or null?
"aiStatus": "success",
"createAt": 10000000, // second
"updateAt": 10000000, // begin
}
}- Description : You should Post to File first, then get the file id. then post to here and get aichResultId, so that you can go to
ask_aito get ai data
POST /company/certificate
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description |
|---|---|---|
| inputOrOutput | string | input |
| certificateDate | int | certificate happened day in second |
| certificateNo | string | to store special number to represent certificate, ex for invoice is invoiceNo |
| currencyAlias | string | currency short name (alias) ex: "TWD" |
| priceBeforeTax | number | price before tax |
| taxRatio | number | if 5% please write 5, tax free be -1 |
| taxPrice | number | Need to make sure it is priceBeforeTax * taxRatio
|
| totalPrice | number | need to be priceBeforeTax + taxPrice |
| counterPartyId | number | id f counter body |
| invoiceType | string | triplicate_uniform_invoice |
| deductible | boolean | can this invoice be deductible? |
| fileId | number | which file id |
{
"inputOrOutput": "input",
"certificateDate": 10000001, // second
"certificateNo": "AB-12345678", // to store special number to represent certificate, ex for invoice is invoiceNo
"currencyAlias": "TWD",
"priceBeforeTax": 4000,
"taxRatio": 5, // 5%, -1 for tax free
"taxPrice": 200, // how many price to pay taxes
"totalPrice": 4200,
"counterPartyId": 1,
"invoiceType": "triplicate_uniform_invoice",
"deductible": true,
"fileId": 1
}To be continue
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Method not allowed",
"payload": {
"aiResultId": "douhvjax_-1"
}
}- Description : Delete certificate by id
DELETE /certificate/[certificateId]
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description |
|---|---|---|
| certificateId | number | certificate id to delete |
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Method not allowed",
"payload": {
"id": 1,
"inputOrOutput": "input",
"certificateDate": 10000001, // second
"certificateNo": "AB-12345678", // to store special number to represent certificate, ex for invoice is invoiceNo
"currencyAlias": "TWD",
"priceBeforeTax": 4000,
"taxRatio": 5, // 5%, -1 for tax free
"taxPrice": 200, // how many price to pay taxes
"totalPrice": 4200,
"counterPartyId": 1,
"invoiceType": "triplicate_uniform_invoice",
"deductible": true,
"connectToId": null, // this can be interger or null, if null it has not been used on anything, if it has number, it will be
"name": "invoice001.jpg",
"url": "/api/v2/certificate/1", // decrypedted
"type": "invoice", // what kind f certificate is this
"connectTotype": "voucher",
"mimeType": "image/jpeg",
"size": "3.0 MB",
"uploadProgress": 50, // 50 percent
"aiResultId": "douhvjax_-1", // or null?
"aiStatus": "success",
"createAt": 10000000, // second
"updateAt": 10000000, // begin
}
}- description: get the normal setting of the user
GET /user/:userId/normal_setting| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
GET /user/1/normal_setting| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IUserSetting | response data |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| userId | number | User ID |
| personalInfo | IUserPersonalInfo | Personal information of the user |
| notificationSetting | INotificationSetting | Notification settings for the user |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| deletedAt | number | Timestamp when deleted |
| name | type | description |
|---|---|---|
| systemNotification | boolean | Indicates if system notifications are enabled |
| updateAndSubscriptionNotification | boolean | Indicates if update and subscription notifications are enabled |
| emailNotification | boolean | Indicates if email notifications are enabled |
| name | type | description |
|---|---|---|
| firstName | string | First name of the user |
| lastName | string | Last name of the user |
| country | string | Country of the user |
| language | string | Preferred language of the user |
| phone | string | Phone number of the user |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get an user normal setting successfully",
"payload":
{
"id": 1,
"userId": 1,
"personalInfo": {
"firstName": "王",
"lastName": "大明",
"country": "Taiwan",
"language": "english",
"phone": "+886912345666"
},
"notificationSetting": {
"systemNotification": false,
"updateAndSubscriptionNotification": false,
"emailNotification": true
},
"createdAt": 1633036800,
"updatedAt": 1636854800,
"deletedAt": null,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: update the normal setting of the user
PUT /user/:userId/normal_setting| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
| name | type | description |
|---|---|---|
| name | string | name of the user |
| string | email of the user | |
| phone | string | phone number of the user |
| country | string | country of the user belongs to |
| lauguage | string | using language of the user |
| device | string | using device name of the user |
| IpAddress | string | IP address of the user |
| systemNotification | boolean | whether receiving the notification about system |
| updateAndSubscriptionNotification | boolean | whether receiving the notification about the update and the subscription |
| emailNotification | boolean | whether sending the notification to email |
PUT /user/1/normal_setting
const body = {
"name": "王大明",
"phone": "+886912345666",
"systemNotification": false,
"updateAndSubscriptionNotification": false,
"emailNotification": true,
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IUserSetting | response data |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| userId | number | User ID |
| personalInfo | IUserPersonalInfo | Personal information of the user |
| notificationSetting | INotificationSetting | Notification settings for the user |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| deletedAt | number | Timestamp when deleted |
| name | type | description |
|---|---|---|
| systemNotification | boolean | Indicates if system notifications are enabled |
| updateAndSubscriptionNotification | boolean | Indicates if update and subscription notifications are enabled |
| emailNotification | boolean | Indicates if email notifications are enabled |
| name | type | description |
|---|---|---|
| firstName | string | First name of the user |
| lastName | string | Last name of the user |
| country | string | Country of the user |
| language | string | Preferred language of the user |
| phone | string | Phone number of the user |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get an user normal setting successfully",
"payload":
{
"id": 1,
"userId": 1,
"personalInfo": {
"firstName": "王",
"lastName": "大明",
"country": "Taiwan",
"language": "english",
"phone": "+886912345666"
},
"notificationSetting": {
"systemNotification": false,
"updateAndSubscriptionNotification": false,
"emailNotification": true
},
"createdAt": 1633036800,
"updatedAt": 1636854800,
"deletedAt": null,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get the action log of the user
GET /user/:userId/action_log| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
GET /user/1/action_log| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaginatedData<IUserActionLog[]> | response data |
| name | type | description |
|---|---|---|
| data | IUserActionLog[] | The user action data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| sessionId | string | Session ID of the user |
| userId | number | User ID |
| actionType | string | Type of action performed |
| actionDescription | string | Description of the action |
| actionTime | number | Timestamp when the action occurred |
| ipAddress | string | IP address from which the action was performed |
| userAgent | string | User agent information |
| apiEndpoint | string | API endpoint accessed |
| httpMethod | string | HTTP method used (e.g., GET, POST) |
| requestPayload | Record<string, string> | Payload sent with the request |
| httpStatusCode | number | HTTP status code returned |
| statusMessage | string | Status message returned by the server |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get an user action log successfully",
"payload":
{
"data": [
{
"id": 1,
"sessionId": "abc123",
"userId": 1,
"actionType": "LOGIN",
"actionDescription": "User logged in",
"actionTime": 165165156,
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0",
"apiEndpoint": "/api/login",
"httpMethod": "POST",
"requestPayload": { "username": "user1" },
"httpStatusCode": 200,
"statusMessage": "Success"
}
],
"page": 1,
"totalPages": 5,
"totalCount": 23,
"pageSize": 5,
"hasNextPage": true,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "actionTime",
"sortOrder": "desc"
}
]
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": []
}- description: This API provides the functionality to create an agreement for user.
POST `/user/:userId/agreement`| name | type | description |
|---|---|---|
| agreementHash | string | hash of the agreement |
POST `/user/1/agreement`{
"agreementHash": "0x1234567890"
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | IUser | {} | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of user |
| name | string | user name |
| fullName | string | user full name |
| string | user email | |
| phone | string | user phone |
| imageId | string | user image id |
| agreementList | string[] | list of agreement hash |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
- 成功的回傳
{
"powerby": "iSunFA v0.1.8+52",
"success": true,
"code": "201ISF0000",
"message": "Created successfully",
"payload": {
"id": 10000001,
"name": "book",
"fullName": "book",
"email": "book@email.com",
"phone": "0912345678",
"imageId": "0x1234567890",
"agreementList": ["0x1234567890"],
"createdAt": 1721635489,
"updatedAt": 1721635489
}
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "400", "message": "bad request", "payload": {} }
- description: This API provides the functionality to delete an user.
PUT `/user/:userId/deletion`| name | type | description |
|---|---|---|
| userId | number | id of the user |
PUT `/user/1/deletion`| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | IUser | {} | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of user |
| name | string | user name |
| string | user email | |
| imageId | string | user image id |
| agreementList | string[] | list of agreement hash |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
| deletedAt | number | delete timestamp |
- 成功的回傳
{
"powerby": "iSunFA v0.1.8+52",
"success": true,
"code": "201ISF0000",
"message": "Deleted successfully",
"payload": {
"id": 10000001,
"name": "book",
"email": "aaa@example;com",
"imageId": "0x1234567890",
"agreementList": ["0x1234567890"],
"createdAt": 1721635489,
"updatedAt": 1721635489,
"deletedAt": 0,
}
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "400", "message": "bad request", "payload": {} }
- description: create a new company
POST user/:userId/company| name | type | description |
|---|---|---|
| name | string | name of the company |
| taxId | string | tax Id of the company |
| tag | string | tag of the company |
POST user/1/company
const body = {
"name": "iSunFA",
"taxId": "1234",
"tag": "all",
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | ICompanyAndRole | response data |
| name | type | description |
|---|---|---|
| company | ICompany | Company information |
| role | IRole | Role information |
| tag | string | Tag or label associated with the company |
| order | number | Order of the company |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| name | string | Name of the role |
| permission | string | Permission of the role |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "201",
"message": "Create a new company successfully",
"payload":
{
"company": {
"id": 1,
"imageId": "abc123",
"name": "iSunFA",
"taxId": "1234",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"role": {
"id": 1,
"name": "admin",
"permission": "all",
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"tag": "accounting",
"order": 1
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get all companies of the user
GET user/:userId/company| name | type | description | required | default |
|---|---|---|---|---|
| userId | number | id of the user | true | -- |
GET user/1000/company| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaginatedData<ICompanyAndRole[]> | response data |
| name | type | description |
|---|---|---|
| data | ICompany[] | The company data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| name | type | description |
|---|---|---|
| company | ICompany | Company information |
| role | IRole | Role information |
| tag | string | Tag or label associated with the company |
| order | number | Order of the company |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| name | string | Name of the role |
| permission | string | Permission of the role |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all companies of the user successfully",
"payload":
{
"data": [
{
"company": {
"id": 1,
"imageId": "abc123",
"name": "iSunFA",
"taxId": "1234",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"role": {
"id": 1,
"name": "admin",
"permission": "all",
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"tag": "accounting",
"order": 1
}
],
"page": 1,
"totalPages": 3,
"totalCount": 30,
"pageSize": 10,
"hasNextPage": true,
"hasPreviousPage": true,
"sort": [
{
"sortBy": "createAt",
"sortOrder": "desc"
}
]
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": []
}- description: get a company by id of the company
GET /company/:companyId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
GET /company/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | ICompanyAndRole | response data |
| name | type | description |
|---|---|---|
| company | ICompany | Company information |
| role | IRole | Role information |
| tag | string | Tag or label associated with the company |
| order | number | Order of the company |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| name | string | Name of the role |
| permission | string | Permission of the role |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get a company info of the user successfully",
"payload":
{
"company": {
"id": 1,
"imageId": "abc123",
"name": "iSunFA",
"taxId": "1234",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"role": {
"id": 1,
"name": "admin",
"permission": "all",
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"tag": "accounting",
"order": 1
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: update a company by id of the company
PUT /company/:companyId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | number | id of the company | true | -- |
| name | type | description |
|---|---|---|
| action | string | action to update the company e.g. setToTop, updateupdateTag |
| tag | string | tag or label associated with the company |
PUT /company/1
const body = {
"action": "updateTag",
"tag": "accounting",
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | ICompanyAndRole | response data |
| name | type | description |
|---|---|---|
| company | ICompany | Company information |
| role | IRole | Role information |
| tag | string | Tag or label associated with the company |
| order | number | Order of the company |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| name | string | Name of the role |
| permission | string | Permission of the role |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Update a company info of the user successfully",
"payload":
{
"company": {
"id": 1,
"imageId": "abc123",
"name": "iSunFAAAA",
"taxId": "12345678",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"role": {
"id": 1,
"name": "admin",
"permission": "all",
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"tag": "accounting",
"order": 1
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: delete a company by id of the company
DELETE /company/:companyId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | number | id of the company | true | -- |
DELETE /company/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | company | response data |
| name | type | description |
|---|---|---|
| id | number | id of the company |
| imageId | string | ID of the associated image |
| name | string | name of the company |
| taxId | string | tax Id of the company |
| startDate | number | start date of the company |
| createdAt | number | timestamp when created |
| updatedAt | number | timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Delete a company info of the user successfully",
"payload":
{
"id": 1,
"imageId": "abc123",
"name": "iSunFAAAA",
"taxId": "12345678",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: This API provides the functionality to select a company.
PUT /user/userId/selected_company| name | type | description | required | default |
|---|---|---|---|---|
| userId | number | specific user number | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| companyId | number | specific company number | yes | - |
PUT /user/1/selected_company
const body = {
"companyId": 1
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | company | response data or {} |
| name | type | description |
|---|---|---|
| id | number | id of the company |
| imageId | string | ID of the associated image |
| name | string | name of the company |
| taxId | string | tax Id of the company |
| startDate | number | start date of the company |
| createdAt | number | timestamp when created |
| updatedAt | number | timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Select a company successfully",
"payload":
{
"id": 1,
"imageId": "abc123",
"name": "iSunFAAAA",
"taxId": "12345678",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: create a file
POST /file| name | type | description | required | default |
|---|---|---|---|---|
| type | string | type of the file | yes | - |
| targetId | number | id of the target | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| formData | formData | form data of the file | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| file | file | file to upload | yes | - |
| encryptedSymmetricKey | string | encrypted symmetric key | yes | - |
| iv | string | iv of the file | yes | - |
POST /file?type=company&targetId=1
const body = {
"formData": {
"file": file,
"encryptedSymmetricKey": "1234567890",
"iv": "1234567890"
}
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | file | response data or {} |
| name | type | description |
|---|---|---|
| id | number | id of the file |
| name | string | name of the file |
| size | number | size of the file |
| existed | boolean | existed or not |
| url | string | url of the file |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "201",
"message": "Created successfully",
"payload":
{
"id": 1,
"name": "file1",
"size": 123456,
"existed": true,
"url": "https://www.isunfa.com/file/1"
}
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "bad request",
"payload": {}
}- description: get a file by id of the file
GET /file/:fileId| name | type | description | required | default |
|---|---|---|---|---|
| fileId | number | id of the file | true | -- |
GET /file/1| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | file | response data or {} |
| name | type | description |
|---|---|---|
| id | number | id of the file |
| name | string | name of the file |
| size | number | size of the file |
| existed | boolean | existed or not |
| url | string | url of the file |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Get a file successfully",
"payload":
{
"id": 1,
"name": "file1",
"size": 123456,
"existed": true,
"url": "https://www.isunfa.com/file/1"
}
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "404",
"message": "Not found",
"payload": {}
}- description: delete a file by id of the file
DELETE /file/:fileId| name | type | description | required | default |
|---|---|---|---|---|
| fileId | number | id of the file | true | -- |
DELETE /file/1| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | file | response data or {} |
| name | type | description |
|---|---|---|
| id | number | id of the file |
| name | string | name of the file |
| size | number | size of the file |
| existed | boolean | existed or not |
| url | string | url of the file |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Delete a file successfully",
"payload":
{
"id": 1,
"name": "file1",
"size": 123456,
"existed": true,
"url": "https://www.isunfa.com/file/1"
}
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "404",
"message": "Not found",
"payload": {}
}- description: get a image by id of the image
GET /image/:imageId| name | type | description | required | default |
|---|---|---|---|---|
| imageId | number | id of the image | true | -- |
GET /image/1| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | buffer | response data |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Get a image successfully",
"payload": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABjElEQVRIS+2Vv0oDQRDG"
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "bad request",
"payload": {}
}- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Get a image successfully",
"payload": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABjElEQVRIS+2Vv0oDQRDG- description: create a kyc
POST user/:userId/kyc| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
| type | string | type of the kyc | true | -- |
| name | type | description |
|---|---|---|
| name | string | bookkeeper's name |
| birthDate | string | bookkeeper's birthday |
| string | bookkeeper's email | |
| phone | string | bookkeeper's phone number |
| qualification | boolean | bookkeeper's qualification |
| certificationNumber | string | bookkeeper's certification number |
| personalIdType | string | bookkeeper's personal id type |
| personalIdFileId | string | bookkeeper's personal id |
| certificationFileId | string | bookkeeper's certification file |
POST user/1/kyc
const body = {
"type": "bookkeeper",
"name": "isunfa",
"birthDate": "1990-01-01",
"email": "isunfa@isunfa.com",
"phone": "0912345678",
"qualification": true,
"certificationNumber": "1234",
"personalIdType": "id",
"personalIdFileId": 1234,
"certificationFileId": 1234
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | KYC | response data |
| name | type | description |
|---|---|---|
| id | number | kyc's id |
| userId | number | id of the user associated with the kyc |
| type | string | type of the kyc |
| content | string | content of the kyc |
| status | string | status of the kyc |
| reviewer | number | name of the reviewer |
| note | string | note of the kyc |
| createdAt | number | create time |
| updatedAt | number | update time |
| reviewedAt | number | review time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Create a kyc successfully",
"payload":
{
"id": 1,
"userId": 1,
"type": "bookkeeper",
"content": "isunfa",
"status": "pending",
"reviewer": null,
"note": null,
"createdAt": 1630000001,
"updatedAt": 1630000001,
"reviewedAt": null,
"deletedAt": null,
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description:
- get order list
GET /company/:companyId/order
| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | specific id of the company | yes | - |
GET /company/1/order
| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description the status of the request |
| payload | Order[] | order list |
| name | type | description |
|---|---|---|
| id | number | Unique identifier for the order |
| companyId | number | Identifier for the associated company |
| planId | number | Identifier for the associated plan |
| status | string | Current status of the order |
| createdAt | number | Timestamp when the order was created |
| updatedAt | number | Timestamp when the order was last updated |
- 成功的回傳
{
"powerby": "iSunFA v0.1.4+55",
"success": true,
"code": "200ISF0002",
"message": "list successfully",
"payload": [
{
"id": 1,
"companyId": 1,
"planId": 1,
"status": "success",
"createdAt": 1630000000,
"updatedAt": 1630000000
}
]
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "bad request",
"payload": {}
}- description:
- create an order
POST /company/:companyId/order
| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | specific id of the company | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| planId | number | specific id of the plan | yes | - |
| status | string | status of the order | yes | - |
POST /company/1/order
{
"planId": 1,
"status": "active"
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description the status of the request |
| payload | Order | an order |
- 成功的回傳
{
"powerby": "iSunFA v0.1.4+55",
"success": true,
"code": "200ISF0002",
"message": "Create successfully",
"payload": {
"id": 12345,
"companyId": 678,
"planId": 91011,
"status": "active",
"createdAt": 1627890123,
"updatedAt": 1627891123
}
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "bad request",
"payload": {}
}- description:
- get payment by order id
GET /company/:companyId/payment?orderId=
| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | specific id of the company | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| orderId | string | specific id of the order | yes | - |
GET /company/1/payment?orderId=ORDER00001
| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description the status of the request |
| payload | string | redirectUrl |
- 成功的回傳
{
"powerby": "iSunFA v0.1.4+55",
"success": true,
"code": "200ISF0002",
"message": "Get successfully",
"payload": "https://${merchantId}.testing.oen.tw/checkout/subscription/create/${id}"
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "bad request",
"payload": ""
}- description:
- create payment
POST /company/:companyId/payment
| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | specific id of the company | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| token | string | specific id of the token | yes | - |
| customId | string | json stringify, with orderIdNum, subPlan, subPeriod | yes | - |
POST /company/1/payment
{
"token": "2etM3aQSCMWv7OGYQ6gDWtcOJaR",
"customId": "{"orderId":1,"subPlan":"Trail","subPeriod":30}"
}
| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description the status of the request |
| payload | string | payment record status |
- 成功的回傳
{
"powerby": "iSunFA v0.1.4+55",
"success": true,
"code": "200ISF0002",
"message": "Create successfully",
"payload": "success"
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "bad request",
"payload": ""
}- description: get all pending tasks of the company
GET company/:companyId/pending_task| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
GET company/1/pending_task| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPendingTask | response data |
| name | type | description |
|---|---|---|
| companyId | number | id of the company |
| missingCertificate | IMissingCertificate | missing certificate info |
| missingCertificatePercentage | number | missing certificate percentage |
| unpostedVoucher | IUnpostedVoucher | unposted voucher info |
| unpostedVoucherPercentage | number | unposted voucher percentage |
| name | type | description |
|---|---|---|
| companyId | number | id of the company |
| companyName | string | name of the company |
| count | number | count of missing certificate |
| name | type | description |
|---|---|---|
| companyId | number | id of the company |
| companyName | string | name of the company |
| count | number | count of unposted voucher |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all pending tasks of the company successfully",
"payload":
{
"companyId": 1,
"missingCertificate": {
"companyId": 1,
"companyName": "iSunFA",
"count": 1
},
"missingCertificatePercentage": 0.1,
"unpostedVoucher": {
"companyId": 1,
"companyName": "iSunFA",
"count": 2
},
"unpostedVoucherPercentage": 0.2
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get all pending tasks of the user
GET user/:userId/pending_task| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
GET user/1/pending_task| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPendingTask | response data |
| name | type | description |
|---|---|---|
| userId | number | id of the user |
| totalMissingCertificate | number | total missing certificate |
| totalMissingCertificatePercentage | number | total missing certificate percentage |
| missingCertificateList | IMissingCertificate[] | missing certificate list |
| totalUnpostedVoucher | number | total unposted voucher |
| totalUnpostedVoucherPercentage | number | total unposted voucher percentage |
| unpostedVoucherList | IUnpostedVoucher[] | unposted voucher list |
| name | type | description |
|---|---|---|
| companyId | number | id of the company |
| companyName | string | name of the company |
| count | number | count of missing certificate |
| name | type | description |
|---|---|---|
| companyId | number | id of the company |
| companyName | string | name of the company |
| count | number | count of unposted voucher |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all pending tasks of the user successfully",
"payload":
{
"userId": 1,
"totalMissingCertificate": 1,
"totalMissingCertificatePercentage": 0.1,
"missingCertificateList": [
{
"companyId": 1,
"companyName": "iSunFA",
"count": 1
}
],
"totalUnpostedVoucher": 2,
"totalUnpostedVoucherPercentage": 0.2,
"unpostedVoucherList": [
{
"companyId": 1,
"companyName": "iSunFA",
"count": 2
}
]
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get all roles
GET role| name | type | description | required | default |
|---|---|---|---|---|
| type | string | type of the role | false | -- |
GET role?type=User| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | role[] | response data |
| name | type | description |
|---|---|---|
| id | number | role's id |
| name | string | role's name |
| type | string | role's type |
| permissionList | string | role's permission list |
| createdAt | number | create time |
| updatedAt | number | update time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all roles successfully",
"payload":
[
{
"id": 1,
"name": "bookkeeper",
"type": "User",
"permissionList": "read,write",
"createdAt": 1630000001,
"updatedAt": 1630000001
},
{
"id": 2,
"name": "admin",
"type": "System",
"permissionList": "all",
"createdAt": 1630000001,
"updatedAt": 1630000001
}
]
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": []
}- description: create a role for user
POST user/:userId/role| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
| name | type | description |
|---|---|---|
| roleId | number | role's id |
POST user/1/role
const body = {
"roleId": 1
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | userRole | response data |
| name | type | description |
|---|---|---|
| id | number | userRole's id |
| userId | number | user's id |
| role | role | role related info |
| lastLoginAt | number | last login time |
| createdAt | number | create time |
| updatedAt | number | update time |
| name | type | description |
|---|---|---|
| id | number | role's id |
| name | string | role's name |
| permissionList | string | role's permission list |
| createdAt | number | create time |
| updatedAt | number | update time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all roles of the user successfully",
"payload":
{
"id": 1,
"userId": 1,
"role": {
"id": 1,
"name": "bookkeeper",
"permissionList": "read,write",
"createdAt": 1630000001,
"updatedAt": 1630000001
},
"lastLoginAt": 1630000001,
"createdAt": 1630000001,
"updatedAt": 1630000001
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": []
}- description: get all roles of the user
GET user/:userId/role| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
GET user/1/role| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | userRole[] | response data |
| name | type | description |
|---|---|---|
| id | number | userRole's id |
| userId | number | user;s id |
| role | role | role related info |
| lastLoginAt | number | last login time |
| createdAt | number | create time |
| updatedAt | number | update time |
| name | type | description |
|---|---|---|
| id | number | role's id |
| name | string | role's name |
| permissionList | string | role's permission list |
| createdAt | number | create time |
| updatedAt | number | update time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all roles of the user successfully",
"payload":
[
{
"id": 1,
"userId": 1,
"role": {
"id": 1,
"name": "bookkeeper",
"permissionList": "read,write",
"createdAt": 1630000001,
"updatedAt": 1630000001
},
"lastLoginAt": 1630000001,
"createdAt": 1630000001,
"updatedAt": 1630000001
}
]
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": []
}- description: select a role for user
PUT /user/:userId/selected_role| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | id of the user | true | -- |
| name | type | description |
|---|---|---|
| roleId | number | role's id |
PUT /user/1/selected_role
const body = {
"roleId": 1
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | userRole | response data |
| name | type | description |
|---|---|---|
| id | number | userRole's id |
| userId | number | user's id |
| role | role | role related info |
| lastLoginAt | number | last login time |
| createdAt | number | create time |
| updatedAt | number | update time |
| name | type | description |
|---|---|---|
| id | number | role's id |
| name | string | role's name |
| permissionList | string | role's permission list |
| createdAt | number | create time |
| updatedAt | number | update time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get all roles of the user successfully",
"payload":
{
"id": 1,
"userId": 1,
"role": {
"id": 1,
"name": "bookkeeper",
"permissionList": "read,write",
"createdAt": 1630000001,
"updatedAt": 1630000001
},
"lastLoginAt": 1630000001,
"createdAt": 1630000001,
"updatedAt": 1630000001
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": []
}- description: get Report by startDate, endDate and reportType
- Check Postman for example request
GET /company/:companyId/report?startDate=1704070800&endDate=1706745599&language=en&reportType=cash_flow_statement
| name | type | description | required | default |
|---|---|---|---|---|
| companyId | number | specific id of the companyId | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| startDate | number | timestamp in second | yes | - |
| endDate | number | timestamp in second | yes | - |
| language | number | can be any string, but require | yes | - |
| reportType | FinancialReportTypesKey | can be found in src/interfaces/report_type.ts
|
yes | - |
GET /company/10000009/report?startDate=1704070800&endDate=1706745599&language=en&reportType=cash_flow_statement
| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description |
| payload | FinancialReport or null) | the data |
| name | type | description |
|---|---|---|
| company | {id: number, code: string, name: string} |
company related info |
| preDate | {from: number, to: number } |
last period time spam, it will be same date of curDate last year |
| curDate | {from: number, to: number } |
it will be from and to of current date |
| reportType | ReportSheetType { BALANCE_SHEET = 'balance_sheet', INCOME_STATEMENT = 'comprehensive_income_statement', CASH_FLOW_STATEMENT = 'cash_flow_statement', REPORT_401 = 'report_401',}
|
Financial Report type |
| general | IAccountReadyForFrontend[] | simplified version of financial report rows |
| details | IAccountReadyForFrontend[] | detail version of financial report rows |
| otherInfo | BalanceSheetOtherInfo | IncomeStatementOtherInfo | CashFlowStatementOtherInfo | base on your financial report type, it will return different info |
| name | type | description |
|---|---|---|
| code | string | code of accounting |
| name | string | name of accounting |
| curPeriodAmount | number | this period amount of money |
| curPeriodAmountString | string | (Recomended)this period amount of money but in string, it will be (brackets) if negative, it will be - if too small |
| curPeriodPercentage | number | percentage of amount vs total amount of that account category |
| curPeriodPercentageString | string | (Recomended)this period number of percntage but in string, it will be (brackets) if negative, it will be - if too small |
| prePeriodAmount | number | last period amount of money |
| prePeriodAmountString | string | (Recomended) last period amount of money percntage but in string, it will be (brackets) if negative, it will be - if too small |
| prePeriodPercentage | number | percentage of amount vs total amount of that account category |
| prePeriodPercentageString | string | (Recomended)last period number of percntage but in string, it will be (brackets) if negative, it will be - if too small |
| indent | number | what level of this account in account tree |
| children | IAccountReadyForFrontend[] | next layer of accounts, can be use to Expand |
| name | type | description |
|---|---|---|
| assetLiabilityRatio | {[date: string]: {data: number[], labels: string[]}} |
data 和 labels 的順序是 [資產, 負債, 權益],key 則是日期 YYYY-MM-DD |
| assetMixRatio | {[date: string]: {data: number[], labels: string[]}} |
data 和 labels 的順序是 [資產, 負債, 權益],key 則是日期 YYYY-MM-DD |
| dso | { curDso: number; preDso: number;} |
應收週轉天數:curDso 是本期,preDso 是上期 |
| inventoryTurnoverDays | { curInventoryTurnoverDays: number; preInventoryTurnoverDays: number; }; |
存貨週轉天數: curInventoryTurnoverDays 是本期, preInventoryTurnoverDays 是上期 |
| name | type | description |
|---|---|---|
| revenueAndExpenseRatio | Check Below | 投入費用和成本, 與收入的倍數關係 |
| revenueToRD | Check Below | 收入提撥制研發費用比例 |
| name | type | description |
|---|---|---|
| revenue | IAccountReadyForFrontend | revenue data of current year income statement |
| totalCost | IAccountReadyForFrontend | total Cost(not expense) of current year income statement |
| salesExpense | IAccountReadyForFrontend | sale expense data of current year income statement |
| administrativeExpense | IAccountReadyForFrontend | admin expense data of current year income statement |
| ratio | {curRatio: number; preRatio: number;}; |
ratio of revenue/(cost + expense) |
| name | type | description |
|---|---|---|
| revenue | IAccountReadyForFrontend | revenue data of current year income statement |
| researchAndDevelopmentExpense | IAccountReadyForFrontend | Research and Development expense of current year income statement |
| ratio | {curRatio: number; preRatio: number;}; |
ratio of revenue/(cost + expense) |
| name | type | description |
|---|---|---|
| operatingStabilized | Check Below | 營業活動穩定度:A 與 B 呈現穩定比例關係,公司的營業活動穩定 |
| lineChartDataForRatio | {data: number[];labels: string[];} |
A 和 b 比例的線圖, labels 依照時間排列 |
| strategyInvest | [year: string]: {data: number[];labels: string[];}; |
依照年份列出 [不動產、廠房、設備的收支項目, 策略性投資項目, 其他] data 是資料內容,labels 是資料名稱 |
| thirdTitle | string | 三:營業活動穩定度 的標題內容 |
| forthTitle | String | 四:投資活動 - 「不動產, 廠房及設備」及 「策略性投資」 的標題內容 |
| fourPointOneTitle | String | 四之一:202X 年度上圖組成支系項及 ISunFa 認為 |
| ourThoughts | String[] (length is 3) | 四之一的 段落內容: outThoughts[0] 是第一段(不動產, 廠房, 設備的收支項目),outThoughts[1] 是第二段(策略性投資項目),outThoughts[2] 是第三段(其他) |
| freeCash | Check Below | 五、年度產生的自由現金圖表資料 |
| name | type | description |
|---|---|---|
| beforeTaxIncome | [year: string]: number | 5 period (current year ~ current year - 4) of income before tax |
| amortizationDepreciation | [year: string]: number | 5 period (current year ~ current year - 4) of amortization and depreciation |
| tax | [year: string]: number | 5 period (current year ~ current year - 4) of tax expense |
| operatingIncomeCashFlow | [year: string]: number | 5 period (current year ~ current year - 4) of operating income cash flow |
| ratio | [year: string]: number | 5 period (current year ~ current year - 4) of (beforeTaxIncome + amortizationDepreciation + tax) / operatingIncomeCashFlow |
freeCash: {
[year: string]: {
operatingCashFlow: number;
ppe: number;
intangibleAsset: number;
freeCash: number;
};
};| name | type | description |
|---|---|---|
| [year] | string | 以年份當作 key, 有今年度和去年度資料 |
| operatingCashFlow | number | 營業活動產生的現金流量 |
| ppe | number | 不動產、廠房及設備的收支項目 |
| intangibleAsset | number | 無形資產的收支項目 |
| freeCash | number | 自由現金流量 |
{
"powerby": "iSunFA v0.8.2+71",
"success": true,
"code": "200ISF0002",
"message": "Get successfully",
"payload": {
"company": {
"id": 10000009,
"code": "11",
"name": "local"
},
"reportType": "balance_sheet",
"preDate": {
"from": 1672534800,
"to": 1675209599
},
"curDate": {
"from": 1704070800,
"to": 1706745599
},
"otherInfo": {
"assetLiabilityRatio": {
"2024-02-01": {
"data": [
50,
12,
38
],
"labels": [
"資產",
"負債",
"權益"
]
},
"2023-02-01": {
"data": [
0,
0,
0
],
"labels": [
"資產",
"負債",
"權益"
]
}
},
"assetMixRatio": {
"2024-02-01": {
"data": [
58,
27,
16,
14,
0
],
"labels": [
"應收帳款淨額",
"不動產、廠房及設備",
"預付款項",
"現金及約當現金",
"透過損益按公允價值衡量之⾦融資產-流動"
]
},
"2023-02-01": {
"data": [
0,
0,
0,
0,
0,
100
],
"labels": [
"應收帳款淨額",
"不動產、廠房及設備",
"預付款項",
"現金及約當現金",
"透過損益按公允價值衡量之⾦融資產-流動",
"其他"
]
}
},
"dso": {
"curDso": -365,
"preDso": 0
},
"inventoryTurnoverDays": {
"curInventoryTurnoverDays": -182.5,
"preInventoryTurnoverDays": 0
}
},
"general": [
{
"code": "11XX",
"name": "流動資產合計",
"curPeriodAmount": 270000,
"curPeriodPercentage": 73,
"curPeriodAmountString": "270,000",
"curPeriodPercentageString": "73",
"prePeriodAmount": 0,
"prePeriodPercentage": 0,
"prePeriodAmountString": "-",
"prePeriodPercentageString": "-",
"indent": 2,
"children": []
},
],
"details": [
{
"code": "1100",
"name": "現金及約當現金",
"curPeriodAmount": 50000,
"curPeriodPercentage": 14,
"curPeriodAmountString": "50,000",
"curPeriodPercentageString": "14",
"prePeriodAmount": 0,
"prePeriodPercentage": 0,
"prePeriodAmountString": "-",
"prePeriodPercentageString": "-",
"indent": 2,
"children": [
{
"code": "1101",
"name": "庫存現金",
"curPeriodAmount": 66000,
"curPeriodPercentage": 18,
"curPeriodAmountString": "66,000",
"curPeriodPercentageString": "18",
"prePeriodAmount": 0,
"prePeriodPercentage": 0,
"prePeriodAmountString": "-",
"prePeriodPercentageString": "-",
"indent": 3,
"children": []
},
]
}
]
}
}- description: create a room
POST /room| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IRoom | response data |
| name | type | description |
|---|---|---|
| id | string | room's id |
| password | string | room's password |
| fileList | IFileBeta[] | list of files in the room |
| name | type | description |
|---|---|---|
| id | string | file's id |
| name | string | file's name |
| size | number | file's size |
| type | string | file's type |
| url | string | file's url |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Create a room successfully",
"payload":
{
"id": 1,
"password": "123456",
"fileList": [
{
"id": 1,
"name": "file1",
"size": 1000,
"type": "pdf",
"url": "https://www.example.com/file1.pdf"
}
]
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get a room by id
POST /room/:roomIdnote: use POST method to get room by id for security reason
| name | type | description | required | default |
|---|---|---|---|---|
| roomId | string | id of the room | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| password | string | room's password | true | -- |
POST /room/1
const body = {
"password":"123321"
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IRoom | response data |
| name | type | description |
|---|---|---|
| id | string | room's id |
| password | string | room's password |
| fileList | IFileBeta[] | list of files in the room |
| name | type | description |
|---|---|---|
| id | string | file's id |
| name | string | file's name |
| size | number | file's size |
| type | string | file's type |
| url | string | file's url |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get a room successfully",
"payload":
{
"id": 1,
"password": "123456",
"fileList": [
{
"id": 1,
"name": "file1",
"size": 1000,
"type": "pdf",
"url": "https://www.example.com/file1.pdf"
}
]
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: delete a room by id
DELETE /room/:roomId| name | type | description | required | default |
|---|---|---|---|---|
| roomId | string | id of the room | true | -- |
DELETE /room/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IRoom | response data |
| name | type | description |
|---|---|---|
| id | string | room's id |
| password | string | room's password |
| fileList | IFileBeta[] | list of files in the room |
| name | type | description |
|---|---|---|
| id | string | file's id |
| name | string | file's name |
| size | number | file's size |
| type | string | file's type |
| url | string | file's url |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Delete a room successfully",
"payload":
{
"id": 1,
"password": "123456",
"fileList": [
{
"id": 1,
"name": "file1",
"size": 1000,
"type": "pdf",
"url": "https://www.example.com/file1.pdf"
}
]
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}description: get the accounting setting of the company
GET /company/:companyId/accounting_setting| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
GET /company/1/accounting_setting| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IAccountingSetting | response data |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| companyId | number | Company ID |
| companyName | string | Name of the company |
| taxSettings | ITaxSetting | Tax settings for the company |
| currency | string | Currency code (e.g., USD, EUR) |
| lastDayOfFiscalYear | number | Last day of the fiscal year |
| shortcutList | IShortcut[] | List of shortcuts defined for the company |
| name | type | description |
|---|---|---|
| salesTax | ITaxRate | Sales tax settings |
| purchaseTax | ITaxRate | Purchase tax settings |
| returnPeriodicity | string | Frequency of tax return (e.g., monthly) |
| name | type | description |
|---|---|---|
| taxable | boolean | Indicates if the item is taxable |
| rate | number | Tax rate percentage |
| name | type | description |
|---|---|---|
| action | IAction | The action that this shortcut performs |
| keyList | string[] | List of keys associated with the shortcut |
| name | type | description |
|---|---|---|
| name | string | Name of the action |
| description | string | Description of the action |
| fieldList | IField[] | List of fields associated with the action |
| name | type | description |
|---|---|---|
| name | string | Name of the field |
| value | string | Value of the field |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get a company accounting setting successfully",
"payload":
{
"id": 1,
"companyId": 1,
"companyName": "iSunFA",
"taxSettings": {
"salesTax": {
"taxable": true,
"rate": 7
},
"purchaseTax": {
"taxable": true,
"rate": 7
},
"returnPeriodicity": "Month"
},
"currency": "USD",
"lastDayOfFiscalYear": 30,
"shortcutList": [
{
"action": {
"name": "Create Invoice",
"description": "Create a new invoice",
"fieldList": [
{
"name": "Customer",
"value": "Customer Name"
},
{
"name": "Amount",
"value": "1000"
}
]
},
"keyList": ["Ctrl", "I"]
}
]
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: update the accounting setting of the company
PUT /company/:companyId/accounting_setting| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
| name | type | description |
|---|---|---|
| taxSettings | ITaxSetting | Tax settings for the company |
| currency | string | Currency code (e.g., USD, EUR) |
| lastDayOfFiscalYear | number | Last day of the fiscal year |
| shortcutList | IShortcut[] | List of shortcuts defined for the company |
| name | type | description |
|---|---|---|
| salesTax | ITaxRate | Sales tax settings |
| purchaseTax | ITaxRate | Purchase tax settings |
| returnPeriodicity | string | Frequency of tax return (e.g., monthly) |
| name | type | description |
|---|---|---|
| taxable | boolean | Indicates if the item is taxable |
| rate | number | Tax rate percentage |
| name | type | description |
|---|---|---|
| action | IAction | The action that this shortcut performs |
| keyList | string[] | List of keys associated with the shortcut |
| name | type | description |
|---|---|---|
| name | string | Name of the action |
| description | string | Description of the action |
| fieldList | IField[] | List of fields associated with the action |
| name | type | description |
|---|---|---|
| name | string | Name of the field |
| value | string | Value of the field |
PUT /company/1/accounting_setting
const body = {
"taxSettings": {
"salesTax": {
"taxable": true,
"rate": 7
},
"purchaseTax": {
"taxable": true,
"rate": 7
},
"returnPeriodicity": "Month"
},
"currency": "USD",
"lastDayOfFiscalYear": 30,
"shortcutList": [
{
"action": {
"name": "Create Invoice",
"description": "Create a new invoice",
"fieldList": [
{
"name": "Customer",
"value": "Customer Name"
},
{
"name": "Amount",
"value": "1000"
}
]
},
"keyList": ["Ctrl", "I"]
}
]
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IAccountingSetting | response data |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| companyId | number | Company ID |
| companyName | string | Name of the company |
| taxSettings | ITaxSetting | Tax settings for the company |
| currency | string | Currency code (e.g., USD, EUR) |
| lastDayOfFiscalYear | number | Last day of the fiscal year |
| shortcutList | IShortcut[] | List of shortcuts defined for the company |
| name | type | description |
|---|---|---|
| salesTax | ITaxRate | Sales tax settings |
| purchaseTax | ITaxRate | Purchase tax settings |
| returnPeriodicity | string | Frequency of tax return (e.g., monthly) |
| name | type | description |
|---|---|---|
| taxable | boolean | Indicates if the item is taxable |
| rate | number | Tax rate percentage |
| name | type | description |
|---|---|---|
| action | IAction | The action that this shortcut performs |
| keyList | string[] | List of keys associated with the shortcut |
| name | type | description |
|---|---|---|
| name | string | Name of the action |
| description | string | Description of the action |
| fieldList | IField[] | List of fields associated with the action |
| name | type | description |
|---|---|---|
| name | string | Name of the field |
| value | string | Value of the field |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get a company accounting setting successfully",
"payload":
{
"id": 1,
"companyId": 1,
"companyName": "iSunFA",
"taxSettings": {
"salesTax": {
"taxable": true,
"rate": 7
},
"purchaseTax": {
"taxable": true,
"rate": 7
},
"returnPeriodicity": "Month"
},
"currency": "USD",
"lastDayOfFiscalYear": 30,
"shortcutList": [
{
"action": {
"name": "Create Invoice",
"description": "Create a new invoice",
"fieldList": [
{
"name": "Customer",
"value": "Customer Name"
},
{
"name": "Amount",
"value": "1000"
}
]
},
"keyList": ["Ctrl", "I"]
}
]
},
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get the accounting accounts of the company
GET /company/:companyId/accounting_setting/account| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
GET /company/1/accounting_setting/account| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | { code: string, name: string, note: string }[] | response data |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get accounting accounts of the company successfully",
"payload": [
{
"code": "1755",
"name": "Royalty assets",
"note": ""
},
{
"code": "1780",
"name": "Intangible assets",
"note": "test216546"
},
{
"code": "1920",
"name": "Deposit of Margin",
"note": ""
},
{
"code": "1990",
"name": "Other non-current assets",
"note": "rrrrr"
}
]
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: create a sub accounting account of the company
POST /company/:companyId/accounting_setting/account| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
| name | type | description |
|---|---|---|
| code | string | code of the account |
| name | string | name of the account |
| note | string | note of the account |
POST /company/1/accounting_setting/account
const body = {
"code": "1755",
"name": "Sub royalty assets",
"note": "123"| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | subAccount | response data |
| name | type | description |
|---|---|---|
| accountingType | string | type of account, (e.g., Assets) |
| assetType | string | category type, (e.g., Non-Current Assets) |
| currentAssetType | string | type of current Asset, (e.g., Consolidated financial assets) |
| code | string | sub account Code |
| name | string | sub account name |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Create a sub accounting account of the company successfully",
"payload":
{
"accountingType": "Assets",
"assetType": "Non-Current Assets",
"currentAssetType": "Consolidated financial assets",
"code": "1755-01",
"name": "Sub royalty assets"
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get a sub accounting account of the company
GET /company/:companyId/account/:accountId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
| accountId | string | id of the account | true | -- |
GET /company/1/account/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | subAccount | response data |
| name | type | description |
|---|---|---|
| accountingType | string | type of account, (e.g., Assets) |
| assetType | string | category type, (e.g., Non-Current Assets) |
| currentAssetType | string | type of current Asset, (e.g., Consolidated financial assets) |
| code | string | sub account Code |
| name | string | sub account name |
| note | string | note of the account |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get a sub accounting account of the company successfully",
"payload":
{
"accountingType": "Assets",
"assetType": "Non-Current Assets",
"currentAssetType": "Consolidated financial assets",
"code": "1755-01",
"name": "Sub royalty assets",
"note": "this is a note"
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: update a sub accounting account of the company
PUT /company/:companyId/account/:accountId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
| accountId | string | id of the account | true | -- |
| name | type | description |
|---|---|---|
| code | string | code of the account |
| name | string | name of the account |
| note | string | note of the account |
PUT /company/1/account/1
const body = {
"code": "1755",
"name": "Sub royalty assets",
"note": ""
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | subAccount | response data |
| name | type | description |
|---|---|---|
| accountingType | string | type of account, (e.g., Assets) |
| assetType | string | category type, (e.g., Non-Current Assets) |
| currentAssetType | string | type of current Asset, (e.g., Consolidated financial assets) |
| code | string | sub account Code |
| name | string | sub account name |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Update a sub accounting account of the company successfully",
"payload":
{
"accountingType": "Assets",
"assetType": "Non-Current Assets",
"currentAssetType": "Consolidated financial assets",
"code": "1755-01",
"name": "Sub royalty assets"
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: delete a sub accounting account of the company
DELETE /company/:companyId/account/:accountId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | id of the company | true | -- |
| accountId | string | id of the account | true | -- |
DELETE /company/1/account/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | subAccount | response data |
| name | type | description |
|---|---|---|
| accountingType | string | type of account, (e.g., Assets) |
| assetType | string | category type, (e.g., Non-Current Assets) |
| currentAssetType | string | type of current Asset, (e.g., Consolidated financial assets) |
| code | string | sub account Code |
| name | string | sub account name |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Delete a sub accounting account of the company successfully",
"payload":
{
"accountingType": "Assets",
"assetType": "Non-Current Assets",
"currentAssetType": "Consolidated financial assets",
"code": "1755-01",
"name": "Sub royalty assets"
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: List all jobs
GET /job| name | type | description | required |
|---|---|---|---|
| page | number | The page number | no |
| pageSize | number | The number of items per page | no |
| sortBy | string | The field to sort by | no |
| sortOrder | string | The order to sort by | no |
| startDate | number | The start date | no |
| endDate | number | The end date | no |
| searchQuery | string | The search query | no |
| isMatched | boolean | Whether the job is matched | no |
GET /job?page=1&pageSize=10&sortBy=createdAt&sortOrder=desc&startDate=1630000001&endDate=1630000001&searchQuery=accounting| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaginatedData<IJob[]> | response data |
| name | type | description |
|---|---|---|
| data | IJob[] | The job data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| name | type | description |
|---|---|---|
| id | number | job ID |
| companyName | string | company name |
| companyLogo | string | company logo URL |
| issueType | string | type of job |
| publicationDate | number | publication date (timestamp) |
| estimatedWorkingHours | object | estimated working hours range |
| deadline | number | deadline (timestamp) |
| hourlyWage | number | hourly wage |
| caseDescription | string | case description |
| targetCandidates | string | target candidates description |
| remarks | string | remarks |
| applicationsCount | number | number of applications |
| isMatched | boolean | whether the job is matched |
| createdAt | number | creation time (timestamp) |
| updatedAt | number | last update time (timestamp) |
- Successful response
{
"powerby": "iSunFA v2.0.0+4",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"id": 2,
"companyName": "B 公司",
"companyLogo": "https://example.com/company-b-logo.png",
"issueType": "稅務",
"publicationDate": 1692499600,
"estimatedWorkingHours": {
"start": 1693526400,
"end": 1698768000
},
"deadline": 1699920000,
"hourlyWage": 600,
"caseDescription": "協助處理年度稅務申報",
"targetCandidates": "有稅務申報經驗的會計師或記帳士",
"remarks": "需要了解最新的稅務法規",
"applicationsCount": 3,
"isMatched": true,
"createdAt": 1692489600,
"updatedAt": 1692489600
},
{
"id": 1,
"companyName": "A 公司",
"companyLogo": "https://example.com/company-a-logo.png",
"issueType": "記帳",
"publicationDate": 1692489600,
"estimatedWorkingHours": {
"start": 1693008000,
"end": 1695600000
},
"deadline": 1696032000,
"hourlyWage": 500,
"caseDescription": "上傳相關憑證,徵求記帳士開立傳票",
"targetCandidates": "具有3年以上記帳經驗的記帳士",
"remarks": "需要熟悉國際會計準則",
"applicationsCount": 5,
"isMatched": false,
"createdAt": 1692489600,
"updatedAt": 1692489600
}
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "publicationDate",
"sortOrder": "desc"
}
]
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Get details of a specific job
GET /job/:jobId| name | type | description | required | default |
|---|---|---|---|---|
| jobId | string | ID of the job | true | -- |
GET /job/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | Job | response data |
| name | type | description |
|---|---|---|
| id | number | job ID |
| companyName | string | company name |
| companyLogo | string | company logo URL |
| issueType | string | type of job |
| publicationDate | number | publication date (timestamp) |
| estimatedWorkingHours | object | estimated working hours range |
| deadline | number | deadline (timestamp) |
| hourlyWage | number | hourly wage |
| caseDescription | string | case description |
| targetCandidates | string | target candidates description |
| remarks | string | remarks |
| applicationsCount | number | number of applications |
| isMatched | boolean | whether the job is matched |
| createdAt | number | creation time (timestamp) |
| updatedAt | number | last update time (timestamp) |
Response Example
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Successfully retrieved job details",
"payload": {
"id": 1,
"companyName": "iSunCloud",
"companyLogo": "https://example.com/isuncloud-logo.png",
"issueType": "Accounting",
"publicationDate": 1706227200000,
"estimatedWorkingHours": {
"start": 1711584000000,
"end": 1743120000000
},
"deadline": 1743120000000,
"hourlyWage": 2500,
"caseDescription": "This is a description of an accounting case.",
"targetCandidates": "A bookkeeper with tax experience.",
"remarks": "None",
"applicationsCount": 10,
"isMatched": false,
"createdAt": 1706227200000,
"updatedAt": 1706227200000
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Create an application for a job
POST /job/:jobId/application| name | type | description | required | default |
|---|---|---|---|---|
| jobId | string | ID of the job | true | -- |
| name | type | description |
|---|---|---|
| content | string | application content |
POST /job/1/application
const body = {
"content": "application content",
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | Application | response data |
| name | type | description |
|---|---|---|
| id | number | application ID |
| bookkeeperId | number | bookkeeper's ID |
| jobId | number | job ID |
| content | string | application content |
| createdAt | number | creation time |
| updatedAt | number | last update time |
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Application created successfully",
"payload":
{
"id": 1,
"bookkeeperId": 1000,
"jobId": 1,
"content": "application content",
"createdAt": 1630000000,
"updatedAt": 1630000000
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: list news
GET news| name | type | description | required |
|---|---|---|---|
| simple | boolean | simple mode | no |
| type | string | news type | no |
| targetPage | string | target page | no |
| pageSize | number | page size | no |
| startDate | number | start date | no |
| endDate | number | end date | no |
| searchQuery | string | search query | no |
GET news?simple=false&type=company&targetPage=1&pageSize=10&startDate=1630000001&endDate=1630000001&searchQuery=apple| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaginatedData<INews[]> | INews[] |
| name | type | description |
|---|---|---|
| data | INews[] | The news data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| name | type | description |
|---|---|---|
| id | number | news's id |
| imageId | string | news's image id |
| title | string | news's title |
| content | string | news's content |
| type | string | news's type |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "List news successfully",
"payload":
{
"data": [
{
"id": 1,
"imageId": "1",
"title": "apple",
"content": "apple",
"type": "company",
"createdAt": 1630000001,
"updatedAt": 1630000001,
"deletedAt": null,
}
],
"page": 1,
"totalPages": 1,
"totalCount": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "createdAt",
"sortOrder": "desc"
}
]
},
}- 成功的回傳(simple)
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "List news successfully",
"payload":
[
{
"id": 1,
"imageId": "1",
"title": "apple",
"content": "apple",
"type": "company",
"createdAt": 1630000001,
"updatedAt": 1630000001,
"deletedAt": null,
}
],
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: get news by id
GET news/:newsId| name | type | description | required | default |
|---|---|---|---|---|
| newsId | string | news id | true | -- |
GET news/1| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | INews | response data |
| name | type | description |
|---|---|---|
| id | number | news's id |
| imageId | string | news's image id |
| title | string | news's title |
| content | string | news's content |
| type | string | news's type |
| createdAt | number | create time |
| updatedAt | number | update time |
| deletedAt | number | delete time |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Get news successfully",
"payload":
{
"id": 1,
"imageId": "1",
"title": "apple",
"content": "apple",
"type": "company",
"createdAt": 1630000001,
"updatedAt": 1630000001,
"deletedAt": null,
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: This API is used to sign out an user by clearing the FIDO2 cookie.
POST `/sign-out`POST `/sign-out`| name | type | description |
|---|---|---|
| success | boolean | indicates whether the operation was successful |
| message | string | provides a message related to the success or failure of the operation. |
-
Successful Response
{ "success": true, "message": "Successfully signed out" } -
Unsuccessful Response
{ "success": false, "message": "Failed to sign out" }
- Description: This API provides the functionality to retrieve session information.
GET /status_infoGET /status_info| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.9.1+91 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | Object | Detailed session information payload |
The payload contains the following objects: User, Role, Company, Team, and Teams array.
| name | type | description |
|---|---|---|
| id | number | Unique user identifier |
| name | string | User's name |
| string | User's email address | |
| imageId | string | URL of the user's image |
| agreementList | string[] | List of agreement hashes |
| createdAt | number | Timestamp when the user was created |
| updatedAt | number | Timestamp when the user was last updated |
| deletedAt | number | Deletion flag (0 indicates not deleted) |
| name | type | description |
|---|---|---|
| id | number | Role identifier |
| type | string | Type of the role (e.g., "User") |
| name | string | Role name |
| permissions | string[] | List of permissions assigned to the role |
| createdAt | number | Timestamp when the role was created |
| updatedAt | number | Timestamp when the role was last updated |
| name | type | description |
|---|---|---|
| id | number | Company identifier |
| name | string | Company name |
| taxId | string | Company tax identification number |
| startDate | number | Timestamp for the company's start date |
| createdAt | number | Timestamp when the company was created |
| updatedAt | number | Timestamp when the company was last updated |
| imageId | string | URL of the company image |
| name | type | description |
|---|---|---|
| id | number | Team identifier |
| imageId | string | URL of the team's image |
| role | string | Role within the team (e.g., "OWNER", "EDITOR") |
| name | object | Object containing the team name with value and editability |
| about | object | Object containing the team description with value and editability |
| profile | object | Object containing the team profile with value and editability |
| planType | object | Object detailing the team subscription plan with value and editability |
| totalMembers | number | Total number of team members |
| totalAccountBooks | number | Total number of account books under the team |
| bankAccount | object | Object containing bank account information with value and editability |
| name | type | description |
|---|---|---|
| company | Company | Contains detailed company information (see below) |
| tag | string | Tag indicating additional company status (e.g., "all") |
| order | number | Ordering number |
| role | Object | Role associated with the company (see Role object structure) |
| team | Team | Team information associated with the company (see Team structure) |
| isTransferring | boolean | Indicates whether the company's team is currently transferring |
Array of team objects that the user belongs to. Each team object has the same structure as the Team object described above.
Successful response:
{
"powerby": "iSunFA v0.9.1+95",
"success": true,
"code": "200ISF0002",
"message": "Get successfully",
"payload": {
"user": {
"id": 10000003,
"name": "Shirley Chang",
"email": "shirley.chang@mermer.cc",
"imageId": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"agreementList": [
"dd5670d2ac91405dc01d4655a1cd22cef8f2602bdafb94aef2ccc93a2c20c69a",
"05b58e30c03a54fd1b060a8112ac0edee9c759b05f428ea50c982bb8c57443f2"
],
"createdAt": 1725372460,
"updatedAt": 1725372460,
"deletedAt": 0
},
"role": {
"id": 1006,
"type": "User",
"name": "Bookkeeper",
"permissions": [],
"createdAt": 1,
"updatedAt": 1
},
"company": {
"company": {
"id": 10000831,
"imageId": "https://storage.googleapis.com/mermer-offical-km/ISunFa/35ee5da5-60fa-442c-9a42-9513c1a78576.svg",
"name": "煥然一新",
"taxId": "51305001405600",
"startDate": 1733130972,
"createdAt": 1733130972,
"updatedAt": 1733130972
},
"tag": "all",
"order": 0,
"role": {
"id": 0,
"name": "EDITOR",
"permissions": [],
"createdAt": 0,
"updatedAt": 0
},
"team": {
"id": 5,
"imageId": "/images/fake_team_img.svg",
"role": "EDITOR",
"name": {
"value": "Luphia Chang's Team",
"editable": true
},
"about": {
"value": "",
"editable": true
},
"profile": {
"value": "",
"editable": true
},
"planType": {
"value": "BEGINNER",
"editable": false
},
"totalMembers": 3,
"totalAccountBooks": 5,
"bankAccount": {
"value": "-",
"editable": true
}
},
"isTransferring": false
},
"teams": [
{
"id": 5,
"imageId": "/images/fake_team_img.svg",
"role": "EDITOR",
"name": {
"value": "Luphia Chang's Team",
"editable": true
},
"about": {
"value": "",
"editable": true
},
"profile": {
"value": "",
"editable": true
},
"planType": {
"value": "BEGINNER",
"editable": false
},
"totalMembers": 3,
"totalAccountBooks": 7,
"bankAccount": {
"value": "-",
"editable": true
}
},
{
"id": 6,
"imageId": "https://storage.googleapis.com/mermer-offical-km/ISunFa/403d88b6-0f50-4fa0-ae0a-72861e007e56.png",
"role": "OWNER",
"name": {
"value": "Shirley Chang's Team",
"editable": true
},
"about": {
"value": "",
"editable": true
},
"profile": {
"value": "",
"editable": true
},
"planType": {
"value": "BEGINNER",
"editable": false
},
"totalMembers": 3,
"totalAccountBooks": 14,
"bankAccount": {
"value": "-",
"editable": true
}
},
{
"id": 75,
"imageId": "/images/fake_team_img.svg",
"role": "OWNER",
"name": {
"value": "test4",
"editable": true
},
"about": {
"value": "",
"editable": true
},
"profile": {
"value": "",
"editable": true
},
"planType": {
"value": "BEGINNER",
"editable": false
},
"totalMembers": 1,
"totalAccountBooks": 0,
"bankAccount": {
"value": "-",
"editable": true
}
},
{
"id": 76,
"imageId": "/images/fake_team_img.svg",
"role": "OWNER",
"name": {
"value": "test5",
"editable": true
},
"about": {
"value": "",
"editable": true
},
"profile": {
"value": "",
"editable": true
},
"planType": {
"value": "BEGINNER",
"editable": false
},
"totalMembers": 1,
"totalAccountBooks": 0,
"bankAccount": {
"value": "-",
"editable": true
}
}
]
}
}Failure response:
{
"powerby": "iSunFA v0.9.1+95",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": {
"user": null,
"role": null,
"company": null,
"teams": null
}
}- Description: List all trial balance items
GET /company/:companyId/trial_balance| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| companyId | string | Company ID | Yes | -- |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| startDate | number | Start date (timestamp, seconds) | Yes | -- |
| endDate | number | End date (timestamp, seconds) | Yes | -- |
| sortOption | string | Sort options sortBy:sortOrder multiple conditions separated by -
|
No | beginningCreditAmount:desc |
| page | number | Page number | No | 1 |
| pageSize | number | Items per page | No | 10 |
GET /company/10000/trial_balance?startDate=1728802871&endDate=1731524471&page=1&pageSize=10&sortOption=EndingDebitAmount:desc| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Trial balance data |
| Name | Type | Description |
|---|---|---|
| currencyAlias | string | Currency of the trial balance |
| items | IPaginatedData<TrialBalanceItem[]> | Paginated list of trial balance items |
| total | ITrialBalanceTotal | Total amount |
| Name | Type | Description |
|---|---|---|
| data | TrialBalanceItem[] | Trial balance item list |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of trial balance items |
| pageSize | number | Items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | Sort method |
| Name | Type | Description |
|---|---|---|
| id | number | Account ID |
| no | string | Account number |
| accountingTitle | string | Accounting title |
| beginningCreditAmount | number | Beginning credit balance |
| beginningDebitAmount | number | Beginning debit balance |
| midtermCreditAmount | number | Current period credit transactions |
| midtermDebitAmount | number | Current period debit transactions |
| endingCreditAmount | number | Ending credit balance |
| endingDebitAmount | number | Ending debit balance |
| createAt | number | Creation timestamp, seconds |
| updateAt | number | Last update timestamp, seconds |
| deletedAt | number | Deletion timestamp, seconds |
| subAccounts | TrialBalanceItem[] | List of sub-accounts |
| Name | Type | Description |
|---|---|---|
| beginningCreditAmount | number | Beginning credit balance |
| beginningDebitAmount | number | Beginning debit balance |
| midtermCreditAmount | number | Current period credit transactions |
| midtermDebitAmount | number | Current period debit transactions |
| endingCreditAmount | number | Ending credit balance |
| endingDebitAmount | number | Ending debit balance |
| createAt | number | Creation timestamp, seconds |
| updateAt | number | Last update timestamp, seconds |
- Successful response
{
"powerby": "iSunFA v0.9.0+35",
"success": true,
"code": "200ISF0001",
"message": "List successfully",
"payload": {
"data": [
{
"id": 1603,
"no": "1103",
"accountingTitle": "銀行存款",
"beginningCreditAmount": 0,
"beginningDebitAmount": 0,
"midtermCreditAmount": 544064,
"midtermDebitAmount": 1004040,
"endingCreditAmount": 544064,
"endingDebitAmount": 1004040,
"createAt": 0,
"updateAt": 0,
"subAccounts": [
{
"id": 16030,
"no": "1103-0",
"accountingTitle": "銀行存款-虛擬會計科目(原1103)",
"beginningCreditAmount": 0,
"beginningDebitAmount": 0,
"midtermCreditAmount": 0,
"midtermDebitAmount": 0,
"endingCreditAmount": 0,
"endingDebitAmount": 0,
"createAt": 0,
"updateAt": 0,
"subAccounts": []
},
{
"id": 10001571,
"no": "1103-17",
"accountingTitle": "銀行存款-富邦活存",
"beginningCreditAmount": 0,
"beginningDebitAmount": 0,
"midtermCreditAmount": 544064,
"midtermDebitAmount": 1004040,
"endingCreditAmount": 544064,
"endingDebitAmount": 1004040,
"createAt": 0,
"updateAt": 0,
"subAccounts": []
}
]
}
],
"page": 1,
"totalPages": 17,
"totalCount": 17,
"pageSize": 1,
"hasNextPage": true,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "BeginningCreditAmount",
"sortOrder": "desc"
}
],
"note": "{\"currencyAlias\":\"TWD\",\"total\":{\"beginningCreditAmount\":0,\"beginningDebitAmount\":0,\"midtermCreditAmount\":1331625,\"midtermDebitAmount\":1670776,\"endingCreditAmount\":1331625,\"endingDebitAmount\":1670776,\"createAt\":0,\"updateAt\":0}}"
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": {}
}- Description: List ledger details for a specific accounting account range
GET /company/:companyId/ledger| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| companyId | string | Company ID | Yes | -- |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| startDate | number | Start date (timestamp, seconds) | Yes | -- |
| endDate | number | End date (timestamp, seconds) | Yes | -- |
| startAccountNo | string | Starting account number | No | -- |
| endAccountNo | string | Ending account number | No | -- |
| labelType | string | Label type (general/detailed/all) | No | general |
| page | number | Page number | No | 1 |
| pageSize | number | Items per page | No | 10 |
GET /company/1/ledger?startDate=1706745600&endDate=1707350399&startAccountNo=1141&endAccountNo=1142&labelType=general&page=1&pageSize=10| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Ledger data |
| Name | Type | Description |
|---|---|---|
| currencyAlias | string | Currency |
| items | IPaginatedData<LedgerItem[]> | Paginated list of ledger items |
| total | ILedgerTotal | Information about total debit and credit amount |
| Name | Type | Description |
|---|---|---|
| data | LedgerItem[] | Ledger item list |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of ledger items |
| pageSize | number | Items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | Sort method |
| Name | Type | Description |
|---|---|---|
| id | number | Ledger item ID |
| voucherDate | number | Voucher date, timestamp, seconds |
| no | string | Account number |
| accountingTitle | string | Accounting title |
| voucherNumber | string | Voucher number |
| particulars | string | Details |
| debitAmount | number | Debit amount |
| creditAmount | number | Credit amount |
| balance | number | Balance |
| createdAt | number | Creation timestamp, seconds |
| updatedAt | number | Last update timestamp, seconds |
| Name | Type | Description |
|---|---|---|
| totalDebitAmount | number | Total debit amount |
| totalCreditAmount | number | Total credit amount |
| createdAt | number | Creation timestamp, seconds |
| updatedAt | number | Last update timestamp, seconds |
- Successful response
{
"powerby": "iSunFA v0.9.0+35",
"success": true,
"code": "200ISF0001",
"message": "List successfully",
"payload": {
"data": [
{
"id": 10006000,
"accountId": 10001571,
"voucherId": 10002061,
"voucherDate": 1662566400,
"no": "1103-17",
"accountingTitle": "銀行存款-富邦活存",
"voucherNumber": "20220907002",
"voucherType": "expense",
"particulars": "8月份租扣、租金二代-敦化北路",
"debitAmount": 0,
"creditAmount": 9506,
"balance": -9506,
"createdAt": 1736393844,
"updatedAt": 1736393844
}
],
"page": 1,
"totalPages": 60,
"totalCount": 60,
"pageSize": 1,
"hasNextPage": true,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "voucherDate",
"sortOrder": "asc"
}
],
"note": "{\"currencyAlias\":\"TWD\",\"total\":{\"totalDebitAmount\":2275075,\"totalCreditAmount\":2275075,\"createdAt\":0,\"updatedAt\":0}}"
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- description: List all assets
GET /company/:companyId/asset| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| page | number | Page number | no | 1 |
| pageSize | number | Items per page | no | 10 |
| type | string | Asset type | no | -- |
| status | string | Asset status | no | -- |
| startDate | number | Start of time range (timestamp, seconds) | no | -- |
| endDate | number | End of time range (timestamp, seconds) | no | -- |
| searchQuery | string | Search keyword | no | -- |
| sortOption | string | Sort options sortBy:sortOrder multiple conditions separated by -
|
no | AcquisitionDate:desc |
Available fields for sorting:
-
AcquisitionDate- Acquisition date -
PurchasePrice- Purchase price -
AccumulatedDepreciation- Accumulated depreciation -
ResidualValue- Residual value -
RemainingLife- Remaining useful life (timestamp, seconds)
-
asc- ascending -
desc- descending
GET /company/1/asset?page=2&sortOption=PurchasePrice:desc-ResidualValue:desc&startDate=1704067200&endDate=1704067200&type=1691&searchQuery=000001&page=1| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IPaginatedData<IAssetItem[]> | Data containing asset list |
| name | type | description |
|---|---|---|
| data | Asset[] | Asset list |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of items |
| pageSize | number | Items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | Sort method |
| name | type | description |
|---|---|---|
| id | number | Asset ID |
| currencyAlias | string | Currency |
| acquisitionDate | number | Acquisition date (timestamp, seconds) |
| assetType | string | Accounting subject |
| assetNumber | string | Asset number |
| assetName | string | Asset name |
| purchasePrice | number | Purchase price |
| accumulatedDepreciation | number | Accumulated depreciation |
| residualValue | number | Residual value |
| remainingLife | number | Remaining useful life (timestamp, seconds) |
| assetStatus | string | Asset status |
| createdAt | number | Creation time (timestamp, seconds) |
| updatedAt | number | Update time (timestamp, seconds) |
| deletedAt | number | Deletion time (timestamp, seconds) |
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"id": 1,
"currencyAlias": "TWD",
"acquisitionDate": 1632511200,
"assetType": "123 Machinery",
"assetNumber": "A-000010",
"assetName": "MackBook",
"purchasePrice": 100000,
"accumulatedDepreciation": 5000,
"residualValue": 5000,
"remainingLife": 61580800,
"assetStatus": "normal",
"createdAt": 1632511200,
"updatedAt": 1632511200,
"deletedAt": null
},
// ...
],
"page": 1,
"totalPages": 10,
"totalCount": 100,
"pageSize": 10,
"hasNextPage": true,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "acquisitionDate",
"sortOrder": "desc"
}
]
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Get details of a single asset
GET /company/:companyId/asset/:assetId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| assetId | string | Asset ID | yes | -- |
GET /company/1/asset/1| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | Asset | Asset details data |
| name | type | description |
|---|---|---|
| id | number | Asset ID |
| acquisitionDate | number | Acquisition date (timestamp, seconds) |
| assetType | string | Accounting subject |
| assetNumber | string | Asset number |
| assetName | string | Asset name |
| purchasePrice | number | Purchase price |
| accumulatedDepreciation | number | Accumulated depreciation |
| residualValue | number | Residual value |
| remainingLife | number | Remaining useful life (timestamp, seconds) |
| assetStatus | string | Asset status |
| currencyAlias | string | Currency |
| depreciationStart | number | Depreciation start time, timestamp in seconds |
| depreciationMethod | string | Depreciation method |
| usefulLife | number | Useful life (timestamp, seconds) |
| relatedVouchers | IRelatedVoucher[] | Related vouchers |
| note | string | Remarks |
| createdAt | number | Creation time (timestamp, seconds) |
| updatedAt | number | Update time (timestamp, seconds) |
| deletedAt | number | Deletion time (timestamp, seconds) |
| name | type | description |
|---|---|---|
| id | number | Voucher ID |
| number | string | Voucher number |
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200ISF0000",
"message": "Successfully retrieved asset details",
"payload": {
"id": 1,
"acquisitionDate": 1234567890,
"assetType": "Equipment",
"assetNumber": "EQ-001",
"assetName": "Office Computer",
"purchasePrice": 50000,
"accumulatedDepreciation": 10000,
"residualValue": 40000,
"remainingLife": 1560000,
"assetStatus": "normal",
"currencyAlias": "TWD",
"depreciationStart": 1234567890,
"depreciationMethod": "straight-line",
"usefulLife": 6000000,
"relatedVouchers": [
{"id": 101, "number": "V-2023-001"},
{"id": 102, "number": "V-2023-002"}
],
"note": "Main office computer",
"createdAt": 1234567000,
"updatedAt": 1234568000,
"deletedAt": null
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Create a new asset
POST /company/:companyId/asset| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required |
|---|---|---|---|
| assetName | string | Name | yes |
| assetType | string | Accounting subject | yes |
| assetNumber | string | Property number | yes |
| acquisitionDate | string | Acquisition time, timestamp in seconds | yes |
| purchasePrice | number | Purchase price | yes |
| residualValue | number | Residual value | yes |
| amount | number | Amount | yes |
| depreciationStart | string | Depreciation start time, timestamp in seconds | no |
| depreciationMethod | string | Depreciation method | no |
| usefulLife | number | Useful life (timestamp, seconds) | no |
| note | string | Remarks | no |
POST /company/1/asset
const body = {
"assetName": "New Office Laptop",
"assetType": "1602",
"assetNumber": "NEW office eq",
"acquisitionDate": 1234567890,
"purchasePrice": 30000,
"residualValue": 30000,
"amount": 1,
"depreciationStart": 1234567890,
"depreciationMethod": "straight_line",
"usefulLife": 36000,
"note": "Laptop for new employee"
}| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | Asset | Newly created asset data |
| name | type | description |
|---|---|---|
| id | number | Asset ID |
| name | string | Asset Name |
| number | string | Asset Number |
| companyId | number | Company ID |
| status | string | Asset Status |
| createdAt | number | Creation Time (timestamp, seconds) |
| updatedAt | number | Update Time (timestamp, seconds) |
| note | string | Remarks |
- Successful response
{
"powerby": "iSunFA v0.8.5+157",
"success": true,
"code": "201ISF0000",
"message": "Created successfully",
"payload": {
"id": 10122865,
"name": "New Office Laptop",
"number": "NEW office eq-5e392086-fb33-409e-a2d9-39e0be9b9014-000001",
"companyId": 10000003,
"status": "normal",
"createdAt": 1733471154,
"updatedAt": 1733471154,
"note": "Laptop for new employee"
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- description: Update asset information
PUT /company/:companyId/asset/:assetId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| assetId | string | Asset ID | yes | -- |
| name | type | description | required |
|---|---|---|---|
| assetName | string | Asset name | no |
| assetStatus | string | Asset status | no |
| acquisitionDate | number | Acquisition time, timestamp in seconds | no |
| purchasePrice | number | Purchase price | no |
| depreciationStart | number | Depreciation start time, timestamp in seconds | no |
| depreciationMethod | string | Depreciation method | no |
| usefulLife | number | Useful life (seconds) | no |
| residualValue | number | Residual value | no |
| note | string | Note | no |
| updateDate | number | Update time for asset status, timestamp in seconds | no |
PUT /company/1/asset/2
const body = {
"assetName": "new asset name~",
"acquisitionDate": 1733889697,
"assetStatus": "normal",
"purchasePrice": 30000,
"depreciationStart": 1733889697,
"depreciationMethod": "straight_line",
"usefulLife": 2592000,
"residualValue": 30000,
"note": "new note by updating asset API",
"updateDate": 1733889697
}| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | Asset | Updated asset data |
| name | type | description |
|---|---|---|
| id | number | Asset ID |
| acquisitionDate | number | Acquisition date (timestamp, seconds) |
| assetType | string | Accounting subject |
| assetNumber | string | Asset number |
| assetName | string | Asset name |
| purchasePrice | number | Purchase price |
| accumulatedDepreciation | number | Accumulated depreciation |
| residualValue | number | Residual value |
| remainingLife | number | Remaining useful life (timestamp, seconds) |
| assetStatus | string | Asset status |
| currencyAlias | string | Currency |
| depreciationStart | number | Depreciation start time, timestamp in seconds |
| depreciationMethod | string | Depreciation method |
| usefulLife | number | Useful life (timestamp, seconds) |
| relatedVouchers | IRelatedVoucher[] | Related vouchers |
| note | string | Remarks |
| createdAt | number | Creation time (timestamp, seconds) |
| updatedAt | number | Update time (timestamp, seconds) |
| deletedAt | number | Deletion time (timestamp, seconds) |
| name | type | description |
|---|---|---|
| id | number | Voucher ID |
| number | string | Voucher number |
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200ISF0000",
"message": "Asset updated successfully",
"payload": {
"id": 2,
"acquisitionDate": 1234567890,
"assetType": "Equipment",
"assetNumber": "EQ-001",
"assetName": "Office Computer",
"purchasePrice": 50000,
"accumulatedDepreciation": 10000,
"residualValue": 40000,
"remainingLife": 1560000,
"assetStatus": "missing",
"currencyAlias": "TWD",
"depreciationStart": 1234567890,
"depreciationMethod": "straight-line",
"usefulLife": 6000000,
"relatedVouchers": [
{"id": 101, "number": "V-2023-001"},
{"id": 102, "number": "V-2023-002"}
],
"createdAt": 1234567000,
"updatedAt": 2234568000,
"deletedAt": null,
"note": "Updated: Laptop for marketing team",
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Soft delete an asset
DELETE /company/:companyId/asset/:assetId| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| assetId | string | Asset ID | yes | -- |
DELETE /company/1/asset/2| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | Asset | Asset details data |
| name | type | description |
|---|---|---|
| id | number | Asset ID |
| acquisitionDate | number | Acquisition date (timestamp, seconds) |
| assetType | string | Accounting subject |
| assetNumber | string | Asset number |
| assetName | string | Asset name |
| purchasePrice | number | Purchase price |
| accumulatedDepreciation | number | Accumulated depreciation |
| residualValue | number | Residual value |
| remainingLife | number | Remaining useful life (timestamp, seconds) |
| assetStatus | string | Asset status |
| currencyAlias | string | Currency |
| depreciationStart | number | Depreciation start time, timestamp in seconds |
| depreciationMethod | string | Depreciation method |
| usefulLife | number | Useful life (timestamp, seconds) |
| relatedVouchers | IRelatedVoucher[] | Related vouchers |
| note | string | Remarks |
| createdAt | number | Creation time (timestamp, seconds) |
| updatedAt | number | Update time (timestamp, seconds) |
| deletedAt | number | Deletion time (timestamp, seconds) |
| name | type | description |
|---|---|---|
| id | number | Voucher ID |
| number | string | Voucher number |
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200ISF0000",
"message": "Asset deleted successfully",
"payload": {
"id": 1,
"acquisitionDate": 1234567890,
"assetType": "Equipment",
"assetNumber": "EQ-001",
"assetName": "Office Computer",
"purchasePrice": 50000,
"accumulatedDepreciation": 10000,
"residualValue": 40000,
"remainingLife": 1560000,
"assetStatus": "normal",
"currencyAlias": "TWD",
"depreciationStart": 1234567890,
"depreciationMethod": "straight-line",
"usefulLife": 6000000,
"relatedVouchers": [
{"id": 101, "number": "V-2023-001"},
{"id": 102, "number": "V-2023-002"}
],
"note": "Main office computer",
"createdAt": 1234567000,
"updatedAt": 1234568000,
"deletedAt": null
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- Description: Get all voucher
GET /company/voucher
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required | Default |
|---|---|---|---|---|
| strategy | "upcoming" | "uploaded" | "payment" | "receiving" | implement different types of voucher to get ("ledger" is not in here) | true | - |
| canBeEdit | boolean | undefined | get voucher that can be edit or not, get all if undefined | no | undefined |
| page | number | The page number | no | 1 |
| pageSize | number | how many items in one page | no | 10 |
| type | string (payment | transfer | receiving) | undefined | get what "type" of voucher it is, get all if undefined | no | undefined |
| sortBy | string | undefined | which column to sort by (ex: "voucherDate", "period", "credit", "debit"), will use sum of line items when sort by "credit" or "debit" | no | undefined |
| sortOrder | string ("asc"/"desc") | The order to sort by | no | undefined |
| startDate | integer(timestamp in second) | item include and after startDate, default is 0 |
no | |
| endDate | integer(timestamp in second) | item include and before startDate, default is infinity |
no | |
| searchQuery | string | this field is to search name | no | |
| hideReversedRelated | boolean | hide reversed related vouchers | no | false |
To be continue
{
"powerby": "iSunFA v0.9.0+8",
"success": true,
"code": "200ISF0001",
"message": "List successfully",
"payload": {
"page": 1,
"totalPages": 2,
"totalCount": 11,
"pageSize": 10,
"hasNextPage": true,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "Date",
"sortOrder": "desc"
}
],
"data": {
"unRead": {
"uploadedVoucher": 0,
"upcomingEvents": 0,
"paymentVoucher": 0,
"receivingVoucher": 0
},
"vouchers": [
{
"id": 10002285,
"voucherDate": 1736956800,
"voucherNo": "20250115002",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"name": "Shirley Chang"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10006661,
"description": "",
"debit": false,
"amount": 1546000,
"account": {
"id": 2206,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": false,
"code": "1691",
"name": "辦公設備成本",
"note": null,
"forUser": true,
"level": 4,
"parentCode": "1690",
"rootCode": "1600",
"parentId": 1736,
"rootId": 1287,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10006662,
"description": "",
"debit": true,
"amount": 1546000,
"account": {
"id": 1601,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1101",
"name": "庫存現金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 1546000
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10002284,
"voucherDate": 1735660800,
"voucherNo": "20241231002",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"name": "Shirley Chang"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10006659,
"description": "",
"debit": false,
"amount": 2222,
"account": {
"id": 2135,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": false,
"code": "1602",
"name": "土地成本",
"note": null,
"forUser": true,
"level": 4,
"parentCode": "1601",
"rootCode": "1600",
"parentId": 1718,
"rootId": 1287,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10006660,
"description": "",
"debit": true,
"amount": 2222,
"account": {
"id": 1601,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1101",
"name": "庫存現金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 2222
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10001255,
"voucherDate": 1734019200,
"voucherNo": "20241213001",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"name": "Shirley Chang"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10003687,
"description": "",
"debit": false,
"amount": 200000,
"account": {
"id": 1601,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1101",
"name": "庫存現金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10003688,
"description": "",
"debit": true,
"amount": 200000,
"account": {
"id": 2135,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": false,
"code": "1602",
"name": "土地成本",
"note": null,
"forUser": true,
"level": 4,
"parentCode": "1601",
"rootCode": "1600",
"parentId": 1718,
"rootId": 1287,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 200000
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10001263,
"voucherDate": 1734019200,
"voucherNo": "20241213002",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"name": "Shirley Chang"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10003709,
"description": "",
"debit": false,
"amount": 123,
"account": {
"id": 1602,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1102",
"name": "零用金/週轉金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10003710,
"description": "",
"debit": true,
"amount": 123,
"account": {
"id": 2206,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": false,
"code": "1691",
"name": "辦公設備成本",
"note": null,
"forUser": true,
"level": 4,
"parentCode": "1690",
"rootCode": "1600",
"parentId": 1736,
"rootId": 1287,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 123
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10001259,
"voucherDate": 1733760000,
"voucherNo": "20241210001",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"name": "Shirley Chang"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10003698,
"description": "",
"debit": false,
"amount": 99999,
"account": {
"id": 1601,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1101",
"name": "庫存現金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10003699,
"description": "",
"debit": true,
"amount": 99999,
"account": {
"id": 2206,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": false,
"code": "1691",
"name": "辦公設備成本",
"note": null,
"forUser": true,
"level": 4,
"parentCode": "1690",
"rootCode": "1600",
"parentId": 1736,
"rootId": 1287,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 99999
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10001422,
"voucherDate": 1733068800,
"voucherNo": "20241201001",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "https://lh3.googleusercontent.com/a/ACg8ocKgfe1o5FRqN6fry5agLiWBekwtSXnBYo44IAbOINcQeuiY9A=s96-c",
"name": "Shirley Chang"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10004173,
"description": "",
"debit": false,
"amount": 1537,
"account": {
"id": 1603,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1103",
"name": "銀行存款",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10004174,
"description": "",
"debit": true,
"amount": 1537,
"account": {
"id": 10001551,
"companyId": 10000003,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1101-4",
"name": "庫存現金-我也不知道",
"note": "我也不知道備註",
"forUser": true,
"level": 4,
"parentCode": "1101",
"rootCode": "1100",
"parentId": 1601,
"rootId": 1256,
"createdAt": 1734680224,
"updatedAt": 1734680224,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 1537
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10000112,
"voucherDate": 1729785600,
"voucherNo": "20241025002",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "/elements/avatar_default.svg",
"name": "Updated Test_User_1"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10000374,
"description": "",
"debit": false,
"amount": 50,
"account": {
"id": 1602,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1102",
"name": "零用金/週轉金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10000375,
"description": "",
"debit": true,
"amount": 50,
"account": {
"id": 1347,
"companyId": 1002,
"system": "IFRS",
"type": "expense",
"debit": true,
"liquidity": true,
"code": "6114",
"name": "推銷費用 - 運費",
"note": null,
"forUser": true,
"level": 2,
"parentCode": "6100",
"rootCode": "6114",
"parentId": 1055,
"rootId": 1347,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 50
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10000108,
"voucherDate": 1729699200,
"voucherNo": "20241024002",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "/elements/avatar_default.svg",
"name": "Updated Test_User_1"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [],
"sum": {
"debit": false,
"amount": 0
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10000107,
"voucherDate": 1729699200,
"voucherNo": "20241024001",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "/elements/avatar_default.svg",
"name": "Updated Test_User_1"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [],
"sum": {
"debit": false,
"amount": 0
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
},
{
"id": 10000111,
"voucherDate": 1728489600,
"voucherNo": "20241025001",
"voucherType": "expense",
"note": "",
"counterParty": {
"companyId": "555",
"name": "N/A"
},
"issuer": {
"avatar": "/elements/avatar_default.svg",
"name": "Updated Test_User_1"
},
"unRead": false,
"lineItemsInfo": {
"lineItems": [
{
"id": 10000372,
"description": "",
"debit": false,
"amount": 300,
"account": {
"id": 1601,
"companyId": 1002,
"system": "IFRS",
"type": "asset",
"debit": true,
"liquidity": true,
"code": "1101",
"name": "庫存現金",
"note": null,
"forUser": true,
"level": 3,
"parentCode": "1100",
"rootCode": "1100",
"parentId": 1256,
"rootId": 1256,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
},
{
"id": 10000373,
"description": "",
"debit": true,
"amount": 300,
"account": {
"id": 1345,
"companyId": 1002,
"system": "IFRS",
"type": "expense",
"debit": true,
"liquidity": true,
"code": "6112",
"name": "推銷費用 - 文具用品",
"note": null,
"forUser": true,
"level": 2,
"parentCode": "6100",
"rootCode": "6112",
"parentId": 1055,
"rootId": 1345,
"createdAt": 0,
"updatedAt": 0,
"deletedAt": null
}
}
],
"sum": {
"debit": false,
"amount": 300
}
},
"payableInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"receivingInfo": {
"total": 0,
"alreadyHappened": 0,
"remain": 0
},
"reverseVouchers": [],
"isReverseRelated": false
}
]
}
}
}GET /company/voucher/[voucherId]
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required |
|---|---|---|---|
| voucherId | number | The id of certain voucher | Yes |
To be continue
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": {
"id": 1001,
"eventId": null, // will be null if not recurring, integer if recurring
"hasReaded": true,
"status": "uploaded", // "uploaded" or "upcoming"
"canBeEdit": true, // true or false
"voucherNo": "240417-001",
"voucherDate": 1000000,
"isReverseRelated": true, // If it's deleted voucher or reversed voucher, it will be true, otherwise it will be false
"type": "payment", // or transfer or receiving
"note": "This is a note",
"createAt": 1000000,
"updateAt": 1000000,
"deletedAt": null, // if have Number then it is deleted
"reverseAt": 1727317, // if have Number then it is reversed
"certificates": [
{
"id": 1,
"inputOrOutput": "input",
"certificateDate": 10000001,
"certificateNo": "AB-12345678",
"currencyAlias": "TWD",
"priceBeforeTax": 4000,
"taxRatio": 5,
"taxPrice": 200,
"totalPrice": 4200,
"counterPartyId": 1,
"invoiceType": "triplicate_uniform_invoice",
"deductible": true,
"connectToId": null,
"name": "invoice001.jpg",
"url": "/api/v2/certificate/1",
"type": "invoice",
"connectToType": "voucher",
"mimeTYpe": "image/jpeg",
"size": "3.0 MB",
"uploadProgress": 50,
"aiResultId": "douhvjax_-1",
"aiStatus": "success",
"createAt": 10000000,
"updateAt": 10000000
}
],
"reverseVoucherIds": [
// 或是完整的voucher?
{
"id": 1111,
"voucherNo": "240817-001"
},
{
"id": 1112,
"voucherNo": "240817-002"
}
],
"issuer": {
// IUser
"id": 1001,
"name": "Murky",
"fullName": "Tiny Murky",
"email": "fakeemail@cool.com",
"phone": "1234567890",
"imageId": "/api/v2/image/1001.jpg",
"agreementList": ["agreement1", "agreement2"],
"createdAt": 1000000,
"updatedAt": 1000000
},
"counterParty": {
// ICounterparty
"id": 1001,
"companyId": 1001,
"name": "Cool LLC",
"taxId": "12345678",
"type": "customer",
"note": "This is a note",
"createdAt": 1000000,
"updatedAt": 1000000
},
"payableInfo": {
// payableInfo 如果存在,那麼receivingInfo就會都是0
"total": 1000,
"alreadyHappened": 400,
"remain": 600
},
"receivingInfo": {
"total": 1000,
"alreadyHappened": 400,
"remain": 600
},
"recurringInfo": {
"type": "month", // or year or week or atOnce
"startDate": 1000000,
"endDate": 1000100,
"daysOfWeek": [0, 1, 2], // 這邊是示範,如果type是week, 這個array才有東西, 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday
"daysOfMonth": [1, 15, 30], // 這邊是示範,如果type是month, 這個array才有東西
"daysOfYears": [
{
"month": 1,
"day": 1
},
{
"month": 12,
"day": 25
}
] // 這邊是示範,如果type是year, 這個array才有東西
},
"assets": [
// IAssetItem
{
"id": 10130086,
"currencyAlias": "TWD",
"acquisitionDate": 1735488000,
"assetType": "1802",
"assetNumber": "SW-000001-34c168df-fb18-48eb-b5c0-4c4c5ac1ff91-000001",
"assetName": "iCloud",
"purchasePrice": 30,
"accumulatedDepreciation": 0,
"residualValue": 1,
"remainingLife": 0,
"assetStatus": "normal", //AssetStatus.NORMAL
"createdAt": 1735542978,
"updatedAt": 1735542978,
"deletedAt": 1735543604,
"depreciationStart": 1735488000,
"depreciationMethod": "straight_line",
"usefulLife": 1,
"relatedVouchers": [],
"note": "1月份iCloud"
}
],
"lineItemsInfo": {
"sum": {
"debit": true,
"amount": 1000
},
"lineItems": [
{
"id": 1001,
"amount": 1000,
"description": "This is a description",
"debit": true,
"account": {
"id": 1001,
"companyId": 1001,
"system": "IFRS",
"type": "Asset",
"debit": true,
"liquidity": true,
"code": "1001",
"name": "Cash",
"forUser": true,
"parentCode": "1000",
"rootCode": "1000",
"createdAt": 1000000,
"updatedAt": 1000000,
"level": 1,
"deletedAt": null
},
"voucherId": 1001,
"createdAt": 1000000,
"updatedAt": 1000000,
"deletedAt": null
},
{
"id": 1002,
"amount": 1001,
"description": "This is a description",
"debit": false,
"account": {
"id": 1002,
"companyId": 1001,
"system": "IFRS",
"type": "Asset",
"debit": true,
"liquidity": true,
"code": "1002",
"name": "Accounts Receivable",
"forUser": true,
"parentCode": "1000",
"rootCode": "1000",
"createdAt": 1000000,
"updatedAt": 1000000,
"level": 1,
"deletedAt": null
},
"voucherId": 1001,
"createdAt": 1000000,
"updatedAt": 1000000,
"deletedAt": null
}
]
}
}
}- Description: when enter list voucher, all voucher on that page will be consider readed
POST /company/voucher/readed
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description |
|---|---|---|
| voucherIds | Integer[] | the vouchers that want to be updated to read:true |
{
"voucherIds": [
1,
2,
3
]
}{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": "Success",
}- Description:Post one voucher, if posting "recurring" event, it will create all the voucher in upcoming
POST /company/voucher
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | default | required |
|---|---|---|---|---|
| actions | VoucherV2Action[] | 需要執行哪些特殊動作,是一個array, 裡面放VoucherV2Action, 有 ADD_ASSET, REVERT, RECURRING | - (沒有特殊動作請放空的array) | true |
| certificateIds | integer[] | certificate connect to this voucher | [] (empty array) | true(but can be empty array) |
| voucherDate | integer | voucher occur day in second | - | true |
| type | "payment" | "receiving" | "transfer" | voucher type | - | true |
| note | string | note on voucher, can be empty string | - | true |
| counterPartyId | integer | id of counterPartyId, id should come from ICounterparty, 只有在要用 revert功能的時候提供 |
- | false |
| lineItems | lineItem[] | lineItems of voucher, need to make sure tax is same as certificate and credit debit is equal | - | true, empty array is not allowed |
| recurringInfo | recurringInfo | undefined | if is recurring entry, then add this object, if not please use undefined | undefined | false |
| assetIds | integer[] | asset to be connect to, empty array if not to connect | - | true |
| reverseVouchers | reverseVoucher [] | empty array if not used | - |
lineItems
| name | type | description | default | required |
|---|---|---|---|---|
| accoutId | integer | id of account | - | true |
| description | string | custom description for user to input | - | true(can be empty string) |
| debit | boolean | is it credit or debit | - | true |
| amount | number | how much is this | - | true |
recurringInfo
| name | type | description | default | required |
|---|---|---|---|---|
| type | EventEntityFrequency.MONTHLY, EventEntityFrequency.YEARLY | which type of frequency to be repeat | - | true |
| startDate | number | start date in second | - | true |
| endDate | number | end date in second | - | true |
| daysOfWeek | integer[] | date of week to be repeat, if not repeat by week, use empty array, 0 be sunday | - | true |
| monthsOfYear | integer[] | day of month to be repeat, if not repeat by month, use empty array, 這邊提供數字, 0代表一月, 11代表12月 | - | true |
reversedVoucher
| name | type | description | default | required |
|---|---|---|---|---|
| voucherId | integer | which voucher to be reversed | - | true |
| amount | number | how much is for amount | - | true |
const body = {
actions: [VoucherV2Action.ADD_ASSET],
certificateIds: [1001, 1002],
voucherDate: 10000000,
type: EventType.PAYMENT,
note: 'this is note',
counterPartyId: 1001,
lineItems: [
{ accountId: 1001, description: 'this is for Particulars', debit: true, amount: 1000 },
{ accountId: 1002, description: 'this is for Particulars', debit: false, amount: 1000 },
],
recurringEntry: {
type: 'month',
startDate: 1000000,
endDate: 1000100,
daysOfWeek: [0, 1, 2],
daysOfMonth: [1, 15, 30],
daysOfYears: [
{
month: 1,
day: 1,
},
{
month: 12,
day: 25,
},
],
},
assetIds: [1001],
reverseVouchers: [
{
voucherId: 1003,
amount: 500,
lineItemIdBeReversed: 1001,
lineItemIdReverseOther: 1002,
},
],
};it will response id of voucher that created
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": 1003,
}- Description: Put voucher
- If recurring event is edit, all upcoming event should be edit
PUT /company/voucher/[voucherId]
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required |
|---|---|---|---|
| voucherId | number | The id of certain voucher | Yes |
It is same as post voucher
it will response id of voucher that put
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": 1003,
}- Description: this will create an reverse
DELETE /company/voucher/[voucherId]
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required |
|---|---|---|---|
| voucherId | number | The id of certain voucher to be delete | Yes |
it will response id of voucher that is created in reverse
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200",
"message": "Success",
"payload": 1003,
}- Description: this will restore the deleted voucher
POST /company/:companyId/voucher/:voucherId/restore
Session data will be get from session, so not needed to be provided.
| name | type | description |
|---|---|---|
| companyId | number | id of company |
| userId | number | id of user |
| name | type | description | required |
|---|---|---|---|
| voucherId | number | The id of certain voucher to be delete | Yes |
- success response
{
"powerby": "iSunFA v0.9.0+36",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": 10002062
}- failed response
{
"powerby": "iSunFA v0.9.0+36",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: This API provides the functionality to get an user.
GET `/user/:userId`| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
GET `/user/1`| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | User or null | response data or null |
| name | type | description |
|---|---|---|
| id | number | unique number of user |
| name | string | user name |
| fullName | string | user full name |
| string | user email | |
| phone | string | user phone |
| imageId | string | user image id |
| agreementList | string[] | list of agreement hash |
| device | string | User device information |
| ip | string | User IP address |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
-
成功的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": true, "code": "200", "message": "Get User sucessfully", "payload": { "id": 1, "name": "John", "fullName": "John Doe", "email": "john@mermer.cc", "phone": "12345678", "imageId": "552c2dbf-997c-4b13-957e-ea03c45d2ec1.svg", "agreementList": ["agreement1", "agreement2"], "device": "MacOS Chrome", "ip": "127.0.0.1", "createdAt": 1723538422, "updatedAt": 1723538422 }, } -
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": null }
- description: This API provides the functionality to delete an user.
DELETE `/user/:userId`| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
DELETE `/user/1`| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | user |
| name | type | description |
|---|---|---|
| id | number | unique number of user |
| name | string | user name |
| fullName | string | user full name |
| string | user email | |
| phone | string | user phone |
| imageId | string | user image id |
| agreementList | string[] | list of agreement hash |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
-
成功的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": true, "code": "200", "message": "Delete User sucessfully", "payload": { "id": "1", "name": "John", "fullName": "John Doe", "email": "john@mermer.cc", "phone": "12345678", "imageId": "552c2dbf-997c-4b13-957e-ea03c45d2ec1.svg", "agreementList": ["agreement1", "agreement2"], "createdAt": 1723538422, "updatedAt": 1723538422 }, } -
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: This API provides the functionality to update an user.
PUT `/user/:userId`| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
| name | type | description |
|---|---|---|
| name | string | name of the user |
| fullName | string | full name of the user |
| string | email of the user | |
| phone | string | phone of the user |
| imageId | string | imageId of the user |
PUT `/user/1`
const body = {
name: 'Jane',
email: 'Jane@mermer.cc',
fullName: 'Jane Doe',
phone: '1234567890',
imageId: 'imageId',
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | User | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of user |
| name | string | user name |
| fullName | string | user full name |
| string | user email | |
| phone | string | user phone |
| imageId | string | user image id |
| agreementList | string[] | list of agreement hash |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Update User sucessfully",
"payload":
{
"id": 1,
"name": "John",
"fullName": "John Doe",
"email": "john@mermer.cc",
"phone": "12345678",
"imageId": "552c2dbf-997c-4b13-957e-ea03c45d2ec1.svg",
"agreementList": ["agreement1", "agreement2"],
"createdAt": 1723538422,
"updatedAt": 1723538422
},
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: This API provides the functionality to list all todo.
GET /user/:userId/todo| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
GET user/1/todo| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | ITodoCompany[] | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of todo |
| company | Company | company of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| note | string | note of the todo |
| status | boolean | status of the todo |
| startTime | number | start time of the todo, 這個會是millisecond(13位數) |
| endTime | number | end time of the todo, 這個會是millisecond(13位數) |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v0.8.5+153",
"success": true,
"code": "200ISF0001",
"message": "List successfully",
"payload": [
{
"id": 10000000,
"name": "Test Todo",
"deadline": 1772617600,
"note": "NaN",
"status": true,
"createdAt": 1733379398,
"updatedAt": 1733379398,
"startTime": 1772617600000,
"endTime": 1772617600000,
"company": {
"id": 555,
"name": "N/A",
"taxId": "555",
"startDate": 0,
"createdAt": 0,
"updatedAt": 0,
"imageId": "N/A"
}
},
{
"id": 10000001,
"name": "Test Todo",
"deadline": 1772617600,
"note": "NaN",
"status": true,
"createdAt": 1733379575,
"updatedAt": 1733379575,
"startTime": 1772617600000,
"endTime": 1772617600000,
"company": {
"id": 555,
"name": "N/A",
"taxId": "555",
"startDate": 0,
"createdAt": 0,
"updatedAt": 0,
"imageId": "N/A"
}
}
]
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: This API provides the functionality to create a todo.
POST `/user/:userId/todo`| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
| name | type | description |
|---|---|---|
| type | string | type of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| startTime | number | undefined | start time of the todo, 這個寫millisecond(13位數)或是second(10位數)都可以, 不填的話會是呼叫當下的時間 |
| endTime | number | undefined | end time of the todo, 這個會是millisecond(13位數)或是second(10位數)都可以 , 不填的話會是呼叫當天的時間的最後一秒 |
| note | string | note of the todo |
POST `user/:userId/todo`
const body = {
type: 'type',
name: 'name',
deadline: 1000000,
note: 'note',
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | ITodoCompany | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of todo |
| company | Company | company of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| startTime | number | start time of the todo, 這個會是millisecond(13位數) |
| endTime | number | end time of the todo, 這個會是millisecond(13位數) |
| note | string | note of the todo |
| status | boolean | status of the todo |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
powerby: 'iSunFA v0.8.5+153',
success: true,
code: '201ISF0000',
message: 'Created successfully',
payload: {
id: 10000001,
name: 'Test Todo',
deadline: 1772617600,
note: '1772617600-1772617600-',
status: true,
createdAt: 1733379575,
updatedAt: 1733379575,
startTime: 1772617600000,
endTime: 1772617600000,
company: {
id: 555,
name: 'N/A',
taxId: '555',
startDate: 0,
createdAt: 0,
updatedAt: 0,
imageId: 'N/A'
}
}
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: This API provides the functionality to get a todo.
GET `todo/:todoId`| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
| todoId | string | specific todo number | yes | - |
GET todo/1| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | ITodoCompany | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of todo |
| company | Company | company of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| note | string | note of the todo |
| startTime | number | start time of the todo, 這個會是millisecond(13位數) |
| endTime | number | end time of the todo, 這個會是millisecond(13位數) |
| status | boolean | status of the todo |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Get Todo sucessfully",
"payload":
{
"id": 1,
"company": {
"id": 1,
"imageId": "552c2dbf-997c-4b13-957e-ea03c45d2ec1.svg",
"name": "company1",
"taxId": "12345678",
"startDate": 1723538422,
"createdAt": 1723538422,
"updatedAt": 1723538422
},
"name": "name",
"deadline": 1000000,
"note": "note",
"status": true,
"startTime": 1772617600000,
"endTime": 1772617600000,
"createdAt": 1723538422,
"updatedAt": 1723538422
},
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: This API provides the functionality to update a todo.
PUT /todo/:todoId| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
| todoId | string | specific todo number | yes | - |
| name | type | description |
|---|---|---|
| type | string | type of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| startTime | number | undefined | start time of the todo, 這個寫millisecond(13位數)或是second(10位數)都可以, 不填的話會是呼叫當下的時間 |
| endTime | number | undefined | end time of the todo, 這個會是millisecond(13位數)或是second(10位數)都可以 , 不填的話會是呼叫當天的時間的最後一秒 |
| note | string | note of the todo |
PUT /todo/1
const body = {
type: 'type',
name: 'name',
deadline: 1000000,
startTime: 100000000000,
endTime: 100000000000,
note: 'note',
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | ITodoCompany | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of todo |
| company | Company | company of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| note | string | note of the todo |
| status | boolean | status of the todo |
| startTime | number | start time of the todo, 這個會是millisecond(13位數) |
| endTime | number | end time of the todo, 這個會是millisecond(13位數) |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Update Todo sucessfully",
"payload":
{
"id": 1,
"company": {
"id": 1,
"imageId": "552c2dbf-997c-4b13-957e-ea03c45d2ec1.svg",
"name": "company1",
"taxId": "12345678",
"startDate": 1723538422,
"createdAt": 1723538422,
"updatedAt": 1723538422
},
"name": "name",
"deadline": 1000000,
"startTime": 1772617600000,
"endTime": 1772617600000,
"note": "note",
"status": true,
"createdAt": 1723538422,
"updatedAt": 1723538422
},
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: This API provides the functionality to delete a todo.
DELETE `/todo/:todoId`| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | yes | - |
| todoId | string | specific todo number | yes | - |
DELETE `/todo/:todoId`| name | type | description |
|---|---|---|
| powerby | string | iSunFA v0.1.2+50 |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | ITodoCompany | response data |
| name | type | description |
|---|---|---|
| id | number | unique number of todo |
| company | Company | company of the todo |
| name | string | name of the todo |
| deadline | number | deadline of the todo |
| note | string | note of the todo |
| status | boolean | status of the todo |
| startTime | number | start time of the todo, 這個會是millisecond(13位數) |
| endTime | number | end time of the todo, 這個會是millisecond(13位數) |
| createdAt | number | creation timestamp |
| updatedAt | number | update timestamp |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Delete Todo sucessfully",
"payload":
{
"id": 1,
"company": {
"id": 1,
"imageId": "552c2dbf-997c-4b13-957e-ea03c45d2ec1.svg",
"name": "company1",
"taxId": "12345678",
"startDate": 1723538422,
"createdAt": 1723538422,
"updatedAt": 1723538422
},
"name": "name",
"deadline": 1000000,
"startTime": 1772617600000,
"endTime": 1772617600000,
"note": "note",
"status": true,
"createdAt": 1723538422,
"updatedAt": 1723538422
},
}-
失敗的回傳
{ "powerby": "iSunFA v0.1.2+50", "success": false, "code": "404", "message": "Resource not found", "payload": {} }
- description: Get suggested asset number for reference
GET /company/:companyId/asset/suggested_number| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| assetType | string | Asset type | yes | -- |
GET /company/1/asset/suggested_number?assetType=equipment| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Suggested asset number data |
| name | type | description |
|---|---|---|
| assetNumber | string | Suggested asset number |
- Successful response
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "200ISF0000",
"message": "Successfully retrieved suggested asset number",
"payload": {
"assetNumber": "EQ-000123"
}
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Export asset list data
POST /company/:companyId/asset/export| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| fileType | string | File type (csv) | yes | -- |
| filters | object | Filter conditions | no | -- |
| sort | Sort[] | Sort options | no | -- |
| options | object | Export options | no | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| type | string | Asset type | no | -- |
| status | string | Asset status | no | -- |
| startDate | number | Start of time range based on acquisition date (timestamp, seconds) | no | -- |
| endDate | number | End of time range based on acquisition date (timestamp, seconds) | no | -- |
| searchQuery | string | Search keyword | no | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| language | string | Export file language (zh-TW, en-US) | no | zh-TW |
| timezone | string | Timezone offset (e.g., +0800, -0530) | no | +0800 |
| fields | string[] | Specified export fields | no | all fields |
| field | description |
|---|---|
| name | Asset name |
| type | Asset type |
| status | Asset status |
| assetNumber | Asset number |
| acquisitionDate | Acquisition date |
| purchasePrice | Purchase price |
| accumulatedDepreciation | Accumulated depreciation |
| residualValue | Residual value |
| remainingLife | Remaining useful life (timestamp, seconds) |
| name | type | description | required | default |
|---|---|---|---|---|
| by | string | Sort field | yes | -- |
| order | "asc" | "desc" | Sort direction | yes | -- |
| field | description |
|---|---|
| acquisitionDate | Acquisition date |
| purchasePrice | Purchase price |
| accumulatedDepreciation | Accumulated depreciation |
| residualValue | Residual value |
| remainingLife | Remaining useful life (timestamp, seconds) |
POST /company/1/asset/export
const body = {
"fileType": "csv",
"filters": {
"startDate": 1672531200,
"endDate": 1704067199,
"type": "equipment",
"status": "normal",
"searchQuery": "computer"
},
"sort": [
{
"by": "acquisitionDate",
"order": "desc"
},
{
"by": "purchasePrice",
"order": "asc"
}
],
"options": {
"language": "zh-TW",
"timezone": "+0800",
"fields": ["name", "purchasePrice", "acquisitionDate"]
}
}return file
Content-Type: text/csv
Content-Disposition: attachment; filename=assets_20240101123456.csv
資產名稱,購買價格,取得日期
MacBook Pro,45000,2023/12/01
辦公桌,12000,2023/11/15
印表機,35000,2023/10/30{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": null
}- description: Export trial balance list data
POST /company/:companyId/trial_balance/export| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| fileType | string | File type (csv) | yes | -- |
| filters | object | Filter conditions | yes | -- |
| sort | Sort[] | Sort options | no | -- |
| options | object | Export options | no | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| startDate | number | Start of time range based on acquisition date (timestamp, seconds) | yes | -- |
| endDate | number | End of time range based on acquisition date (timestamp, seconds) | yes | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| language | string | Export file language (zh-TW, en-US) | no | zh-TW |
| timezone | string | Timezone offset (e.g., +0800, -0530) | no | +0800 |
| fields | string[] | Specified export fields | no | all fields |
| field | description |
|---|---|
| no | account number |
| accountingTitle | account name |
| beginningCreditAmount | beginning credit amount |
| beginningDebitAmount | beginning debit amount |
| midtermCreditAmount | midterm credit amount |
| midtermDebitAmount | midterm debit amount |
| endingCreditAmount | ending credit amount |
| endingDebitAmount | ending debit amount |
| name | type | description | required | default |
|---|---|---|---|---|
| by | string | Sort field | yes | -- |
| order | "asc" | "desc" | Sort direction | yes | -- |
| field | description |
|---|---|
| beginningCreditAmount | beginning credit amount |
| beginningDebitAmount | beginning debit amount |
| midtermCreditAmount | midterm credit amount |
| midtermDebitAmount | midterm debit amount |
| endingCreditAmount | ending credit amount |
| endingDebitAmount | ending debit amount |
POST /company/1002/trial_balance/export
const body = {
"fileType": "csv",
"filters": {
"startDate": 1672531200,
"endDate": 1704067199
},
"sort": [
{
"by": "beginningCreditAmount",
"order": "desc"
},
],
"options": {
"language": "zh-TW",
"timezone": "+0800",
"fields": ["accountingTitle", "beginningCreditAmount", "beginningDebitAmount"]
}
}return file
Content-Type: text/csv
Content-Disposition: attachment; filename=trial_balance_20240101123456.csv
會計科目,期初貸方餘額,期初借方餘額
庫存現金,0,300
零用金/週轉金,0,50
推銷費用 - 文具用品,0,300
推銷費用 - 運費,0,50{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": null
}- description: Create multiple assets
POST /company/:companyId/asset/bulk| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required |
|---|---|---|---|
| assetName | string | Name | yes |
| assetType | string | Accounting subject | yes |
| assetNumber | string | Property number | yes |
| acquisitionDate | string | Acquisition time, timestamp in seconds | yes |
| purchasePrice | number | Purchase price | yes |
| residualValue | number | Residual value | yes |
| amount | number | Amount | yes |
| depreciationStart | string | Depreciation start time, timestamp in seconds | no |
| depreciationMethod | string | Depreciation method | no |
| usefulLife | number | Useful life (timestamp, seconds) | no |
| note | string | Remarks | no |
POST /company/1002/asset/bulk
const body = {
"assetName": "New Office Laptop",
"assetType": "1602",
"assetNumber": "EQ-20241006",
"acquisitionDate": 1234567890,
"purchasePrice": 30000,
"residualValue": 30000,
"amount": 2,
"depreciationStart": 1234567890,
"depreciationMethod": "straight_line",
"usefulLife": 36000,
"note": "Laptop for new employee"
}| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | Asset | Newly created asset data |
| name | type | description |
|---|---|---|
| id | number | Asset ID |
| name | string | Asset Name |
| number | string | Asset Number |
| companyId | number | Company ID |
| status | string | Asset Status |
| createdAt | number | Creation Time (timestamp, seconds) |
| updatedAt | number | Update Time (timestamp, seconds) |
| note | string | Remarks |
- Successful response
{
"powerby": "iSunFA v0.8.5+157",
"success": true,
"code": "201ISF0000",
"message": "Created successfully",
"payload": [
{
"id": 10122863,
"name": "New Office Laptop",
"number": "EQ-20241006-6fdee94c-a984-428b-ab86-4ffcef3de221-000001",
"companyId": 10000003,
"status": "normal",
"createdAt": 1733471083,
"updatedAt": 1733471083,
"note": "Laptop for new employee"
},
{
"id": 10122864,
"name": "New Office Laptop",
"number": "EQ-20241006-6fdee94c-a984-428b-ab86-4ffcef3de221-000002",
"companyId": 10000003,
"status": "normal",
"createdAt": 1733471083,
"updatedAt": 1733471083,
"note": "Laptop for new employee"
}
]
}- Failed response
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- description: Export ledger list data
POST /company/:companyId/ledger/export| name | type | description | required | default |
|---|---|---|---|---|
| companyId | string | Company ID | yes | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| fileType | string | File type (csv) | yes | -- |
| filters | object | Filter conditions | yes | -- |
| options | object | Export options | no | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| startDate | number | Start of time range based on acquisition date (timestamp, seconds) | yes | -- |
| endDate | number | End of time range based on acquisition date (timestamp, seconds) | yes | -- |
| startAccountNo | number | Starting account number | no | -- |
| endAccountNo | number | Ending account number | no | -- |
| labelType | string | Label type (general/detailed/all) | no | general |
| name | type | description | required | default |
|---|---|---|---|---|
| language | string | Export file language (zh-TW, en-US) | no | zh-TW |
| timezone | string | Timezone offset (e.g., +0800, -0530) | no | +0800 |
| fields | string[] | Specified export fields | no | all fields |
| Field Name | Description |
|---|---|
| no | Account number |
| accountTitle | Name of the accounting subject |
| voucherDate | Voucher date |
| voucherNumber | Voucher number |
| debitAmount | Debit amount |
| creditAmount | Credit amount |
| balance | balance |
| particulars | Description |
POST /company/1002/ledger/export
const body = {
"fileType": "csv",
"filters": {
"startDate": 1672531200,
"endDate": 1704067199,
"startAccountNo": 1001,
"endAccountNo": 2002,
"labelType": "general"
},
"options": {
"language": "zh-TW",
"timezone": "+0800",
"fields": ["accountTitle", "debitAmount", "creditAmount", "voucherDate"]
}
}return file
Content-Type: text/csv
Content-Disposition: attachment; filename=ledger_20240101123456.csv
會計科目,貸方餘額,借方餘額,傳票日期,餘額
庫存現金,0,300,2024-01-01,300{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": null
}- description: bind a card to a user
POST /api/v2/user/:userId/card/bind| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| type | string | payment method type | true | -- |
| number | string | card number | true | -- |
| expirationDate | string | card expiration date | true | -- |
| cvv | string | card security code | true | -- |
| default | boolean | set as default payment method | false | false |
POST /api/v2/user/123/card/bind
const body = {
"type": "VISA",
"number": "4111111111111111",
"expirationDate": "12/25",
"cvv": "123",
"default": true
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaymentMethod | response data |
| name | type | description |
|---|---|---|
| id | number | card ID |
| type | string | card type |
| number | string | masked card number |
| expirationDate | string | card expiration date |
| cvv | string | security code |
| default | boolean | is default card |
- 成功的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Bind card successfully",
"payload": {
"id": 1,
"type": "VISA",
"number": "**** **** **** 1234",
"expirationDate": "12/25",
"cvv": "123",
"default": true
}
}- 失敗的回傳
{
"powerby": "iSunFA v0.1.2+50",
"success": false,
"code": "400",
"message": "Invalid card details",
"payload": {}
}- description: get the card details of a user
GET /api/v2/user/:userId/card| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | true | -- |
| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaymentMethod | response data |
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Get card successfully",
"payload": {
"id": 1,
"type": "MASTER",
"number": "**** **** **** 1234",
"expirationDate": "12/25",
"cvv": "123",
"default": true
}
}- description: make a payment using a bound card
POST /api/v2/user/:userId/card/payment| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | specific user number | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| amount | number | payment amount | true | -- |
| currency | string | payment currency | true | -- |
| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IPaymentReceipt | response data |
| name | type | description |
|---|---|---|
| id | number | transaction ID |
| amount | number | transaction amount |
| currency | string | currency used |
| timestamp | number | transaction timestamp |
{
"powerby": "iSunFA v0.1.2+50",
"success": true,
"code": "200",
"message": "Payment successful",
"payload": {
"id": 100000,
"amount": 899,
"currency": "USD",
"timestamp": 1630406400000
}
}- Description: List all teams with their subscription information
GET /api/v2/subscriptionNo path parameters required.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| page | number | Page number | No | 1 |
| pageSize | number | Items per page | No | 10 |
GET /api/v2/subscription?page=1&pageSize=10| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Team data |
| Name | Type | Description |
|---|---|---|
| data | IUserOwnedTeam[] | List of teams |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of teams |
| pageSize | number | Items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | Sort method |
| Name | Type | Description |
|---|---|---|
| id | number | Team ID |
| name | string | Team name |
| plan | string | Subscription plan type |
| enableAutoRenewal | boolean | Auto-renewal status |
| nextRenewalTimestamp | number | Next renewal date timestamp |
| expiredTimestamp | number | Expiration date timestamp |
| paymentStatus | string | Payment status |
- Successful response
{
"powerby": "iSunFA v0.8.5+299",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"id": 1,
"name": "Personal",
"plan": "beginner",
"enableAutoRenewal": false,
"nextRenewalTimestamp": 0,
"expiredTimestamp": 0,
"paymentStatus": "free"
},
{
"id": 2,
"name": "Team A",
"plan": "professional",
"enableAutoRenewal": true,
"nextRenewalTimestamp": 1736501802970,
"expiredTimestamp": 0,
"paymentStatus": "unpaid"
}
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": []
}
}- Description: Update team subscription information
PUT /api/v2/subscription/:teamId/subscription| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| teamId | string | Team ID | Yes | -- |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| plan | string | Subscription plan type | No | -- |
| autoRenew | boolean | Auto-renewal status | No | -- |
PUT /api/v2/subscription/1/subscription
Content-Type: application/json
{
"plan": "enterprise",
"autoRenew": true
}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Updated team data |
| Name | Type | Description |
|---|---|---|
| id | number | Team ID |
| name | string | Team name |
| plan | string | Subscription plan type |
| enableAutoRenewal | boolean | Auto-renewal status |
| nextRenewalTimestamp | number | Next renewal date timestamp |
| expiredTimestamp | number | Expiration date timestamp |
| paymentStatus | string | Payment status |
{
"powerby": "iSunFA v0.8.5+299",
"success": true,
"code": "200ISF0003",
"message": "Success",
"payload": {
"id": 1,
"name": "Personal",
"plan": "enterprise",
"enableAutoRenewal": true,
"nextRenewalTimestamp": 1705142400,
"expiredTimestamp": 0,
"paymentStatus": "paid"
}
}- Description: Get team's subscription details by ID
GET /api/v2/subscription/:teamId| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| teamId | string | Team ID | Yes | -- |
GET /api/v2/subscription/1| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IPaginatedData<IUserOwnedTeam[]> | response data |
| name | type | description |
|---|---|---|
| data | IUserOwnedTeam[] | The team with supscription data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| Name | Type | Description |
|---|---|---|
| id | number | Team ID |
| name | string | Team name |
| plan | string | Subscription plan type |
| enableAutoRenewal | boolean | Auto-renewal status |
| nextRenewalTimestamp | number | Next renewal date timestamp |
| expiredTimestamp | number | Expiration date timestamp |
| paymentStatus | string | Payment status |
{
"powerby": "iSunFA v0.8.5+299",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"id": 1,
"name": "Personal",
"plan": "pro",
"enableAutoRenewal": true,
"nextRenewalTimestamp": 1705142400,
"expiredTimestamp": 0,
"paymentStatus": "paid"
}
}- Description: List teams' subscription invoices with pagination and filtering options
GET /api/v2/subscription/:teamId/invoice| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| teamId | string | Team ID | Yes | -- |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| page | number | Page number | No | 1 |
| pageSize | number | Items per page | No | 10 |
| plan | string | Filter by subscription plan | No | -- |
| status | boolean | Filter by payment status | No | -- |
| startDate | number | Start date timestamp | No | -- |
| endDate | number | End date timestamp | No | -- |
| searchQuery | string | Search keyword | No | -- |
GET /api/v2/subscription/1/invoice?page=1&pageSize=10&plan=professional&status=true&startDate=1672531200&endDate=1704067200&searchQuery=John| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IPaginatedData<ITeamInvoice[]> | response data |
| name | type | description |
|---|---|---|
| data | ITeamInvoice[] | The team invoice data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| Name | Type | Description |
|---|---|---|
| id | number | Invoice ID |
| teamId | number | Team ID |
| status | boolean | Payment status |
| issuedTimestamp | number | Issue date timestamp |
| dueTimestamp | number | Due date timestamp |
| planId | string | Subscription plan ID |
| planStartTimestamp | number | Plan start date timestamp |
| planEndTimestamp | number | Plan end date timestamp |
| planQuantity | number | Plan quantity |
| planUnitPrice | number | Plan unit price |
| planAmount | number | Plan total amount |
| payer | object | Payer information |
| payee | object | Payee information |
| subtotal | number | Subtotal amount |
| tax | number | Tax amount |
| total | number | Total amount |
| amountDue | number | Amount due |
{
"powerby": "iSunFA v0.8.5+299",
"success": true,
"code": "200ISF0004",
"message": "Success",
"payload": {
"page": 1,
"pageSize": 10,
"totalPages": 5,
"totalItems": 50,
"data": [
{
"id": 100000,
"teamId": 1,
"status": false,
"issuedTimestamp": 1630406400000,
"dueTimestamp": 1630406400000,
"planId": "professional",
"planStartTimestamp": 1630406400000,
"planEndTimestamp": 1633008000000,
"planQuantity": 1,
"planUnitPrice": 1000,
"planAmount": 1000,
"payer": {
"name": "John Doe",
"address": "1234 Main St",
"phone": "123-456-7890",
"taxId": "123456789"
},
"payee": {
"name": "Jane Doe",
"address": "5678 Elm St",
"phone": "098-765-4321",
"taxId": "987654321"
},
"subtotal": 900,
"tax": 100,
"total": 1000,
"amountDue": 1000
}
]
}
}- Description: Get team's subscription invoice details by ID
GET /api/v2/subscription/:teamId/invoice/:invoiceId| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| teamId | string | Team ID | Yes | -- |
| invoiceId | string | Invoice ID | Yes | -- |
GET /api/v2/subscription/1/invoice/100000| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Invoice data |
| Name | Type | Description |
|---|---|---|
| id | number | Invoice ID |
| teamId | number | Team ID |
| status | boolean | Payment status |
| issuedTimestamp | number | Issue date timestamp |
| dueTimestamp | number | Due date timestamp |
| planId | string | Subscription plan ID |
| planStartTimestamp | number | Plan start date timestamp |
| planEndTimestamp | number | Plan end date timestamp |
| planQuantity | number | Plan quantity |
| planUnitPrice | number | Plan unit price |
| planAmount | number | Plan total amount |
| payer | object | Payer information |
| payee | object | Payee information |
| subtotal | number | Subtotal amount |
| tax | number | Tax amount |
| total | number | Total amount |
| amountDue | number | Amount due |
{
"powerby": "iSunFA v0.8.5+299",
"success": true,
"code": "200ISF0005",
"message": "Success",
"payload": {
"id": 100000,
"teamId": 1,
"status": false,
"issuedTimestamp": 1630406400000,
"dueTimestamp": 1630406400000,
"planId": "professional",
"planStartTimestamp": 1630406400000,
"planEndTimestamp": 1633008000000,
"planQuantity": 1,
"planUnitPrice": 1000,
"planAmount": 1000,
"payer": {
"name": "John Doe",
"address": "1234 Main St",
"phone": "123-456-7890",
"taxId": "123456789"
},
"payee": {
"name": "Jane Doe",
"address": "5678 Elm St",
"phone": "098-765-4321",
"taxId": "987654321"
},
"subtotal": 900,
"tax": 100,
"total": 1000,
"amountDue": 1000
}
}- Description: List team payment methods
GET /api/v2/team/:teamId/payment_method| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| teamId | string | Team ID | Yes | -- |
GET /api/v2/team/1/payment_method| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Payment method data |
| Name | Type | Description |
|---|---|---|
| id | number | Payment method ID |
| type | string | Card type (e.g., VISA) |
| number | string | Masked card number |
| expirationDate | string | Card expiration date |
| cvv | string | Card CVV |
| default | boolean | Whether this is the default method |
{
"powerby": "iSunFA v0.8.5+312",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": [
{
"id": 10000001,
"type": "VISA",
"number": "**** **** **** 1234",
"expirationDate": "12/25",
"cvv": "123",
"default": true
}
]
}- Description: 根據 teamId 修改訂閱方案,並回傳 Invoice 和 Subscription 詳細
POST /api/v2/user/:userId/payment_method/:paymentMethodId/charge| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| userId | string | User ID | Yes | -- |
| paymentMethodId | string | Payment Method Id | Yes | -- |
POST /api/v2/user/10000002/payment_method/10000012/charge| Name | Type | Description | Required |
|---|---|---|---|
| teamPlanType | TPlanType | Plan Type: BEGINNER, PROFESSIONAL, ENTERPRISE
|
Yes |
| teamId | string | Team Id | Yes |
{
"teamPlanType": "ENTERPRISE",
"teamId": "10000008"
}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | object | Payment method data |
| Name | Type | Description |
|---|---|---|
| id | number | Team Invoice ID |
| teamOrderId | number | Order Id |
| teamPaymentTransactionId | number | Payment Transaction Id |
| invoiceCode | string | Invoice Code |
| price | number | Price Amount |
| tax | number | Tax Amount |
| total | number | Total Amount |
| currency | string | Currency Unit |
| payerId | string | Payer ID |
| payerName | string | Payer Name |
| payerEmail | string | Payer Email |
| payerAddress | string | Payer Address |
| payerPhone | string | Payer Phone |
| status | string | Invoice Status |
| issuedAt | number | Issued Date |
| createdAt | number | Created Date |
| updatedAt | number | Updated Date |
| Name | Type | Description |
|---|---|---|
| id | number | Team Subscription ID |
| teamId | number | Team Id |
| planType | TPlanType | Plan Type: BEGINNER, PROFESSIONAL, ENTERPRISE
|
| startDate | number | Subscription Start Date |
| expiredDate | number | Subscription Expiration Date |
| createdAt | number | Subscription Creation Date |
| updatedAt | number | Subscription Update Date |
{
"powerby": "iSunFA v0.9.1+122",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"teamInvoice": {
"id": 1,
"teamOrderId": 1001,
"teamPaymentTransactionId": 1001,
"invoiceCode": "INV-20250328-001",
"price": 1000,
"tax": 50,
"total": 1050,
"currency": "TWD",
"payerId": "PAYER-001",
"payerName": "John Doe",
"payerEmail": "JohnDoe@gmail.com",
"payerAddress": "123 Main St, Taipei",
"payerPhone": "+0 (000) 123-4567",
"status": "PAID",
"issuedAt": 1742345466,
"createdAt": 1742345466,
"updatedAt": 1742345466
},
"teamSubscription": {
"id": 1,
"teamId": 1001,
"planType": "PROFESSIONAL",
"startDate": 1742345466,
"endDate": 1742345466,
"status": "ACTIVE",
"createdAt": 1742345466,
"updatedAt": 1742345466
}
}
}- Description:
- 建立一個新的團隊,指定 團隊名稱、方案、描述、圖片、銀行資訊,並可選擇 預先邀請成員。
-
創建者將自動成為該團隊的
OWNER。
POST /api/v2/team| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
name |
string |
✅ | 團隊名稱 |
members |
string[] |
❌ | 預先邀請的成員 Email 陣列(可選) |
planType |
string |
✅ | 訂閱方案 (beginner, professional, enterprise) |
about |
string |
❌ | 團隊簡介(可選) |
profile |
string |
❌ | 團隊圖片 URL(可選) |
bankInfo |
object |
❌ | 團隊銀行帳戶資訊(可選) |
bankInfo.code |
number |
❌ | 銀行代碼 |
bankInfo.number |
string |
❌ | 銀行帳戶號碼 |
{
"name": "Team A",
"members": ["joycewu@gmail.com", "example@gmail.com"],
"planType": "professional",
}| 參數名稱 | 類型 | 描述 |
|---|---|---|
powerby |
string |
API 版本 |
success |
boolean |
API 是否成功 |
code |
string |
回應狀態碼 |
message |
string |
API 回應訊息 |
payload |
ITeam |
創建成功的團隊資訊 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
id |
string |
團隊唯一識別 ID |
imageId |
string |
團隊圖片 ID |
role |
string |
用戶在團隊內的角色 (owner, admin, editor, viewer) |
name |
object |
團隊名稱 |
name.value |
string |
團隊名稱值 |
name.editable |
boolean |
名稱是否可編輯 |
about |
object |
團隊描述 |
about.value |
string |
團隊描述內容 |
about.editable |
boolean |
描述是否可編輯 |
profile |
object |
團隊資訊 |
profile.value |
string |
團隊網站或相關資訊 |
profile.editable |
boolean |
是否可編輯 |
planType |
object |
訂閱方案 |
planType.value |
string |
訂閱方案 (beginner, professional, enterprise) |
planType.editable |
boolean |
方案是否可更改 |
totalMembers |
number |
團隊成員總數 |
totalAccountBooks |
number |
團隊擁有的帳本數量 |
bankAccount |
object |
團隊銀行帳戶 |
bankAccount.value |
string |
銀行帳戶號碼 |
bankAccount.editable |
boolean |
銀行帳戶是否可編輯 |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "Team created successfully",
"payload": {
"id": "TeamUID00001",
"imageId": "/images/fake_team_img.svg",
"role": "OWNER",
"name": {
"value": "Team A",
"editable": true
},
"about": {
"value": "This is a new team",
"editable": true
},
"profile": {
"value": "https://example.com/team-logo.png",
"editable": true
},
"planType": {
"value": "professional",
"editable": true
},
"totalMembers": 1,
"totalAccountBooks": 0,
"bankAccount": {
"value": "987654321",
"editable": true
}
}
}{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "400ISF0001",
"message": "Invalid team name",
"payload": null
}- Description: 根據
userId獲取團隊列表,並支援 分頁與排序。
GET /api/v2/team| 參數名稱 | 類型 | 必填 | 預設值 | 描述 |
|---|---|---|---|---|
page |
number | ❌ | 1 |
當前頁數 |
pageSize |
number | ❌ | 10 |
每頁顯示的項目數 |
startDate |
number | ❌ | 0 |
起始日期(UNIX 時間戳,單位:秒) |
endDate |
number | ❌ | 當前日期 |
結束日期(UNIX 時間戳,單位:秒) |
sortOption |
string | ❌ | '' |
排序選項,格式為 "field:order",多個排序條件使用 - 連接。例如:name:asc-createdAt:desc。 |
searchQuery |
string | ❌ | '' |
搜尋關鍵字 |
GET /api/v2/team?page={page}&pageSize={pageSize}&sortBy={sortBy}&sortOrder={sortOrder}| 參數名稱 | 類型 | 描述 |
|---|---|---|
powerby |
string |
API 版本 |
success |
boolean |
API 是否成功 |
code |
string |
回應狀態碼 |
message |
string |
API 回應訊息 |
payload |
IPaginatedData<ITeam[]> |
回應數據 |
| name | type | description |
|---|---|---|
| data | ITeam[] | The team data |
| page | number | The page number |
| totalPages | number | The total number of pages |
| totalCount | number | The total number of items |
| pageSize | number | The number of items per page |
| hasNextPage | boolean | Indicates if there is a next page |
| hasPreviousPage | boolean | Indicates if there is a previous page |
| sort | {sortBy: string, sortOrder: string}[] | The order and field to sort by |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
id |
string |
團隊唯一識別 ID |
imageId |
string |
團隊圖片 ID |
role |
string |
用戶在團隊內的角色 (owner, admin, editor, viewer) |
name |
object |
團隊名稱 |
name.value |
string |
團隊名稱值 |
name.editable |
boolean |
名稱是否可編輯 |
about |
object |
團隊描述 |
about.value |
string |
團隊描述內容 |
about.editable |
boolean |
描述是否可編輯 |
profile |
object |
團隊資訊 |
profile.value |
string |
團隊網站或相關資訊 |
profile.editable |
boolean |
是否可編輯 |
planType |
object |
訂閱方案 |
planType.value |
string |
訂閱方案 (beginner, professional, enterprise) |
planType.editable |
boolean |
方案是否可更改 |
totalMembers |
number |
團隊成員總數 |
totalAccountBooks |
number |
團隊擁有的帳本數量 |
bankAccount |
object |
團隊銀行帳戶 |
bankAccount.value |
string |
銀行帳戶號碼 |
bankAccount.editable |
boolean |
銀行帳戶是否可編輯 |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"id": "TeamUID00001",
"imageId": "/images/fake_team_img.svg",
"role": "owner",
"name": {
"value": "Team A",
"editable": true
},
"about": {
"value": "About Team A",
"editable": true
},
"profile": {
"value": "https://isunfa.com",
"editable": true
},
"planType": {
"value": "enterprise",
"editable": true
},
"totalMembers": 6,
"totalAccountBooks": 3,
"bankAccount": {
"value": "12345678",
"editable": true
}
}
],
"page": 1,
"totalPages": 1,
"totalCount": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": []
}
}- Description: 根據
teamId獲取團隊資訊**。
GET /api/v2/team/[:teamId]| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
teamId |
string |
✅ | 團隊 id |
GET /api/v2/team/TeamUID00001| 參數名稱 | 類型 | 描述 |
|---|---|---|
powerby |
string |
API 版本 |
success |
boolean |
API 是否成功 |
code |
string |
回應狀態碼 |
message |
string |
API 回應訊息 |
payload |
ITeam |
回應數據 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
id |
string |
團隊唯一識別 ID |
imageId |
string |
團隊圖片 ID |
role |
string |
用戶在團隊內的角色 (owner, admin, editor, viewer) |
name |
object |
團隊名稱 |
name.value |
string |
團隊名稱值 |
name.editable |
boolean |
名稱是否可編輯 |
about |
object |
團隊描述 |
about.value |
string |
團隊描述內容 |
about.editable |
boolean |
描述是否可編輯 |
profile |
object |
團隊資訊 |
profile.value |
string |
團隊網站或相關資訊 |
profile.editable |
boolean |
是否可編輯 |
planType |
object |
訂閱方案 |
planType.value |
string |
訂閱方案 (beginner, professional, enterprise) |
planType.editable |
boolean |
方案是否可更改 |
totalMembers |
number |
團隊成員總數 |
totalAccountBooks |
number |
團隊擁有的帳本數量 |
bankAccount |
object |
團隊銀行帳戶 |
bankAccount.value |
string |
銀行帳戶號碼 |
bankAccount.editable |
boolean |
銀行帳戶是否可編輯 |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": {
"id": "TeamUID00001",
"imageId": "/images/fake_team_img.svg",
"role": "owner",
"name": {
"value": "Team A",
"editable": true
},
"about": {
"value": "About Team A",
"editable": true
},
"profile": {
"value": "https://isunfa.com",
"editable": true
},
"planType": {
"value": "enterprise",
"editable": true
},
"totalMembers": 6,
"totalAccountBooks": 3,
"bankAccount": {
"value": "12345678",
"editable": true
}
}
}- Description: List all available subscription plans (including all supported language versions)
GET /payment_planNo parameters required.
GET /payment_plan| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | PaymentPlan[] | List of plans |
| Name | Type | Description |
|---|---|---|
| id | string | Feature identifier |
| name | string | Feature name of locale key |
| value | string or string[] | Feature value of locale key |
| Name | Type | Description |
|---|---|---|
| id | string | Plan identifier |
| planName | string | Plan display name |
| price | number | Plan price (NTD/month) |
| extraMemberPrice | number | Additional member price (NTD/month/person) |
| features | Feature[] | List of plan features |
| isActive | boolean | Whether the plan is active |
| createdAt | number | Creation timestamp (seconds) |
| updatedAt | number | Update timestamp (seconds) |
| deletedAt | number | Deletion timestamp (seconds) |
{
"powerby": "iSunFA v0.9.1+50",
"success": true,
"code": "200ISF0002",
"message": "Get successfully",
"payload": [
{
"id": "BEGINNER",
"planName": "Beginner",
"price": 0,
"extraMemberPrice": 0,
"features": [
{
"id": "cloud_storage",
"name": "CLOUD_STORAGE",
"value": "10GB"
},
{
"id": "ai_assistant",
"name": "AI_ASSISTANT",
"value": "LIMITED_CAPACITY"
},
{
"id": "report_generation",
"name": "REPORT_GENERATION",
"value": "UNLIMITED"
},
{
"id": "financial_statements",
"name": "FINANCIAL_STATEMENTS",
"value": "MANUAL_DOWNLOAD"
},
{
"id": "matchmaking_platform",
"name": "MATCHMAKING_PLATFORM",
"value": "TASK_ACCEPTANCE_ONLY"
},
{
"id": "team_members",
"name": "TEAM_MEMBERS",
"value": "LIMITED_TO_1_PERSON"
},
{
"id": "customer_support",
"name": "CUSTOMER_SUPPORT",
"value": "LIVE_CHAT_SUPPORT"
}
],
"isActive": true,
"createdAt": 1725372460,
"updatedAt": 1725372460,
"deletedAt": 0
},
{
"id": "PROFESSIONAL",
"planName": "Professional",
"price": 899,
"extraMemberPrice": 0,
"features": [
{
"id": "cloud_storage",
"name": "CLOUD_STORAGE",
"value": "1TB"
},
{
"id": "ai_assistant",
"name": "AI_ASSISTANT",
"value": "UNLIMITED_CAPACITY"
},
{
"id": "matchmaking_platform",
"name": "MATCHMAKING_PLATFORM",
"value": "POST_TASK_REQUIREMENTS"
},
{
"id": "team_members",
"name": "TEAM_MEMBERS",
"value": "UP_TO_10_PEOPLE"
},
{
"id": "financial_statements",
"name": "FINANCIAL_STATEMENTS",
"value": "AUTO_UPDATED"
},
{
"id": "technical_support",
"name": "TECHNICAL_SUPPORT",
"value": "UP_TO_24_HOURS_IN_TOTAL_4_HOURS_PER_SESSION"
},
{
"id": "additional_perks",
"name": "ADDITIONAL_PERKS",
"value": "10_ASSET_TAGGING_STICKERS"
}
],
"isActive": false,
"createdAt": 1725372460,
"updatedAt": 1725372460,
"deletedAt": 0
},
{
"id": "ENTERPRISE",
"planName": "Enterprise",
"price": 8990,
"extraMemberPrice": 89,
"features": [
{
"id": "cloud_storage",
"name": "CLOUD_STORAGE",
"value": "UNLIMITED"
},
{
"id": "report_generation",
"name": "REPORT_GENERATION",
"value": "CUSTOMIZABLE_REPORTS"
},
{
"id": "matchmaking_platform",
"name": "MATCHMAKING_PLATFORM",
"value": "PRIORITY_VISIBILITY"
},
{
"id": "team_members",
"name": "TEAM_MEMBERS",
"value": "UNLIMITED"
},
{
"id": "financial_statements",
"name": "FINANCIAL_STATEMENTS",
"value": "AUTO_UPDATED"
},
{
"id": "api_integration",
"name": "API_INTEGRATION",
"value": "SYSTEM_SUPPORT"
},
{
"id": "technical_support",
"name": "TECHNICAL_SUPPORT",
"value": "UP_TO_48_HOURS_IN_TOTAL_4_HOURS_PER_SESSION"
},
{
"id": "additional_perks",
"name": "ADDITIONAL_PERKS",
"value": [
"100_ASSET_TAGGING_STICKERS",
"ONLINE_AND_OFFLINE_INTEGRATION",
"HARDWARE_SUPPORT"
]
}
],
"isActive": false,
"createdAt": 1725372460,
"updatedAt": 1725372460,
"deletedAt": 0
}
]
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description: List all account books and their team information based on user ID
GET /user/:userId/account_book| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| userId | string | User ID | Yes | -- |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| page | number | Page number | No | 1 |
| pageSize | number | Items per page | No | 10 |
| searchQuery | string | Search query | No | -- |
| sortOption | string | Sort options sortBy:sortOrder multiple conditions separated by -
|
no | CreatedAt:desc |
Available fields for sorting:
-
CreatedAt- Created at -
UpdatedAt- Updated at
-
asc- ascending -
desc- descending
GET /user/10000003/account_book?page=1&pageSize=10&searchQuery=burger&sortOption=CreatedAt:desc| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IPaginatedData<IAccountBookForUserWithTeam[]> | Paginated list of account books |
| Name | Type | Description |
|---|---|---|
| data | IAccountBookForUserWithTeam[] | List of account books with team information |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of items |
| pageSize | number | Number of items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| sort | any[] | Sort configuration |
| Name | Type | Description |
|---|---|---|
| company | IAccountBook | Account book information |
| team | ITeam | Team information |
| tag | string | Work tag |
| order | number | Sort order |
| role | IRole | User role and permissions |
| isTransferring | boolean | Whether transfer is in progress |
| Name | Type | Description |
|---|---|---|
| id | number | Account book ID |
| imageId | string | Account book image URL |
| name | string | Account book name |
| taxId | string | Tax ID number |
| startDate | number | Start date (timestamp) |
| createdAt | number | Creation time (timestamp) |
| updatedAt | number | Update time (timestamp) |
| isPrivate | boolean | Whether it's private |
| Name | Type | Description |
|---|---|---|
| id | string | Team ID |
| imageId | string | Team image URL |
| role | string | Role in team |
| name | IEditable | Team name |
| about | IEditable | Team description |
| profile | IEditable | Team profile URL |
| planType | IEditable | Subscription plan type |
| totalMembers | number | Total number of members |
| totalAccountBooks | number | Total number of account books |
| bankAccount | IEditable | Bank account information |
| Name | Type | Description |
|---|---|---|
| id | number | Role ID |
| name | string | Role name |
| permissions | string[] | List of permissions |
| createdAt | number | Creation time (timestamp) |
| updatedAt | number | Update time (timestamp) |
| Name | Type | Description |
|---|---|---|
| value | T | Field value |
| editable | boolean | Whether field is editable |
{
"powerby": "iSunFA v0.9.1+29",
"success": true,
"code": "200ISF0001",
"message": "List successfully",
"payload": {
"data": [
{
"company": {
"id": 10000001,
"imageId": "https://example.com/images/burger-king.png",
"name": "BURGER KING",
"taxId": "12345678",
"startDate": 1725372460,
"createdAt": 1725372460,
"updatedAt": 1725372460,
"isPrivate": false
},
"tag": "financial",
"order": 1,
"role": {
"id": 1,
"name": "ADMIN",
"permissions": [
"READ",
"WRITE",
"DELETE"
],
"createdAt": 1725372460,
"updatedAt": 1725372460
},
"team": {
"id": "10000001",
"imageId": "https://example.com/images/team-a.png",
"role": "owner",
"name": {
"value": "Joyce's Team A",
"editable": true
},
"about": {
"value": "Team A for BURGER KING",
"editable": true
},
"profile": {
"value": "https://isunfa.com",
"editable": true
},
"planType": {
"value": "enterprise",
"editable": true
},
"totalMembers": 6,
"totalAccountBooks": 3,
"bankAccount": {
"value": "12345678",
"editable": true
}
},
"isTransferring": true
},
{
"company": {
"id": 10000002,
"imageId": "https://example.com/images/burger-queen.png",
"name": "BURGER QUEEN",
"taxId": "87654321",
"startDate": 1725372460,
"createdAt": 1725372460,
"updatedAt": 1725372460,
"isPrivate": false
},
"tag": "tax",
"order": 2,
"role": {
"id": 2,
"name": "MEMBER",
"permissions": [
"READ",
"WRITE"
],
"createdAt": 1725372460,
"updatedAt": 1725372460
},
"team": {
"id": "10000001",
"imageId": "https://example.com/images/team-a.png",
"role": "owner",
"name": {
"value": "Joyce's Team A",
"editable": true
},
"about": {
"value": "Team A for BURGER QUEEN",
"editable": true
},
"profile": {
"value": "https://isunfa.com",
"editable": true
},
"planType": {
"value": "enterprise",
"editable": true
},
"totalMembers": 6,
"totalAccountBooks": 3,
"bankAccount": {
"value": "12345678",
"editable": true
}
},
"isTransferring": false
},
{
"company": {
"id": 10000003,
"imageId": "https://example.com/images/burger-knight.png",
"name": "BURGER KNIGHT",
"taxId": "13579246",
"startDate": 1725372460,
"createdAt": 1725372460,
"updatedAt": 1725372460,
"isPrivate": true
},
"tag": "all",
"order": 3,
"role": {
"id": 1,
"name": "ADMIN",
"permissions": [
"READ",
"WRITE",
"DELETE"
],
"createdAt": 1725372460,
"updatedAt": 1725372460
},
"team": {
"id": "10000002",
"imageId": "https://example.com/images/team-b.png",
"role": "admin",
"name": {
"value": "Joyce's Team B",
"editable": true
},
"about": {
"value": "Team B for BURGER KNIGHT",
"editable": true
},
"profile": {
"value": "https://isunfa.com",
"editable": true
},
"planType": {
"value": "professional",
"editable": true
},
"totalMembers": 2,
"totalAccountBooks": 2,
"bankAccount": {
"value": "87654321",
"editable": true
}
},
"isTransferring": false
}
],
"page": 1,
"totalPages": 1,
"totalCount": 3,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": []
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description: 此 API 用於根據
teamId查詢團隊所屬的帳本資訊,並支援 分頁。
GET /api/v2/team/:teamId/account_book| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
teamId |
string |
✅ | 團隊 id |
| 參數名稱 | 類型 | 必填 | 預設值 | 描述 |
|---|---|---|---|---|
page |
number | ❌ | 1 |
當前頁數 |
pageSize |
number | ❌ | 10 |
每頁顯示的項目數 |
startDate |
number | ❌ | 0 |
起始日期(UNIX 時間戳,單位:秒) |
endDate |
number | ❌ | 當前日期 |
結束日期(UNIX 時間戳,單位:秒) |
sortOption |
string | ❌ | '' |
排序選項,格式為 "field:order",多個排序條件使用 - 連接。例如:name:asc-createdAt:desc。 |
searchQuery |
string | ❌ | '' |
搜尋關鍵字 |
GET /api/v2/team/:teamId/account_book?page={page}&pageSize={pageSize}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IPaginatedData<IAccountBookForUser[]> | Paginated list of account books |
| Name | Type | Description |
|---|---|---|
| data | IAccountBookForUser[] | List of account books |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of items |
| pageSize | number | Items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
company |
ICompany |
公司資訊 |
tag |
string |
帳本類型標籤 (accounting, auditing, consulting 等) |
order |
number |
帳本排序 |
role |
IRole |
使用者在該帳本的角色 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
id |
number |
公司 ID |
imageId |
string |
公司圖片 ID |
name |
string |
公司名稱 |
taxId |
string |
統一編號 |
startDate |
number |
開始日期 (UNIX timestamp) |
createdAt |
number |
創建時間 (UNIX timestamp) |
updatedAt |
number |
更新時間 (UNIX timestamp) |
isPrivate |
boolean |
是否為私有公司 (選填) |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
id |
number |
角色 ID |
name |
string |
角色名稱 |
permissions |
string[] |
該角色的權限 (如 ["view_reports", "edit_transactions"]) |
createdAt |
number |
角色創建時間 (UNIX timestamp) |
updatedAt |
number |
角色更新時間 (UNIX timestamp) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"company": {
"id": 1,
"imageId": "/images/company_1.svg",
"name": "Company A",
"taxId": "12345678",
"startDate": 1672531200,
"createdAt": 1672531200,
"updatedAt": 1672617600,
"isPrivate": false
},
"tag": "accounting",
"order": 1,
"role": {
"id": 1,
"name": "Accountant",
"permissions": ["view_reports", "edit_transactions"],
"createdAt": 1672531200,
"updatedAt": 1672617600
}
}
],
"page": 1,
"totalPages": 1,
"totalCount": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": []
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description: 此 API 用於根據 teamId 查詢團隊成員資訊,並支援 分頁。
GET /api/v2/team/:teamId/member| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
teamId |
string |
✅ | 團隊 id |
| 參數名稱 | 類型 | 必填 | 預設值 | 描述 |
|---|---|---|---|---|
page |
number | ❌ | 1 |
當前頁數 |
pageSize |
number | ❌ | 10 |
每頁顯示的項目數 |
startDate |
number | ❌ | 0 |
起始日期(UNIX 時間戳,單位:秒) |
endDate |
number | ❌ | 當前日期 |
結束日期(UNIX 時間戳,單位:秒) |
sortOption |
string | ❌ | '' |
排序選項,格式為 "field:order",多個排序條件使用 - 連接。例如:name:asc-createdAt:desc。 |
searchQuery |
string | ❌ | '' |
搜尋關鍵字 |
GET /api/v2/team/:teamId/member?page={page}&pageSize={pageSize}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IPaginatedData<ITeamMember[]> | Paginated list of account books |
| Name | Type | Description |
|---|---|---|
| data | ITeamMember[] | List of account books |
| page | number | Current page number |
| totalPages | number | Total number of pages |
| totalCount | number | Total number of items |
| pageSize | number | Items per page |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
id |
string | 成員唯一識別 ID |
name |
string | 成員名稱 |
imageId |
string | 成員頭像 ID |
email |
string | 成員電子郵件 |
role |
string | 成員在團隊內的角色(OWNER、ADMIN、EDITOR、VIEWER) |
editable |
boolean | 是否可編輯該成員資訊 |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"id": "MemberUID00001",
"name": "User A",
"imageId": "/images/fake_avatar.png",
"email": "MemberUID00001@gmail.com",
"role": "OWNER",
"editable": false
},
{
"id": "MemberUID00002",
"name": "User B",
"imageId": "/images/fake_avatar.png",
"email": "MemberUID00002@gmail.com",
"role": "ADMIN",
"editable": true
}
// 其他成員資料...
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": []
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description: - 輸入多個 Email,邀請成員加入指定團隊。
PUT /api/v2/team/:teamId/member| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
teamId |
string |
✅ | 團隊 id |
| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
emails |
string[] |
✅ | 要邀請的email清單 |
["joycewu@gmail.com", "example@gmail.com"]GET /api/v2/team/:teamId/member?page={page}&pageSize={pageSize}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IInviteMemberResponse | 邀請結果 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
invitedCount |
number |
成功邀請的用戶數 |
failedEmails |
string[] |
失敗的 Email 陣列(若有) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "Invites sent successfully",
"payload": {
"invitedCount": 2,
"failedEmails": []
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description:
-
只有
ADMIN以上 (OWNER&ADMIN) 不能直接離開團隊。 -
EDITOR&VIEWER可直接離開團隊。
-
只有
GET /api/v2/team/:teamId/leave| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
teamId |
string |
✅ | 團隊 id |
GET /api/v2/team/:teamId/leave| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | ILeaveTeam | 離開團隊的狀態 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
teamId |
string |
目標團隊 ID |
userId |
string |
退出的使用者 ID |
role |
TeamRole |
用戶在團隊中的角色 (OWNER, ADMIN, EDITOR, VIEWER) |
status |
LeaveTeamStatus |
是否成功離開團隊 (LEFT, FAILED) |
leavedAt |
number |
起始日期(UNIX 時間戳,單位:秒) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "User has left the team",
"payload": {
"teamId": "TeamUID00001",
"userId": 123,
"role": "VIEWER",
"status": "LEFT",
"leavedAt": "1672617600",
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description:
- 申請將帳本轉移到另一個團隊,所有相關數據(包含公司資料、財務紀錄)將會一起轉移。
-
需要提供目標團隊
fromTeamId、toTeamId,確保該團隊 有權限且能夠管理 該帳本。
POST /api/v2/account_book/:accountBookId/transfer| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
accountBookId |
number |
✅ | 帳本 id |
POST /api/v2/account_book/10001/transfer{
"fromTeamId": 100001,
"toTeamId": 100002,
}| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
fromTeamId |
number |
✅ | 轉移帳本的原團隊 ID |
toTeamId |
number |
✅ | 接收帳本的目標團隊 ID |
| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | ITransferLedger | 帳本轉移狀態 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
accountBookId |
number |
帳本 ID |
fromTeamId |
number |
原始團隊 ID |
toTeamId |
number |
目標團隊 ID |
status |
`"TransferStatus" | 轉移結果 (PENDING, COMPLETED, CANCELED, DECLINED, FAILED) |
transferedAt |
number |
起始日期(UNIX 時間戳,單位:秒) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "User has left the team",
"payload": {
"fromTeamId": 100001,
"toTeamId": 100002,
"status": "PENDING"
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description:
- 取消申請將帳本轉移到另一個團隊。
GET /api/v2/account_book/:accountBookId/cancel| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
accountBookId |
number |
✅ | 帳本 id |
GET /api/v2/account_book/10001/cancel| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | ITransferLedger | 帳本轉移狀態 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
accountBookId |
number |
帳本 ID |
fromTeamId |
number |
原始團隊 ID |
toTeamId |
number |
目標團隊 ID |
status |
`"TransferStatus" | 轉移結果 (PENDING, COMPLETED, CANCELED, DECLINED, FAILED) |
transferedAt |
number |
起始日期(UNIX 時間戳,單位:秒) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "User has left the team",
"payload": {
"fromTeamId": 100001,
"toTeamId": 100002,
"status": "CANCELED"
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description:
- 接受其他團隊轉移過來的帳本。
GET /api/v2/account_book/:accountBookId/accept| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
accountBookId |
number |
✅ | 帳本 id |
GET /api/v2/account_book/10001/accept| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | ITransferLedger | 帳本轉移狀態 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
accountBookId |
number |
帳本 ID |
fromTeamId |
number |
原始團隊 ID |
toTeamId |
number |
目標團隊 ID |
status |
`"TransferStatus" | 轉移結果 (PENDING, COMPLETED, CANCELED, DECLINED, FAILED) |
transferedAt |
number |
起始日期(UNIX 時間戳,單位:秒) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "User has left the team",
"payload": {
"fromTeamId": 100001,
"toTeamId": 100002,
"status": "COMPLETED"
"transferedAt": 1672617600,
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- Description:
- 拒絕其他團隊轉移過來的帳本。
GET /api/v2/account_book/:accountBookId/decline| 參數名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
accountBookId |
number |
✅ | 帳本 id |
GET /api/v2/account_book/10001/decline| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | ITransferLedger | 帳本轉移狀態 |
| 參數名稱 | 類型 | 描述 |
|---|---|---|
accountBookId |
number |
帳本 ID |
fromTeamId |
number |
原始團隊 ID |
toTeamId |
number |
目標團隊 ID |
status |
`"TransferStatus" | 轉移結果 (PENDING, COMPLETED, CANCELED, DECLINED, FAILED) |
transferedAt |
number |
起始日期(UNIX 時間戳,單位:秒) |
{
"powerby": "iSunFA v0.9.1+20",
"success": true,
"code": "200ISF0000",
"message": "User has left the team",
"payload": {
"fromTeamId": 100001,
"toTeamId": 100002,
"status": "DECLINED"
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+19",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": null
}- description: Connect to a specific account book by its ID
GET /account_book/:accountBookId/connect| name | type | description | required | default |
|---|---|---|---|---|
| accountBookId | number | ID of the account book | true | -- |
GET /account_book/1/connect| name | type | description |
|---|---|---|
| powerby | string | Version of the API |
| success | boolean | Indicates whether the request was successful |
| code | string | Response code |
| message | string | Detailed message of the request result |
| payload | object | IAccountBook object |
The payload adheres to the IAccountBook interface which contains the following fields:
| name | type | description |
|---|---|---|
| id | number | Unique identifier of the account book |
| imageId | string | URL of the account book image |
| name | string | Name of the account book |
| taxId | string | Tax identification number |
| startDate | number | Start date as a Unix timestamp |
| createdAt | number | Creation timestamp |
| updatedAt | number | Update timestamp |
| isPrivate | boolean | Indicates if the account book is private |
- Success
{
"powerby": "iSunFA v0.9.1+71",
"success": true,
"code": "200ISF0002",
"message": "Get successfully",
"payload": {
"id": 10000004,
"imageId": "https://storage.googleapis.com/mermer-offical-km/ISunFa/c3af5a74-ac6e-4fae-85fc-bacc632b3022.svg",
"name": "second company",
"taxId": "4864648",
"startDate": 1725372616,
"createdAt": 1725372616,
"updatedAt": 1725372616,
"isPrivate": true
}
}- Failed
{
"powerby": "iSunFA v0.9.1+71",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Update team information by team ID
PUT /team/:teamId| name | type | description | required | default |
|---|---|---|---|---|
| teamId | number | ID of the team | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| name | string | New name for the team | false | -- |
| about | string | New description for the team | false | -- |
| profile | string | New profile for the team | false | -- |
| bankInfo | {code: string, account: string} | New bank account for the team | false | -- |
PUT /team/1
const body = {
"name": "Joyce's Team",
"about": "Enter a description for your team",
"profile": "https://www.isunfa.com/profile/123",
"bankInfo": {
"code": "001",
"account": "1234567890"
}
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | payload | response data |
| name | type | description |
|---|---|---|
| id | number | ID of the team |
| name | string | Name of the team |
| about | string | Description of the team |
| profile | string | Profile of the team |
| bankInfo | {code: string, account: string} | Bank account of the team |
- success
{
"powerby": "iSunFA v0.9.1+30",
"success": true,
"code": "200ISF0003",
"message": "Update successfully",
"payload": {
"id": 1,
"name": "Joyce's Team",
"about": "Enter a description for your team",
"profile": "https://www.isunfa.com/profile/123",
"bankInfo": {
"code": "001",
"account": "1234567890"
}
}
}
- failed
{
"powerby": "iSunFA v0.9.1+30",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Update a team member's role by member ID
PUT /team/:teamId/member/:memberId| name | type | description | required | default |
|---|---|---|---|---|
| teamId | number | ID of the team | true | -- |
| memberId | number | ID of the member | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| role | string | New role for the member (owner, admin, editor, viewer) | true | -- |
PUT /team/1/member/123
const body = {
"role": "editor"
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IMember | response data |
| name | type | description |
|---|---|---|
| id | number | ID of the member |
| userId | number | ID of the user |
| teamId | number | ID of the team |
| role | string | Role of the member |
| string | Email of the user | |
| name | string | Name of the user |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- success
{
"powerby": "iSunFA v0.9.1+30",
"success": true,
"code": "200ISF0003",
"message": "Update successfully",
"payload": {
"id": 123,
"userId": 456,
"teamId": 1,
"role": "editor",
"email": "joycewu@isuncloud.com",
"name": "Joyce Wu",
"createdAt": 1633036800,
"updatedAt": 1633036800
}
}- failed
{
"powerby": "iSunFA v0.9.1+30",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Remove a member from a team by member ID
DELETE /team/:teamId/member/:memberId| name | type | description | required | default |
|---|---|---|---|---|
| teamId | number | ID of the team | true | -- |
| memberId | number | ID of the member | true | -- |
DELETE /team/1/member/123| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | object | response data |
- success
{
"powerby": "iSunFA v0.9.1+30",
"success": true,
"code": "200ISF0004",
"message": "Delete successfully",
"payload": {
"memberId": 123
}
}- failed
{
"powerby": "iSunFA v0.9.1+30",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Get account book info by book ID
GET /account_book/:accountBookId/info| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
| accountBookId | string | The ID of the account book | Yes | -- |
GET /account_book/123/info| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IAccountBookDetails | Account book detailed data |
| Name | Type | Description |
|---|---|---|
| id | string | Account book ID |
| name | string | Account book name |
| taxId | string | Account book tax ID |
| taxSerialNumber | string | Account book tax serial number |
| representativeName | string | Account book representative name |
| country | ICountry | Account book country |
| phoneNumber | string | Account book phone number |
| address | string | Account book address |
| startDate | number | Account book start date, timestamp in seconds |
| createdAt | number | Creation timestamp, seconds |
| updatedAt | number | Last update timestamp, seconds |
| Name | Type | Description |
|---|---|---|
| id | string | Country ID |
| code | string | Country code |
| name | string | Country name |
| localeKey | string | Country locale key |
| currencyCode | string | Country currency code |
| phoneCode | string | Country phone code |
| phoneExample | string | Country phone example |
- Successful response
{
"powerby": "iSunFA v0.9.1+34",
"success": true,
"code": "200ISF0002",
"message": "Get successfully",
"payload": {
"id": "1238",
"name": "Account Book Name",
"taxId": "1234567890",
"taxSerialNumber": "1234567890",
"representativeName": "Representative Name",
"country": {
"id": "123456",
"code": "tw",
"name": "Taiwan",
"localeKey": "tw",
"currencyCode": "TWD",
"phoneCode": "+886",
"phoneExample": "0912345678"
},
"phoneNumber": "0912345678",
"address": "No. 1, Section 5, Xinyi Road, Xinyi District, Taipei City 110, Taiwan",
"startDate": 1609459200,
"createdAt": 1609459200,
"updatedAt": 1609459200
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+34",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Upload a team picture file without encryption
POST /file| name | type | description | required | default |
|---|---|---|---|---|
| type | string | type of the file (use "team") | yes | - |
| targetId | number | id of the team | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| formData | formData | form data of the file | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| file | file | file to upload | yes | - |
POST /file?type=team&targetId=123
const body = {
"formData": {
"file": file
}
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA version |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | IFileBeta | response data or {} |
| name | type | description |
|---|---|---|
| id | number | id of the file |
| name | string | name of the file |
| size | number | size of the file |
| existed | boolean | existed or not |
| url | string | url of the file |
- Successful response
{
"powerby": "iSunFA v0.9.1+34",
"success": true,
"code": "201ISF0001",
"message": "Created successfully",
"payload":
{
"id": 12345,
"name": "team_picture_12345.jpg",
"size": 123456,
"existed": true,
"url": "/image/12345"
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+34",
"success": false,
"code": "400ISF0000",
"message": "Bad request",
"payload": null
}- description: Update team icon with an uploaded file
PUT /team/:teamId/icon| name | type | description | required | default |
|---|---|---|---|---|
| teamId | number | id of the team | yes | - |
| name | type | description | required | default |
|---|---|---|---|---|
| fileId | number | id of the uploaded file | yes | - |
PUT /team/123/icon
const body = {
"fileId": 12345
}| name | type | description |
|---|---|---|
| powerby | string | iSunFA version |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | ITeamWithImage | response data or {} |
| name | type | description |
|---|---|---|
| id | number | id of the team |
| name | string | name of the team |
| imageId | number | id of the team image |
| imageFile | IFile | team image file details |
| createdAt | number | creation timestamp, seconds |
| updatedAt | number | last update timestamp, seconds |
| name | type | description |
|---|---|---|
| id | number | id of the file |
| name | string | name of the file |
| size | number | size of the file |
| mimeType | string | mime type of the file |
| url | string | url of the file |
| type | string | type of the file |
| createdAt | number | creation timestamp, seconds |
| updatedAt | number | last update timestamp, seconds |
- Successful response
{
"powerby": "iSunFA v0.9.1+34",
"success": true,
"code": "200ISF0003",
"message": "Update successfully",
"payload": {
"id": 123,
"name": "Team Name",
"imageId": 12345,
"imageFile": {
"id": 12345,
"name": "team_picture_12345.jpg",
"size": 123456,
"mimeType": "image/jpeg",
"url": "https://storage.googleapis.com/isunfa-images/team/team_picture_12345.jpg",
"type": "team",
"createdAt": 1609459200,
"updatedAt": 1609459200
},
"createdAt": 1609459200,
"updatedAt": 1609459200
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+34",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Update account book by book ID
PUT /account_book/:accountBookId| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
| accountBookId | string | The ID of the account book | Yes | -- |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| action | string | enum: ACCOUNT_BOOK_UPDATE_ACTION
|
Yes | -- |
| isPrivate | boolean | Account book visibility (false for public, true for private) | No | -- |
| tag | string | Work tag | No | -- |
PUT /account_book/10001285
const body = {
"action": "updateVisibility",
"isPrivate": false
}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IResponse | Updated account book data |
| Name | Type | Description |
|---|---|---|
| teamId | number | Team ID |
| company | IAccountBook | Company (account book) information |
| tag | string | Work tag |
| order | number | Order of the account book |
| role | IRole | User role information |
| Name | Type | Description |
|---|---|---|
| id | number | Account book ID |
| name | string | Account book name |
| taxId | string | Account book tax ID |
| isPrivate | boolean | Account book visibility status |
| startDate | number | Start date timestamp, seconds |
| createdAt | number | Creation timestamp, seconds |
| updatedAt | number | Last update timestamp, seconds |
| imageId | string | Image URL of the account book |
| Name | Type | Description |
|---|---|---|
| id | number | Role ID |
| type | string | Role type |
| name | string | Role name |
| permissions | array | Role permissions |
| createdAt | number | Creation timestamp, seconds |
| updatedAt | number | Last update timestamp, seconds |
- Successful response
{
"powerby": "iSunFA v0.9.1+60",
"success": true,
"code": "200ISF0003",
"message": "Update successfully",
"payload": {
"teamId": 6,
"company": {
"id": 10001285,
"name": "asdf",
"taxId": "6545968113165",
"isPrivate": false,
"startDate": 1741667417,
"createdAt": 1741667417,
"updatedAt": 1741669535,
"imageId": "https://storage.googleapis.com/mermer-offical-km/ISunFa/ab664d51-b7a9-44f3-920f-43133561bfc9.svg"
},
"tag": "financial",
"order": 1,
"role": {
"id": 1003,
"type": "Company",
"name": "Owner",
"permissions": [],
"createdAt": 1,
"updatedAt": 1
}
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+60",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: create a account book
POST /account_book| name | type | description |
|---|---|---|
| name | string | name of the company |
| taxId | string | tax Id of the company |
| tag | string | tag of the company |
| teamId | number | team id of the company |
POST /account_book
const body = {
"teamId": 1,
"name": "iSunFA",
"taxId": "1234",
"tag": "all",
}| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | ICompanyAndRole | response data |
| name | type | description |
|---|---|---|
| company | ICompany | Company information |
| role | IRole | Role information |
| tag | string | Tag or label associated with the company |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| name | string | Name of the role |
| permission | string | Permission of the role |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
- 成功的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": true,
"code": "201ISF0000",
"message": "Created successfully",
"payload":
{
"company": {
"id": 1,
"imageId": "abc123",
"name": "iSunFA",
"taxId": "1234",
"startDate": 1633036800,
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"role": {
"id": 1,
"name": "Owner",
"permission": "",
"createdAt": 1633036800,
"updatedAt": 1633036800
},
"tag": "all",
}
}- 失敗的回傳
{
"powerby": "iSunFA v2.0.0+1",
"success": false,
"code": "405",
"message": "Method not allowed",
"payload": {}
}- description: Update the icon of a company by company ID
PUT /company/:companyId/icon| name | type | description | required | default |
|---|---|---|---|---|
| companyId | number | ID of the company | true | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| fileId | number | ID of the image file | true | -- |
PUT /company/1/icon
const body = {
"fileId": 123
}| name | type | description |
|---|---|---|
| powerby | string | API version |
| success | boolean | true or false |
| code | string | response code |
| message | string | description of response data |
| payload | Company | response data or {} |
| name | type | description |
|---|---|---|
| id | number | Primary Key |
| teamId | number | ID of the team |
| userId | number | ID of the user |
| imageId | string | ID of the associated image |
| name | string | Name of the company |
| taxId | string | Tax identification number |
| tag | string | Tag or label associated with company |
| startDate | number | Start date of the company (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| isPrivate | boolean | Whether the company is private |
- 成功的回傳
{
"powerby": "iSunFA v0.9.1+124",
"success": true,
"code": "200ISF0003",
"message": "Update successfully",
"payload": {
"id": 10000003,
"teamId": 6,
"userId": 10000003,
"imageId": "10000009",
"name": "first company",
"taxId": "468546",
"tag": "ALL",
"startDate": 1725372497,
"createdAt": 1725372497,
"updatedAt": 1744195734,
"isPrivate": false
}
}- 失敗的回傳
{
"powerby": "iSunFA v0.9.1+124",
"success": false,
"code": "405ISF0000",
"message": "Method not allowed",
"payload": {}
}- description: Update account book information by book ID
PUT /account_book/:accountBookId/info| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
| accountBookId | string | The ID of the account book | Yes | -- |
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Account book name | No |
| taxId | string | Account book tax ID | No |
| taxSerialNumber | string | Account book tax serial number | No |
| representativeName | string | Account book representative name | No |
| country | string | Country code | No |
| phoneNumber | string | Account book phone number | No |
| address | string | Account book address | No |
| startDate | number | Account book start date, timestamp in seconds | No |
PUT /account_book/123/info
Content-Type: application/json
{
"name": "Updated Account Book Name",
"taxId": "9876543210",
"taxSerialNumber": "9876543210",
"representativeName": "New Representative Name",
"country": "en",
"phoneNumber": "123456987654321",
"address": "No. 2, Section 5, Xinyi Road, Xinyi District, Taipei City 110, Taiwan",
"startDate": 1620000000
}| Name | Type | Description |
|---|---|---|
| powerby | string | API version |
| success | boolean | Success status |
| code | string | Response code |
| message | string | Response message |
| payload | IAccountBookDetails | Updated account book detailed data |
- Successful response
{
"powerby": "iSunFA v0.9.1+131",
"success": true,
"code": "200ISF0003",
"message": "Update successfully",
"payload": {
"id": "10000003",
"name": "Updated Account Book Name",
"taxId": "9876543210",
"taxSerialNumber": "9876543210",
"representativeName": "New Representative Name",
"country": {
"id": "10000002",
"code": "en",
"name": "United States",
"localeKey": "en",
"currencyCode": "USD",
"phoneCode": "+1",
"phoneExample": "2125551234"
},
"phoneNumber": "123456987654321",
"address": "No. 2, Section 5, Xinyi Road, Xinyi District, Taipei City 110, Taiwan",
"startDate": 1620000000,
"createdAt": 1725372497,
"updatedAt": 1744279829
}
}- Failed response
{
"powerby": "iSunFA v0.9.1+131",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}{
"powerby": "iSunFA v0.9.1+131",
"success": false,
"code": "400ISF0001",
"message": "Invalid request parameters",
"payload": null
}- Description: Delete an account book by ID
DELETE /account_book/:accountBookId| name | type | description | required | default |
|---|---|---|---|---|
| accountBookId | number | ID of the account book | true | -- |
DELETE /account_book/10000003| name | type | description |
|---|---|---|
| powerby | string | the version of the API |
| success | boolean | true or false |
| code | string | response code |
| message | string | a message detailing the result of the request |
| payload | IAccountBook | deleted account book information |
| name | type | description |
|---|---|---|
| id | number | Account book ID |
| teamId | number | Team ID |
| userId | number | User ID |
| imageId | string | URL of the account book image |
| name | string | Name of the account book |
| taxId | string | Tax identification number |
| tag | string | Tag or label associated with account book |
| startDate | number | Start date of the account book (timestamp) |
| createdAt | number | Timestamp when created |
| updatedAt | number | Timestamp when updated |
| isPrivate | boolean | Whether the account book is private |
- Successful response
{
"powerby": "iSunFA v0.9.2+14",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"id": 10000003,
"teamId": 6,
"userId": 10000003,
"imageId": "https://storage.googleapis.com/mermer-offical-km/ISunFa/e721a0db-1bf9-4f8d-9ddc-c5b.svg",
"name": "first company",
"taxId": "468546",
"tag": "ALL",
"startDate": 1725372497,
"createdAt": 1725372497,
"updatedAt": 1744879466,
"isPrivate": false
}
}- Failed response
{
"powerby": "iSunFA v0.9.2+14",
"success": false,
"code": "404ISF0000",
"message": "Resource not found",
"payload": null
}- description: Disconnect from a specific account book
GET /account_book/:accountBookId/disconnect| name | type | description | required | default |
|---|---|---|---|---|
| accountBookId | number | ID of the account book | true | -- |
GET /account_book/1/disconnect| name | type | description |
|---|---|---|
| powerby | string | Version of the API |
| success | boolean | Indicates whether the request was successful |
| code | string | Response code |
| message | string | Detailed message of the request result |
| payload | object | Response data |
- Success
{
"powerby": "iSunFA v0.9.2+18",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"success": true
}
}- Failed
{
"powerby": "iSunFA v0.9.2+18",
"success": false,
"code": "500ISF0000",
"message": "Internal service error",
"payload": null
}- description: Get a list of account books for the current user
GET /user/:userId/account_book/info| name | type | description | required | default |
|---|---|---|---|---|
| page | number | Page number for pagination | false | 1 |
| pageSize | number | Number of items per page | false | 10 |
| sortOption | string | Sort option in format "field:direction" (e.g. CreatedAt:desc) | false | CreatedAt:desc |
| searchQuery | string | Search query for filtering account books | false | -- |
| name | type | description | required | default |
|---|---|---|---|---|
| userId | string | ID of the user | true | -- |
GET /user/10000003/account_book/info?page=1&pageSize=5&sortOption=CreatedAt:desc&searchQuery=isuncloud| name | type | description |
|---|---|---|
| powerby | string | Version of the API |
| success | boolean | Indicates whether the request was successful |
| code | string | Response code |
| message | string | Detailed message of the request result |
| payload | IAccountBookListResponse | Response data containing account books list |
| name | type | description |
|---|---|---|
| data | IAccountBookInfo[] | Array of account book details |
| page | number | Current page number |
| pageSize | number | Number of items per page |
| totalCount | number | Total number of account books |
| totalPages | number | Total number of pages |
| hasNextPage | boolean | Whether there is a next page |
| hasPreviousPage | boolean | Whether there is a previous page |
| sort | ISortOption[] | Array of sort options applied |
The account book info object contains the following fields:
| Name | Type | Description |
|---|---|---|
| id | string | Account book ID |
| name | string | Account book name |
| taxId | string | Account book tax ID |
| taxSerialNumber | string | Account book tax serial number |
| representativeName | string | Account book representative name |
| country | ICountry | Account book country |
| phoneNumber | string | Account book phone number |
| address | string | Account book address |
| startDate | number | Account book start date, timestamp in seconds |
| createdAt | number | Creation timestamp, seconds |
| updatedAt | number | Last update timestamp, seconds |
| Name | Type | Description |
|---|---|---|
| id | string | Country ID |
| code | string | Country code |
| name | string | Country name |
| localeKey | string | Country locale key |
| currencyCode | string | Country currency code |
| phoneCode | string | Country phone code |
| phoneExample | string | Country phone example |
| Name | Type | Description |
|---|---|---|
| sortBy | string | Field to sort by |
| sortOrder | string | Sort direction (asc or desc) |
- Success
{
"powerby": "iSunFA v0.9.2+25",
"success": true,
"code": "200ISF0000",
"message": "Success",
"payload": {
"data": [
{
"id": "10000986",
"name": "iSunCloud",
"taxId": "20981234",
"taxSerialNumber": "",
"representativeName": "",
"country": {
"id": "10000000",
"code": "tw",
"name": "Taiwan",
"localeKey": "tw",
"currencyCode": "TWD",
"phoneCode": "+886",
"phoneExample": "0912345678"
},
"phoneNumber": "",
"address": "",
"startDate": 1733990921,
"createdAt": 1733990921,
"updatedAt": 1733990921
},
{
"id": "10000002",
"name": "iSunCloud",
"taxId": "52414797",
"taxSerialNumber": "",
"representativeName": "",
"country": {
"id": "10000000",
"code": "tw",
"name": "Taiwan",
"localeKey": "tw",
"currencyCode": "TWD",
"phoneCode": "+886",
"phoneExample": "0912345678"
},
"phoneNumber": "",
"address": "",
"startDate": 1725359826,
"createdAt": 1725359826,
"updatedAt": 1725359826
}
],
"page": 1,
"totalPages": 1,
"totalCount": 2,
"pageSize": 5,
"hasNextPage": false,
"hasPreviousPage": false,
"sort": [
{
"sortBy": "CreatedAt",
"sortOrder": "desc"
}
]
}
}- Failed
{
"powerby": "iSunFA v0.9.2+25",
"success": false,
"code": "401ISF0000",
"message": "Unauthorized",
"payload": null
}-
A010001 -
GET /audit_report- iSunFA-Landing-page-Animation10 [不需驗證登入] -
A020001 -
GET /company/:companyId/account-ISFMK00040,ISFMK00031 -
A020002 -
GET /company/:companyId/account/:accountId -
A020003 -
POST /company/:companyId/account-ISFMK00040左邊 -
A020004 -
PUT /company/:companyId/account/:accountId-ISFMK00031下面 -
A021005 -
DELETE /company/:companyId/account/:accountId-ISFMK00040左邊 -
A040001 -
POST /company/:companyId/asset-ISFMK00052 -
A040002 -
GET /company/:companyId/asset-ISFMK00052 -
A041001 -
GET /company/:companyId/asset/:assetId-ISFMK00052 -
A041002 -
PUT /company/:companyId/asset/:assetId-ISFMK00052 -
A050001 -
GET /company/:companyId/ask_ai/:resultId/status?aiApi=-ISFMK00052 -
A050002 -
GET /company/:companyId/ask_ai/:resultId?aiApi=-ISFMK00052 -
A060001 -
GET /company/:companyId/admin-ISFMK00005 -
A060002 -
GET /company/:companyId/admin/:adminId-ISFMK00005,ISFMK00063 -
A060003 -
PUT /company/:companyId/admin/:adminId-ISFMK00063 -
A060004 -
DELETE /company/:companyId/admin/:adminId-ISFMK00063 -
A060005 -
PUT /company/:companyId/transfer_owner-ISFMK0069 -
C010001 -
GET /company/:companyId/client-ISFMK00032 -
C010002 -
POST /company/:companyId/client-ISFMK00032 -
C011001 -
GET /company/:companyId/client/:clientId-ISFMK00032 -
C011002 -
PUT /company/:companyId/client/:clientId-ISFMK00032 -
C011003 -
DELETE /company/:companyId/client/:clientId-ISFMK00032 -
C030001 -
GET /company/:companyId/contract-ISFMK00003 -
C030002 -
POST /company/:companyId/contract-ISFMK00011 -
C031001 -
GET /company/:companyId/contract/:contractId-ISFMK0008 -
C031002 -
PUT /company/:companyId/contract/:contractId-ISFMK00011 -
C040001 -
GET /company-ISFMK00004 -
C040002 -
POST /company-ISFMK00004 -
C041001 -
GET /company/:companyId-ISFMK00069 -
C041002 -
PUT /company/:companyId-ISFMK00069 -
C041003 -
DELETE /company/:companyId-ISFMK00069 -
C042001 -
PUT /company/:companyId/select-ISFMK00004 -
C070001 -
GET /challenge-ISFMK00001[不需驗證登入] -
D010001 -
GET /company/:companyId/department-ISFMK00041 -
E010001 -
GET /company/:companyId/employee-ISFMK00041 -
E010002 -
POST /company/:companyId/employee-ISFMK00041 -
E011001 -
GET /company/:companyId/employee/:employeeId-ISFMK00041, ISFMK00064 -
E011002 -
DELETE /company/:companyId/employee/:employeeId-ISFMK00041, ISFMK00064 -
E011003 -
PUT /company/:companyId/employee/:employeeId-ISFMK00064 -
F010001 -
POST /company/:companyId/file-ISFMK00004,ISFMK00058,ISFMK00061右邊 -
F011001 -
GET /company/:companyId/file/:fileId-ISFMK00058 -
F011002 -
DELETE /company/:companyId/file/:fileId-ISFMK00058 -
I010001 -
POST /company/:companyId/invoice-ISFMK00034 -
I011001 -
GET /company/:companyId/invoice/:invoiceId-這支沒用到 備用(ISFMK00050) -
I011002 -
PUT /company/:companyId/invoice/:invoiceId -
I011003 -
GET /company/:companyId/invoice/:invoiceId/image-ISFMK00015, ISFMK00024 -
I020001 -
GET /company/:companyId/income_expense_trend-ISFMK00006 右上角 -
I030001 -
POST /company/:companyId/invitation-ISFMK00005 -
J010001 -
GET /company/:companyId/journal-ISFMK00038 -
J011001 -
GET /company/:companyId/journal/:journalId-ISFMK00015ISFMK00024 -
J011002 -
DELETE /company/:companyId/journal/:journalId-ISFMK00025 -
K010001 -
POST /company/:companyId/kyc -
L020001 -
GET /company/:companyId/labor_cost_chart-ISFMK00006 左中 -
O011001 -
POST /company/:companyId/ocr -
O011003 -
GET /company/:companyId/ocr -
O011004 -
DELETE /company/:companyId/ocr/:resultId -
O020001 -
GET /company/:companyId/order -
O020002 -
POST /company/:companyId/order -
P020001 -
GET /company/:companyId/project-ISFMK00017 -
P020002 -
POST /company/:companyId/project -
P021001 -
GET /company/:companyId/project/:projectId-ISFMK00033, ISFMK00006 -
P021002 -
PUT /company/:companyId/project/:projectId-ISFMK00061 -
P024001 -
GET /company/:companyId/project/:projectId/milestone-ISFMK00033 -
P024002 -
PUT /company/:companyId/project/:projectId/milestone-ISFMK00033,ISFMK00061 -
P025001 -
GET /company/:companyId/project/:projectId/progress-ISFMK00033 -
P026001 -
GET /company/:companyId/project/:projectId/sale-ISFMK00033 -
P027001 -
GET /company/:companyId/project/:projectId/value-ISFMK00033 -
P028001 -
GET /company/:companyId/project/:projectId/work_rate-ISFMK00033 -
P040001 -
GET /company/:companyId/profit_comparison-ISFMK00006 右下角 -
P050001 -
GET /company/:companyId/project_progress-ISFMK00006 右上角 -
P070001 -
GET /company/:companyId/profit_insight-ISFMK00006 左上角橘框 -
P080001 -
GET /company/:companyId/payment?orderId= -
P080002 -
POST /company/:companyId/payment -
R010001 -
POST /company/:companyId/report -
R010002 -
GET /company/:companyId/report-ISFMK00066 -
R011001 -
GET /company/:companyId/report/:reportId-ISFMK00066 -
R040001 -
GET /company/:companyId/role-ISFMK00031,ISFMK00040 -
R040002 -
POST /company/:companyId/role-ISFMK00040 -
R041001 -
GET /company/:companyId/role/:roleId-ISFMK00031,ISFMK00040 -
R041002 -
PUT /company/:companyId/role/:roleId-ISFMK00040 -
R041003 -
DELETE /company/:companyId/role/:roleId-ISFMK00040 -
S020001 -
GET /company/:companyId/salary-ISFMK00067 -
S020002 -
POST /company/:companyId/salary-ISFMK00067 -
S020003 -
PUT /company/:companyId/salary-ISFMK00067 -
S020004 -
GET /company/:companyId/salary/:salaryId-ISFMK00039, ISFMK00023 -
S020005 -
PUT /company/:companyId/salary/:salaryId-ISFMK00039, ISFMK00023 -
S021001 -
POST /company/:companyId/salary/voucher-ISFMK00075右邊 -
S022001 -
GET /company/:companyId/salary/folder-ISFMK00078 -
S022002 -
GET /company/:companyId/salary/folder/:folderId-ISFMK00076 -
S022003 -
PUT /company/:companyId/salary/folder/:folderId-ISFMK00076 -
S040001 -
POST /sign-up-ISFMK00001[不需驗證登入] -
S050001 -
POST /sign-out[不需驗證登入] -
S060001 -
GET /session-ISFMK00001[不需驗證登入] -
U010001 -
GET /user -
U011001 -
GET /user/:userId-ISFMK00001,ISFMK00062 -
U011002 -
PUT /user/:userId-ISFMK00004,ISFMK00062 -
U012001 -
POST /user/:userId/agreement -
U030001 -
PUT /user/:userId/invitation -
V010001 -
POST /company/:companyId/voucher-ISFMK00050 -
V011002 -
PUT /company/:companyId/voucher/:voucherId-ISFMK00050右邊