Actions
The ballerinax/sap.businessone.fixedassets package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manage fixed asset objects of the SAP Business One Service Layer — asset master data, capitalization, retirement, transfers, revaluations, and depreciation configuration. |
Client
The Client provides access to every fixed asset object exposed by the SAP Business One Service Layer — asset capitalization, capitalization credit memos, manual depreciation, retirement, transfer, revaluation, master data (asset classes, asset groups, depreciation groups), depreciation configuration (depreciation types, type pools, areas), FA account determinations, and fixed asset item balances.
Configuration
SessionConfig
SAP Business One Service Layer session credentials, passed as the first argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
companyDb | string | Required | The SAP Business One company database to log in to |
username | string | Required | The Service Layer user name |
password | string | Required | The Service Layer user password |
ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with the Service Layer HTTP endpoint. Passed as the optional second argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
httpVersion | http:HttpVersion | http:HTTP_2_0 | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | | Configurations related to HTTP/2 protocol |
timeout | decimal | 30 | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | "disable" | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | Optional | Configurations associated with redirection |
poolConfig | http:PoolConfiguration | Optional | Configurations associated with request pooling |
cache | http:CacheConfig | | HTTP caching related configurations |
compression | http:Compression | http:COMPRESSION_AUTO | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | Optional | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | Optional | Configurations associated with retrying |
cookieConfig | http:CookieConfig | Optional | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | Optional | SSL/TLS-related options |
proxy | http:ProxyConfig | Optional | Proxy server related options |
socketConfig | http:ClientSocketConfig | | Provides settings related to client socket configuration |
validation | boolean | true | Enables the inbound payload validation functionality provided by the constraint package |
laxDataBinding | boolean | true | Enables relaxed data binding on the client side, treating nil values and absent fields as optional |
The client also accepts a serviceUrl string parameter — the base URL of the target Service Layer instance — which defaults to https://localhost:50000/b1s/v1.
Initializing the client
import ballerinax/sap.businessone;
import ballerinax/sap.businessone.fixedassets;
businessone:SessionConfig session = {
companyDb: "SBODemoUS",
username: "manager",
password: "<password>"
};
fixedassets:Client client = check new (session, serviceUrl = "https://<host>:50000/b1s/v1");
Operations
Asset Capitalization
listAssetCapitalization
Query the AssetCapitalization collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetCapitalizationHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListAssetCapitalizationQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetCapitalizationCollectionResponse|error
Sample code:
AssetCapitalizationCollectionResponse response = check client->listAssetCapitalization(
queries = {dollarTop: 20, dollarOrderby: "DocEntry desc"}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetCapitalization",
"value": [
{
"DocEntry": 191,
"DocNum": 191,
"Series": 3,
"PostingDate": "2026-07-01",
"Status": "adsPosted",
"DocumentType": "adtOrdinaryDepreciation",
"DepreciationArea": "10"
}
],
"odata.nextLink": "AssetCapitalization?$skip=20"
}
createAssetCapitalization
Create a new AssetDocument in the AssetCapitalization collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetDocument | Yes | The asset capitalization document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetDocument|error
Sample code:
AssetDocument created = check client->createAssetCapitalization({
PostingDate: "2026-07-01",
DocumentDate: "2026-07-01",
Remarks: "Capitalization of new forklift",
DepreciationArea: "10",
AssetDocumentLineCollection: [
{AssetNumber: "100002", Quantity: 1, TotalLC: 18500.00, DepreciationArea: "10"}
]
});
Sample response:
{
"DocEntry": 191,
"DocNum": 191,
"Series": 3,
"PostingDate": "2026-07-01",
"DocumentDate": "2026-07-01",
"Status": "adsPosted",
"Remarks": "Capitalization of new forklift",
"DepreciationArea": "10",
"AssetDocumentLineCollection": [
{"DocEntry": 191, "LineNumber": 0, "AssetNumber": "100002", "Quantity": 1, "TotalLC": 18500.00, "DepreciationArea": "10"}
]
}
getAssetCapitalization
Get a single AssetDocument in the AssetCapitalization collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetCapitalizationQueries | No | OData query options: $expand, $select |
Returns: AssetDocument|error
Sample code:
AssetDocument doc = check client->getAssetCapitalization(191);
Sample response:
{
"DocEntry": 191,
"DocNum": 191,
"Series": 3,
"PostingDate": "2026-07-01",
"DocumentDate": "2026-07-01",
"Status": "adsPosted",
"Remarks": "Capitalization of new forklift",
"DepreciationArea": "10",
"AssetDocumentLineCollection": [
{"DocEntry": 191, "LineNumber": 0, "AssetNumber": "100002", "Quantity": 1, "TotalLC": 18500.00, "DepreciationArea": "10"}
]
}
deleteAssetCapitalization
Delete an AssetDocument from the AssetCapitalization collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetCapitalization(191);
updateAssetCapitalization
Partially update an AssetDocument in the AssetCapitalization collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | AssetDocument | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetCapitalization(191, {Remarks: "Updated remarks"});
assetCapitalizationServiceCancel
Cancel an asset capitalization document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetCapitalizationService_Cancel_body | Yes | Cancellation parameters wrapping an AssetDocumentParams object |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->assetCapitalizationServiceCancel({
assetDocumentParams: {docEntry: 191, cancellationOption: "coByCurrentSystemDate"}
});
assetCapitalizationServiceGetList
Get the list of asset capitalization document parameters available for cancellation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_1|error
Sample code:
inline_response_200_1 list = check client->assetCapitalizationServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetCapitalizationService_GetList",
"value": [
{"DocEntry": 191, "CancellationOption": "coByCurrentSystemDate"}
]
}
Asset Capitalization Credit Memos
listAssetCapitalizationCreditMemo
Query the AssetCapitalizationCreditMemo collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetCapitalizationCreditMemoHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetCapitalizationCreditMemoQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetCapitalizationCreditMemoCollectionResponse|error
Sample code:
AssetCapitalizationCreditMemoCollectionResponse response =
check client->listAssetCapitalizationCreditMemo(queries = {dollarTop: 20});
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetCapitalizationCreditMemo",
"value": [
{
"DocEntry": 44,
"DocNum": 44,
"PostingDate": "2026-06-15",
"Status": "adsPosted",
"DocumentType": "adtOrdinaryDepreciation",
"DepreciationArea": "10"
}
]
}
createAssetCapitalizationCreditMemo
Create a new AssetDocument in the AssetCapitalizationCreditMemo collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetDocument | Yes | The capitalization credit memo document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetDocument|error
Sample code:
AssetDocument created = check client->createAssetCapitalizationCreditMemo({
PostingDate: "2026-06-15",
DocumentDate: "2026-06-15",
Remarks: "Correction for over-capitalized forklift",
DepreciationArea: "10",
AssetDocumentLineCollection: [
{AssetNumber: "100002", Quantity: 1, TotalLC: -500.00, DepreciationArea: "10"}
]
});
Sample response:
{
"DocEntry": 44,
"DocNum": 44,
"PostingDate": "2026-06-15",
"DocumentDate": "2026-06-15",
"Status": "adsPosted",
"Remarks": "Correction for over-capitalized forklift",
"DepreciationArea": "10"
}
getAssetCapitalizationCreditMemo
Get a single AssetDocument in the AssetCapitalizationCreditMemo collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetCapitalizationCreditMemoQueries | No | OData query options: $expand, $select |
Returns: AssetDocument|error
Sample code:
AssetDocument doc = check client->getAssetCapitalizationCreditMemo(44);
Sample response:
{
"DocEntry": 44,
"DocNum": 44,
"PostingDate": "2026-06-15",
"Status": "adsPosted",
"Remarks": "Correction for over-capitalized forklift",
"DepreciationArea": "10"
}
deleteAssetCapitalizationCreditMemo
Delete an AssetDocument from the AssetCapitalizationCreditMemo collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetCapitalizationCreditMemo(44);
updateAssetCapitalizationCreditMemo
Partially update an AssetDocument in the AssetCapitalizationCreditMemo collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | AssetDocument | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetCapitalizationCreditMemo(44, {Remarks: "Revised remarks"});
assetCapitalizationCreditMemoServiceCancel
Cancel an asset capitalization credit memo document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetCapitalizationCreditMemoService_Cancel_body | Yes | Cancellation parameters wrapping an AssetDocumentParams object |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->assetCapitalizationCreditMemoServiceCancel({
assetDocumentParams: {docEntry: 44, cancellationOption: "coByCurrentSystemDate"}
});
assetCapitalizationCreditMemoServiceGetList
Get the list of asset capitalization credit memo document parameters available for cancellation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200|error
Sample code:
inline_response_200 list = check client->assetCapitalizationCreditMemoServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetCapitalizationCreditMemoService_GetList",
"value": [
{"DocEntry": 44, "CancellationOption": "coByCurrentSystemDate"}
]
}
Asset Classes
listAssetClasses
Query the AssetClasses collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetClassesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetClassesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetClassesCollectionResponse|error
Sample code:
AssetClassesCollectionResponse response = check client->listAssetClasses();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetClasses",
"value": [
{"Code": "VEHICLES", "Description": "Company Vehicles", "AssetType": "atAssetTypeGeneral"}
]
}
createAssetClasses
Create a new AssetClass.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetClass | Yes | The asset class to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetClass|error
Sample code:
AssetClass created = check client->createAssetClasses({
Code: "VEHICLES",
Description: "Company Vehicles",
AssetType: "atAssetTypeGeneral",
AssetClassCollection: [
{DepreciationAreaID: "10", DepreciationTypeID: "STR-5Y", UseLife: 60, ActiveStatus: "tYES"}
]
});
Sample response:
{
"Code": "VEHICLES",
"Description": "Company Vehicles",
"AssetType": "atAssetTypeGeneral",
"AssetClassCollection": [
{"Code": "VEHICLES", "LineNumber": 0, "DepreciationAreaID": "10", "DepreciationTypeID": "STR-5Y", "UseLife": 60, "ActiveStatus": "tYES"}
]
}
getAssetClasses
Get a single AssetClass by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetClassesQueries | No | OData query options: $expand, $select |
Returns: AssetClass|error
Sample code:
AssetClass assetClass = check client->getAssetClasses("VEHICLES");
Sample response:
{
"Code": "VEHICLES",
"Description": "Company Vehicles",
"AssetType": "atAssetTypeGeneral"
}
deleteAssetClasses
Delete an AssetClass.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetClasses("VEHICLES");
updateAssetClasses
Partially update an AssetClass (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | AssetClass | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetClasses("VEHICLES", {Description: "Fleet Vehicles"});
assetClassesServiceGetList
Get the list of asset class parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_2|error
Sample code:
inline_response_200_2 list = check client->assetClassesServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetClassesService_GetList",
"value": [
{"Code": "VEHICLES", "Description": "Company Vehicles"}
]
}
Asset Depreciation Groups
listAssetDepreciationGroups
Query the AssetDepreciationGroups collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetDepreciationGroupsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetDepreciationGroupsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetDepreciationGroupsCollectionResponse|error
Sample code:
AssetDepreciationGroupsCollectionResponse response = check client->listAssetDepreciationGroups();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetDepreciationGroups",
"value": [
{"Code": "MACHINERY", "Group": "10", "Description": "Machinery and Equipment"}
]
}
createAssetDepreciationGroups
Create a new AssetDepreciationGroup.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetDepreciationGroup | Yes | The asset depreciation group to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetDepreciationGroup|error
Sample code:
AssetDepreciationGroup created = check client->createAssetDepreciationGroups({
code: "MACHINERY",
group: "10",
description: "Machinery and Equipment"
});
Sample response:
{
"Code": "MACHINERY",
"Group": "10",
"Description": "Machinery and Equipment"
}
getAssetDepreciationGroups
Get a single AssetDepreciationGroup by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetDepreciationGroupsQueries | No | OData query options: $expand, $select |
Returns: AssetDepreciationGroup|error
Sample code:
AssetDepreciationGroup group = check client->getAssetDepreciationGroups("MACHINERY");
Sample response:
{
"Code": "MACHINERY",
"Group": "10",
"Description": "Machinery and Equipment"
}
deleteAssetDepreciationGroups
Delete an AssetDepreciationGroup.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetDepreciationGroups("MACHINERY");
updateAssetDepreciationGroups
Partially update an AssetDepreciationGroup (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | AssetDepreciationGroup | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetDepreciationGroups("MACHINERY", {description: "Heavy Machinery"});
assetDepreciationGroupsServiceGetList
Get the list of asset depreciation group parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_3|error
Sample code:
inline_response_200_3 list = check client->assetDepreciationGroupsServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetDepreciationGroupsService_GetList",
"value": [
{"Code": "MACHINERY", "Description": "Machinery and Equipment"}
]
}
Asset Groups
listAssetGroups
Query the AssetGroups collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetGroupsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetGroupsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetGroupsCollectionResponse|error
Sample code:
AssetGroupsCollectionResponse response = check client->listAssetGroups();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetGroups",
"value": [
{"Code": "OFFICE", "Description": "Office Equipment"}
]
}
createAssetGroups
Create a new AssetGroup.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetGroup | Yes | The asset group to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetGroup|error
Sample code:
AssetGroup created = check client->createAssetGroups({code: "OFFICE", description: "Office Equipment"});
Sample response:
{
"Code": "OFFICE",
"Description": "Office Equipment"
}
getAssetGroups
Get a single AssetGroup by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetGroupsQueries | No | OData query options: $expand, $select |
Returns: AssetGroup|error
Sample code:
AssetGroup group = check client->getAssetGroups("OFFICE");
Sample response:
{
"Code": "OFFICE",
"Description": "Office Equipment"
}
deleteAssetGroups
Delete an AssetGroup.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetGroups("OFFICE");
updateAssetGroups
Partially update an AssetGroup (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | AssetGroup | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetGroups("OFFICE", {description: "Office & IT Equipment"});
assetGroupsServiceGetList
Get the list of asset group parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_4|error
Sample code:
inline_response_200_4 list = check client->assetGroupsServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetGroupsService_GetList",
"value": [
{"Code": "OFFICE", "Description": "Office Equipment"}
]
}
Asset Manual Depreciation
listAssetManualDepreciation
Query the AssetManualDepreciation collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetManualDepreciationHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetManualDepreciationQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetManualDepreciationCollectionResponse|error
Sample code:
AssetManualDepreciationCollectionResponse response = check client->listAssetManualDepreciation();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetManualDepreciation",
"value": [
{
"DocEntry": 77,
"DocNum": 77,
"PostingDate": "2026-06-30",
"Status": "adsPosted",
"ManualDepreciationType": "Special",
"DepreciationArea": "10"
}
]
}
createAssetManualDepreciation
Create a new AssetDocument in the AssetManualDepreciation collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetDocument | Yes | The manual depreciation document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetDocument|error
Sample code:
AssetDocument created = check client->createAssetManualDepreciation({
PostingDate: "2026-06-30",
DocumentDate: "2026-06-30",
ManualDepreciationType: "Special",
DepreciationArea: "10",
AssetDocumentLineCollection: [
{AssetNumber: "100002", TotalLC: 500.00, DepreciationArea: "10"}
]
});
Sample response:
{
"DocEntry": 77,
"DocNum": 77,
"PostingDate": "2026-06-30",
"Status": "adsPosted",
"ManualDepreciationType": "Special",
"DepreciationArea": "10"
}
getAssetManualDepreciation
Get a single AssetDocument in the AssetManualDepreciation collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetManualDepreciationQueries | No | OData query options: $expand, $select |
Returns: AssetDocument|error
Sample code:
AssetDocument doc = check client->getAssetManualDepreciation(77);
Sample response:
{
"DocEntry": 77,
"DocNum": 77,
"PostingDate": "2026-06-30",
"Status": "adsPosted",
"ManualDepreciationType": "Special",
"DepreciationArea": "10"
}
deleteAssetManualDepreciation
Delete an AssetDocument from the AssetManualDepreciation collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetManualDepreciation(77);
updateAssetManualDepreciation
Partially update an AssetDocument in the AssetManualDepreciation collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | AssetDocument | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetManualDepreciation(77, {Remarks: "Adjusted"});
assetManualDepreciationServiceCancel
Cancel an asset manual depreciation document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetManualDepreciationService_Cancel_body | Yes | Cancellation parameters wrapping an AssetDocumentParams object |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->assetManualDepreciationServiceCancel({
assetDocumentParams: {docEntry: 77, cancellationOption: "coByCurrentSystemDate"}
});
assetManualDepreciationServiceGetList
Get the list of asset manual depreciation document parameters available for cancellation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_5|error
Sample code:
inline_response_200_5 list = check client->assetManualDepreciationServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetManualDepreciationService_GetList",
"value": [
{"DocEntry": 77, "CancellationOption": "coByCurrentSystemDate"}
]
}
Asset Retirement
listAssetRetirement
Query the AssetRetirement collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetRetirementHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetRetirementQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetRetirementCollectionResponse|error
Sample code:
AssetRetirementCollectionResponse response = check client->listAssetRetirement();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetRetirement",
"value": [
{
"DocEntry": 12,
"DocNum": 12,
"PostingDate": "2026-05-20",
"Status": "adsPosted",
"DocumentType": "adtSales",
"DepreciationArea": "10"
}
]
}
createAssetRetirement
Create a new AssetDocument in the AssetRetirement collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetDocument | Yes | The asset retirement document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetDocument|error
Sample code:
AssetDocument created = check client->createAssetRetirement({
PostingDate: "2026-05-20",
DocumentDate: "2026-05-20",
DocumentType: "adtSales",
DepreciationArea: "10",
AssetDocumentLineCollection: [
{AssetNumber: "100002", Quantity: 1, TotalLC: 12000.00, DepreciationArea: "10"}
]
});
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"PostingDate": "2026-05-20",
"Status": "adsPosted",
"DocumentType": "adtSales",
"DepreciationArea": "10"
}
getAssetRetirement
Get a single AssetDocument in the AssetRetirement collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetRetirementQueries | No | OData query options: $expand, $select |
Returns: AssetDocument|error
Sample code:
AssetDocument doc = check client->getAssetRetirement(12);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"PostingDate": "2026-05-20",
"Status": "adsPosted",
"DocumentType": "adtSales",
"DepreciationArea": "10"
}
deleteAssetRetirement
Delete an AssetDocument from the AssetRetirement collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetRetirement(12);
updateAssetRetirement
Partially update an AssetDocument in the AssetRetirement collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | AssetDocument | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetRetirement(12, {Remarks: "Sold to third party"});
assetRetirementServiceCancel
Cancel an asset retirement document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetRetirementService_Cancel_body | Yes | Cancellation parameters wrapping an AssetDocumentParams object |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->assetRetirementServiceCancel({
assetDocumentParams: {docEntry: 12, cancellationOption: "coByCurrentSystemDate"}
});
assetRetirementServiceGetList
Get the list of asset retirement document parameters available for cancellation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_6|error
Sample code:
inline_response_200_6 list = check client->assetRetirementServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetRetirementService_GetList",
"value": [
{"DocEntry": 12, "CancellationOption": "coByCurrentSystemDate"}
]
}
Asset Revaluations
assetRevaluationServiceGetList
Get the list of asset revaluation document parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_7|error
Sample code:
inline_response_200_7 list = check client->assetRevaluationServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetRevaluationService_GetList",
"value": [
{"DocEntry": 25}
]
}
listAssetRevaluations
Query the AssetRevaluations collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetRevaluationsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetRevaluationsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetRevaluationsCollectionResponse|error
Sample code:
AssetRevaluationsCollectionResponse response = check client->listAssetRevaluations();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetRevaluations",
"value": [
{
"DocEntry": 25,
"DocNum": 25,
"PostingDate": "2026-06-30",
"Reference": "REVAL-2026-Q2",
"DepreciationArea": "10"
}
]
}
createAssetRevaluations
Create a new AssetRevaluation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetRevaluation | Yes | The asset revaluation document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetRevaluation|error
Sample code:
AssetRevaluation created = check client->createAssetRevaluations({
postingDate: "2026-06-30",
documentDate: "2026-06-30",
reference: "REVAL-2026-Q2",
depreciationArea: "10",
assetRevaluationLineCollection: [
{assetNumber: "100002", currentNBV: 15000.00, newNBV: 16200.00, revaluationPercent: 8}
]
});
Sample response:
{
"DocEntry": 25,
"DocNum": 25,
"PostingDate": "2026-06-30",
"Reference": "REVAL-2026-Q2",
"DepreciationArea": "10",
"AssetRevaluationLineCollection": [
{"DocEntry": 25, "LineNumber": 0, "AssetNumber": "100002", "CurrentNBV": 15000.00, "NewNBV": 16200.00, "RevaluationPercent": 8}
]
}
getAssetRevaluations
Get a single AssetRevaluation by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetRevaluationsQueries | No | OData query options: $expand, $select |
Returns: AssetRevaluation|error
Sample code:
AssetRevaluation revaluation = check client->getAssetRevaluations(25);
Sample response:
{
"DocEntry": 25,
"DocNum": 25,
"PostingDate": "2026-06-30",
"Reference": "REVAL-2026-Q2",
"DepreciationArea": "10"
}
deleteAssetRevaluations
Delete an AssetRevaluation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetRevaluations(25);
updateAssetRevaluations
Partially update an AssetRevaluation (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | AssetRevaluation | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetRevaluations(25, {remarks: "Reviewed by controller"});
Asset Transfer
listAssetTransfer
Query the AssetTransfer collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListAssetTransferHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListAssetTransferQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: AssetTransferCollectionResponse|error
Sample code:
AssetTransferCollectionResponse response = check client->listAssetTransfer();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetTransfer",
"value": [
{
"DocEntry": 33,
"DocNum": 33,
"PostingDate": "2026-04-10",
"Status": "adsPosted",
"DocumentType": "adtAssetTransfer",
"DepreciationArea": "10"
}
]
}
createAssetTransfer
Create a new AssetDocument in the AssetTransfer collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetDocument | Yes | The asset transfer document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: AssetDocument|error
Sample code:
AssetDocument created = check client->createAssetTransfer({
PostingDate: "2026-04-10",
DocumentDate: "2026-04-10",
DocumentType: "adtAssetTransfer",
DepreciationArea: "10",
AssetDocumentNewLocCollection: [
{AssetNumber: "100002", CurLocation: 1, NewLocation: 2, Quantity: 1}
]
});
Sample response:
{
"DocEntry": 33,
"DocNum": 33,
"PostingDate": "2026-04-10",
"Status": "adsPosted",
"DocumentType": "adtAssetTransfer",
"DepreciationArea": "10"
}
getAssetTransfer
Get a single AssetDocument in the AssetTransfer collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAssetTransferQueries | No | OData query options: $expand, $select |
Returns: AssetDocument|error
Sample code:
AssetDocument doc = check client->getAssetTransfer(33);
Sample response:
{
"DocEntry": 33,
"DocNum": 33,
"PostingDate": "2026-04-10",
"Status": "adsPosted",
"DocumentType": "adtAssetTransfer",
"DepreciationArea": "10"
}
deleteAssetTransfer
Delete an AssetDocument from the AssetTransfer collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAssetTransfer(33);
updateAssetTransfer
Partially update an AssetDocument in the AssetTransfer collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | AssetDocument | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAssetTransfer(33, {Remarks: "Relocated to warehouse 2"});
assetTransferServiceCancel
Cancel an asset transfer document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AssetTransferService_Cancel_body | Yes | Cancellation parameters wrapping an AssetDocumentParams object |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->assetTransferServiceCancel({
assetDocumentParams: {docEntry: 33, cancellationOption: "coByCurrentSystemDate"}
});
assetTransferServiceGetList
Get the list of asset transfer document parameters available for cancellation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_8|error
Sample code:
inline_response_200_8 list = check client->assetTransferServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#AssetTransferService_GetList",
"value": [
{"DocEntry": 33, "CancellationOption": "coByCurrentSystemDate"}
]
}
Depreciation Areas
listDepreciationAreas
Query the DepreciationAreas collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListDepreciationAreasHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListDepreciationAreasQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: DepreciationAreasCollectionResponse|error
Sample code:
DepreciationAreasCollectionResponse response = check client->listDepreciationAreas();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#DepreciationAreas",
"value": [
{
"Code": "10",
"Description": "Book Depreciation Area",
"AreaType": "atPostingtoGL",
"MainBookingArea": "tYES",
"PostingOfDepreciation": "podDirectPosting"
}
]
}
createDepreciationAreas
Create a new DepreciationArea.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | DepreciationArea | Yes | The depreciation area to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: DepreciationArea|error
Sample code:
DepreciationArea created = check client->createDepreciationAreas({
code: "10",
description: "Book Depreciation Area",
areaType: "atPostingtoGL",
mainBookingArea: "tYES",
postingOfDepreciation: "podDirectPosting"
});
Sample response:
{
"Code": "10",
"Description": "Book Depreciation Area",
"AreaType": "atPostingtoGL",
"MainBookingArea": "tYES",
"PostingOfDepreciation": "podDirectPosting"
}
getDepreciationAreas
Get a single DepreciationArea by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetDepreciationAreasQueries | No | OData query options: $expand, $select |
Returns: DepreciationArea|error
Sample code:
DepreciationArea area = check client->getDepreciationAreas("10");
Sample response:
{
"Code": "10",
"Description": "Book Depreciation Area",
"AreaType": "atPostingtoGL",
"MainBookingArea": "tYES"
}
deleteDepreciationAreas
Delete a DepreciationArea.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteDepreciationAreas("10");
updateDepreciationAreas
Partially update a DepreciationArea (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | DepreciationArea | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateDepreciationAreas("10", {description: "Statutory Book Area"});
depreciationAreasServiceGetList
Get the list of depreciation area parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_9|error
Sample code:
inline_response_200_9 list = check client->depreciationAreasServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#DepreciationAreasService_GetList",
"value": [
{"Code": "10", "Description": "Book Depreciation Area"}
]
}
Depreciation Type Pools
listDepreciationTypePools
Query the DepreciationTypePools collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListDepreciationTypePoolsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListDepreciationTypePoolsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: DepreciationTypePoolsCollectionResponse|error
Sample code:
DepreciationTypePoolsCollectionResponse response = check client->listDepreciationTypePools();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#DepreciationTypePools",
"value": [
{"Code": "POOL-5Y", "Description": "5-Year Straight Line Pool"}
]
}
createDepreciationTypePools
Create a new DepreciationTypePool.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | DepreciationTypePool | Yes | The depreciation type pool to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: DepreciationTypePool|error
Sample code:
DepreciationTypePool created = check client->createDepreciationTypePools({
code: "POOL-5Y",
description: "5-Year Straight Line Pool"
});
Sample response:
{
"Code": "POOL-5Y",
"Description": "5-Year Straight Line Pool"
}
getDepreciationTypePools
Get a single DepreciationTypePool by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetDepreciationTypePoolsQueries | No | OData query options: $expand, $select |
Returns: DepreciationTypePool|error
Sample code:
DepreciationTypePool pool = check client->getDepreciationTypePools("POOL-5Y");
Sample response:
{
"Code": "POOL-5Y",
"Description": "5-Year Straight Line Pool",
"DepreciationTypes": [
{"Code": "STR-5Y", "Description": "Straight Line 5 Years"}
]
}
deleteDepreciationTypePools
Delete a DepreciationTypePool.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteDepreciationTypePools("POOL-5Y");
updateDepreciationTypePools
Partially update a DepreciationTypePool (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | DepreciationTypePool | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateDepreciationTypePools("POOL-5Y", {description: "5-Year SL Pool (Revised)"});
depreciationTypePoolsServiceGetList
Get the list of depreciation type pool parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_10|error
Sample code:
inline_response_200_10 list = check client->depreciationTypePoolsServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#DepreciationTypePoolsService_GetList",
"value": [
{"Code": "POOL-5Y", "Description": "5-Year Straight Line Pool"}
]
}
Depreciation Types
listDepreciationTypes
Query the DepreciationTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListDepreciationTypesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListDepreciationTypesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: DepreciationTypesCollectionResponse|error
Sample code:
DepreciationTypesCollectionResponse response = check client->listDepreciationTypes();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#DepreciationTypes",
"value": [
{
"Code": "STR-5Y",
"Description": "Straight Line 5 Years",
"DepreciationMethod": "dmStraightLine",
"StraightLinePercentage": 20,
"CalculationBase": "cbYearly"
}
]
}
createDepreciationTypes
Create a new DepreciationType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | DepreciationType | Yes | The depreciation type to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: DepreciationType|error
Sample code:
DepreciationType created = check client->createDepreciationTypes({
code: "STR-5Y",
description: "Straight Line 5 Years",
depreciationMethod: "dmStraightLine",
straightLinePercentage: 20,
calculationBase: "cbYearly",
depreciationTypePool: "POOL-5Y"
});
Sample response:
{
"Code": "STR-5Y",
"Description": "Straight Line 5 Years",
"DepreciationMethod": "dmStraightLine",
"StraightLinePercentage": 20,
"CalculationBase": "cbYearly",
"DepreciationTypePool": "POOL-5Y"
}
getDepreciationTypes
Get a single DepreciationType by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetDepreciationTypesQueries | No | OData query options: $expand, $select |
Returns: DepreciationType|error
Sample code:
DepreciationType depreciationType = check client->getDepreciationTypes("STR-5Y");
Sample response:
{
"Code": "STR-5Y",
"Description": "Straight Line 5 Years",
"DepreciationMethod": "dmStraightLine",
"StraightLinePercentage": 20,
"CalculationBase": "cbYearly",
"ValidFrom": "2020-01-01"
}
deleteDepreciationTypes
Delete a DepreciationType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteDepreciationTypes("STR-5Y");
updateDepreciationTypes
Partially update a DepreciationType (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | DepreciationType | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateDepreciationTypes("STR-5Y", {straightLinePercentage: 25});
depreciationTypesServiceGetList
Get the list of depreciation type parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_11|error
Sample code:
inline_response_200_11 list = check client->depreciationTypesServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#DepreciationTypesService_GetList",
"value": [
{"Code": "STR-5Y", "Description": "Straight Line 5 Years"}
]
}
FA Account Determinations
listFAAccountDeterminations
Query the FAAccountDeterminations collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListFAAccountDeterminationsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 |
queries | ListFAAccountDeterminationsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: FAAccountDeterminationsCollectionResponse|error
Sample code:
FAAccountDeterminationsCollectionResponse response = check client->listFAAccountDeterminations();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#FAAccountDeterminations",
"value": [
{
"Code": "DEFAULT",
"Description": "Default FA Account Determination",
"AssetBalanceSheetAccount": "_SYS00000000273",
"OrdinaryDepreciation": "_SYS00000000275"
}
]
}
createFAAccountDeterminations
Create a new FAAccountDetermination.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | FAAccountDetermination | Yes | The FA account determination to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: FAAccountDetermination|error
Sample code:
FAAccountDetermination created = check client->createFAAccountDeterminations({
code: "DEFAULT",
description: "Default FA Account Determination",
assetBalanceSheetAccount: "_SYS00000000273",
ordinaryDepreciation: "_SYS00000000275"
});
Sample response:
{
"Code": "DEFAULT",
"Description": "Default FA Account Determination",
"AssetBalanceSheetAccount": "_SYS00000000273",
"OrdinaryDepreciation": "_SYS00000000275"
}
getFAAccountDeterminations
Get a single FAAccountDetermination by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetFAAccountDeterminationsQueries | No | OData query options: $expand, $select |
Returns: FAAccountDetermination|error
Sample code:
FAAccountDetermination determination = check client->getFAAccountDeterminations("DEFAULT");
Sample response:
{
"Code": "DEFAULT",
"Description": "Default FA Account Determination",
"AssetBalanceSheetAccount": "_SYS00000000273",
"OrdinaryDepreciation": "_SYS00000000275"
}
deleteFAAccountDeterminations
Delete an FAAccountDetermination.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteFAAccountDeterminations("DEFAULT");
updateFAAccountDeterminations
Partially update an FAAccountDetermination (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | FAAccountDetermination | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateFAAccountDeterminations("DEFAULT", {description: "Default FA Accounts (Revised)"});
fAAccountDeterminationsServiceGetList
Get the list of FA account determination parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_12|error
Sample code:
inline_response_200_12 list = check client->fAAccountDeterminationsServiceGetList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#FAAccountDeterminationsService_GetList",
"value": [
{"Code": "DEFAULT", "Description": "Default FA Account Determination"}
]
}
Fixed Asset Items
fixedAssetItemsServiceGetAssetEndBalance
Get the end balance (net book value, accumulated depreciation, etc.) of a fixed asset item.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | FixedAssetItemsService_GetAssetEndBalance_body | Yes | Wraps a FixedAssetValuesParams object identifying the item, fiscal year, and depreciation area |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: FixedAssetEndBalance|error
Sample code:
FixedAssetEndBalance balance = check client->fixedAssetItemsServiceGetAssetEndBalance({
fixedAssetValuesParams: {itemCode: "100002", fiscalYear: "2026", depreciationArea: "10"}
});
Sample response:
{
"AcquisitionCost": 18500.00,
"NetBookValue": 12300.00,
"OrdinaryDepreciationValue": 6200.00,
"SpecialDepreciationValue": 0,
"SalvageValue": 0,
"Quantity": 1
}
fixedAssetItemsServiceGetAssetValuesList
Get the list of asset transaction values (acquisitions, depreciation, appreciation, etc.) for a fixed asset item.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | FixedAssetItemsService_GetAssetValuesList_body | Yes | Wraps a FixedAssetValuesParams object identifying the item, fiscal year, and depreciation area |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_13|error
Sample code:
inline_response_200_13 valuesList = check client->fixedAssetItemsServiceGetAssetValuesList({
fixedAssetValuesParams: {itemCode: "100002", fiscalYear: "2026", depreciationArea: "10"}
});
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#FixedAssetItemsService_GetAssetValuesList",
"value": [
{
"TransactionType": "att_Acquistion",
"AcquisitionCost": 18500.00,
"NetBookValue": 18500.00,
"DepreciationValue": 0
},
{
"TransactionType": "att_OrdinaryDepreciation",
"AcquisitionCost": 18500.00,
"NetBookValue": 12300.00,
"OrdinaryDepreciationValue": 6200.00
}
]
}
fixedAssetItemsServiceUpdateAssetEndBalance
Update the end balance of a fixed asset item.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | FixedAssetItemsService_UpdateAssetEndBalance_body | Yes | Wraps a FixedAssetEndBalance object and a FixedAssetValuesParams object identifying the item, fiscal year, and depreciation area |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->fixedAssetItemsServiceUpdateAssetEndBalance({
fixedAssetEndBalance: {netBookValue: 12300.00, ordinaryDepreciationValue: 6200.00},
fixedAssetValuesParams: {itemCode: "100002", fiscalYear: "2026", depreciationArea: "10"}
});
Session
logout
Ends the active SAP Business One Service Layer session.
Parameters:
None
Returns: error?
Sample code:
check client->logout();