AlphaAlpha Docs

Finance Accounts

Operations related to financial accounts

Delete by list of ids in current tenant

DELETE
/finance/accounts
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/finance/accounts" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get consolidated accounts

GET
/finance/accounts/consolidated
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/consolidated"
[
  {
    "children": [
      {}
    ],
    "currency": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "number": "string",
    "parentId": "string",
    "root": true,
    "subsidiaryId": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "type": "ASSET"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get consolidated monthly account snapshots for children

GET
/finance/accounts/consolidated/children/snapshot
AuthorizationBearer <token>

In: header

Query Parameters

months*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/consolidated/children/snapshot?months=string"
[
  {
    "children": [
      {}
    ],
    "currency": "string",
    "id": "string",
    "monthlySnapshots": [
      {
        "month": "string",
        "subsidiaryValue": {
          "property1": 0.1,
          "property2": 0.1
        },
        "total": 0.1
      }
    ],
    "name": "string",
    "number": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "type": "ASSET"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get consolidated monthly account snapshots

GET
/finance/accounts/consolidated/snapshot
AuthorizationBearer <token>

In: header

Query Parameters

months*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/consolidated/snapshot?months=string"
[
  {
    "children": [
      {}
    ],
    "currency": "string",
    "id": "string",
    "monthlySnapshots": [
      {
        "month": "string",
        "subsidiaryValue": {
          "property1": 0.1,
          "property2": 0.1
        },
        "total": 0.1
      }
    ],
    "name": "string",
    "number": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "type": "ASSET"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by list of ids in current tenant

GET
/finance/accounts/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/find?ids=string"
[
  {
    "children": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "number": "string",
    "parentId": "string",
    "root": true,
    "subsidiaryId": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "tenantId": "string",
    "type": "ASSET",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find all for current tenant

GET
/finance/accounts/find-all
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/find-all"
[
  {
    "children": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "number": "string",
    "parentId": "string",
    "root": true,
    "subsidiaryId": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "tenantId": "string",
    "type": "ASSET",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by id in current tenant

GET
/finance/accounts/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/find/string"
{
  "children": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "number": "string",
  "parentId": "string",
  "root": true,
  "subsidiaryId": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "tenantId": "string",
  "type": "ASSET",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Import child account

POST
/finance/accounts/import-child/{parentId}
AuthorizationBearer <token>

In: header

Path Parameters

parentId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/import-child/string" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "currency": "string",    "name": "string",    "number": "string",    "type": "ASSET"  }'
{
  "children": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "number": "string",
  "parentId": "string",
  "root": true,
  "subsidiaryId": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "tenantId": "string",
  "type": "ASSET",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Import parent account

POST
/finance/accounts/import/{subsidiaryId}
AuthorizationBearer <token>

In: header

Path Parameters

subsidiaryId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/import/string" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "currency": "string",    "name": "string",    "number": "string",    "type": "ASSET"  }'
{
  "children": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "number": "string",
  "parentId": "string",
  "root": true,
  "subsidiaryId": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "tenantId": "string",
  "type": "ASSET",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/finance/accounts/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/page"
{
  "content": [
    {
      "children": [
        "string"
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "currency": "string",
      "id": "string",
      "isRoot": true,
      "name": "string",
      "number": "string",
      "parentId": "string",
      "root": true,
      "subsidiaryId": "string",
      "tags": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "tenantId": "string",
      "type": "ASSET",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get monthly account snapshots

GET
/finance/accounts/snapshot/{subsidiaryId}
AuthorizationBearer <token>

In: header

Path Parameters

subsidiaryId*string

Query Parameters

months*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/snapshot/string?months=string"
[
  {
    "children": [
      {}
    ],
    "currency": "string",
    "id": "string",
    "monthlySnapshots": [
      {
        "balance": 0.1,
        "month": "string"
      }
    ],
    "name": "string",
    "number": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "type": "ASSET"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Create monthly account snapshot

POST
/finance/accounts/snapshot/{subsidiaryId}
AuthorizationBearer <token>

In: header

Path Parameters

subsidiaryId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/snapshot/string" \  -H "Content-Type: application/json" \  -d '{    "accountNumber": "string",    "balance": 0.1,    "month": "string"  }'
{
  "accountId": "string",
  "balance": 0.1,
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "month": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get sum of accounts with tag

GET
/finance/accounts/sum-of-tag
AuthorizationBearer <token>

In: header

Query Parameters

month*string
tag*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/sum-of-tag?month=string&tag=string"
{
  "accounts": [
    {
      "balance": 0.1,
      "name": "string"
    }
  ],
  "month": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get sum of accounts with tag

GET
/finance/accounts/sums-of-tag
AuthorizationBearer <token>

In: header

Query Parameters

months*array<>
tag*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/sums-of-tag?months=string&tag=string"
[
  {
    "accounts": [
      {
        "balance": 0.1,
        "name": "string"
      }
    ],
    "month": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Add tag to account

POST
/finance/accounts/tag
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/tag" \  -H "Content-Type: application/json" \  -d '{    "accountNumber": "string",    "key": "string",    "value": "string"  }'
[
  {
    "children": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "number": "string",
    "parentId": "string",
    "root": true,
    "subsidiaryId": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "tenantId": "string",
    "type": "ASSET",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Add tag to multiple accounts

POST
/finance/accounts/tag-bulk
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/tag-bulk" \  -H "Content-Type: application/json" \  -d '{    "tags": [      {        "accountNumber": "string",        "key": "string",        "value": "string"      }    ]  }'
[
  {
    "children": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "number": "string",
    "parentId": "string",
    "root": true,
    "subsidiaryId": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "tenantId": "string",
    "type": "ASSET",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by id in current tenant

DELETE
/finance/accounts/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/finance/accounts/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update an account

PUT
/finance/accounts/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:18080/api/v1/finance/accounts/string" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "currency": "string",    "name": "string",    "number": "string",    "type": "ASSET"  }'
{
  "children": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "number": "string",
  "parentId": "string",
  "root": true,
  "subsidiaryId": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "tenantId": "string",
  "type": "ASSET",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Create a new child account

POST
/finance/accounts/{parentId}/child
AuthorizationBearer <token>

In: header

Path Parameters

parentId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/string/child" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "currency": "string",    "name": "string",    "number": "string",    "type": "ASSET"  }'
{
  "children": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "number": "string",
  "parentId": "string",
  "root": true,
  "subsidiaryId": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "tenantId": "string",
  "type": "ASSET",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get accounts by subsidiary

GET
/finance/accounts/{subsidiaryId}
AuthorizationBearer <token>

In: header

Path Parameters

subsidiaryId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/finance/accounts/string"
[
  {
    "children": [
      {}
    ],
    "currency": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "number": "string",
    "parentId": "string",
    "root": true,
    "subsidiaryId": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "type": "ASSET"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Create a new account

POST
/finance/accounts/{subsidiaryId}
AuthorizationBearer <token>

In: header

Path Parameters

subsidiaryId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/finance/accounts/string" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "currency": "string",    "name": "string",    "number": "string",    "type": "ASSET"  }'
{
  "children": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "number": "string",
  "parentId": "string",
  "root": true,
  "subsidiaryId": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "tenantId": "string",
  "type": "ASSET",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}