Actions
The ballerinax/sap.businessone.projects package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manage SAP Business One project management objects — financial project codes, project management projects, subprojects, configuration data, time sheets, and expense types — through the Service Layer OData API. |
Client
The Client provides access to the project management objects of the SAP Business One Service Layer — financial project codes, project management projects (with their stages, activities, work orders, and open issues), subprojects, project management configuration (activities, areas, priorities, stage types, subproject types, tasks), time sheets, and expense types.
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.projects;
businessone:SessionConfig session = {
companyDb: "SBODemoUS",
username: "manager",
password: "<password>"
};
projects:Client client = check new (session, serviceUrl = "https://<host>:50000/b1s/v1");
Operations
Expense Types
listExpenseTypes
Query the ExpenseTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListExpenseTypesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListExpenseTypesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ExpenseTypesCollectionResponse|error
Sample code:
ExpenseTypesCollectionResponse response = check client->listExpenseTypes(queries = {dollarTop: 20});
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ExpenseTypes",
"value": [
{
"ExpenseType": "T001",
"ExpenseName": "Travel",
"ExpenseAccount": "_SYS00000001",
"VatGroup": "O0",
"PaidByCompany": "tYES"
}
],
"odata.nextLink": "ExpenseTypes?$skip=20"
}
createExpenseTypes
Create a new ExpenseTypeData entity in the ExpenseTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ExpenseTypeData | Yes | The expense type to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ExpenseTypeData|error
Sample code:
ExpenseTypeData created = check client->createExpenseTypes({
expenseType: "T002",
expenseName: "Accommodation",
expenseAccount: "_SYS00000002",
vatGroup: "O0",
paidByCompany: "tYES"
});
Sample response:
{
"ExpenseType": "T002",
"ExpenseName": "Accommodation",
"ExpenseAccount": "_SYS00000002",
"VatGroup": "O0",
"PaidByCompany": "tYES"
}
getExpenseTypes
Get a single ExpenseTypeData entity from the ExpenseTypes collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
expenseType | string | Yes | Key property 'ExpenseType' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetExpenseTypesQueries | No | OData query options: $expand, $select |
Returns: ExpenseTypeData|error
Sample code:
ExpenseTypeData expense = check client->getExpenseTypes("T002");
Sample response:
{
"ExpenseType": "T002",
"ExpenseName": "Accommodation",
"ExpenseAccount": "_SYS00000002",
"VatGroup": "O0",
"PaidByCompany": "tYES"
}
deleteExpenseTypes
Delete a ExpenseTypeData entity from the ExpenseTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
expenseType | string | Yes | Key property 'ExpenseType' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteExpenseTypes("T002");
updateExpenseTypes
Partially update a ExpenseTypeData entity in the ExpenseTypes collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
expenseType | string | Yes | Key property 'ExpenseType' (Edm.String) |
payload | ExpenseTypeData | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateExpenseTypes("T002", {expenseName: "Accommodation & Lodging"});
Project Configuration — Activities
projectManagementConfigurationServiceAddActivities
Add activities to the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_AddActivities_body | Yes | Wraps a PMC_ActivityCollection array of PMCActivityData objects to add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceAddActivities({
pMCActivityCollection: [
{activityID: 10, activityType: "Site Visit", isChargeable: "tYES", laborItem: "LAB001", isAbsence: "tNO"}
]
});
projectManagementConfigurationServiceDeleteActivities
Delete activities from the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_DeleteActivities_body | Yes | Wraps a PMC_ActivityCollection array identifying the activities to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceDeleteActivities({
pMCActivityCollection: [{activityID: 10}]
});
projectManagementConfigurationServiceGetActivities
Get the activities defined in the project management configuration.
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 activities = check client->projectManagementConfigurationServiceGetActivities();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementConfigurationService_GetActivities",
"value": [
{"ActivityID": 10, "ActivityType": "Site Visit", "IsChargeable": "tYES", "LaborItem": "LAB001", "IsAbsence": "tNO"}
]
}
projectManagementConfigurationServiceUpdateActivities
Update activities in the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_UpdateActivities_body | Yes | Wraps a PMC_ActivityCollection array of PMCActivityData objects with the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceUpdateActivities({
pMCActivityCollection: [{activityID: 10, activityType: "Site Visit - Extended"}]
});
Project Configuration — Areas
projectManagementConfigurationServiceAddAreas
Add areas to the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_AddAreas_body | Yes | Wraps a PMC_AreaCollection array of PMCAreaData objects to add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceAddAreas({
pMCAreaCollection: [{areaID: 1, areaName: "Civil Works"}]
});
projectManagementConfigurationServiceDeleteAreas
Delete areas from the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_DeleteAreas_body | Yes | Wraps a PMC_AreaCollection array identifying the areas to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceDeleteAreas({
pMCAreaCollection: [{areaID: 1}]
});
projectManagementConfigurationServiceGetAreas
Get the areas defined in the project management configuration.
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 areas = check client->projectManagementConfigurationServiceGetAreas();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementConfigurationService_GetAreas",
"value": [
{"AreaID": 1, "AreaName": "Civil Works"}
]
}
projectManagementConfigurationServiceUpdateAreas
Update areas in the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_UpdateAreas_body | Yes | Wraps a PMC_AreaCollection array of PMCAreaData objects with the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceUpdateAreas({
pMCAreaCollection: [{areaID: 1, areaName: "Civil & Structural Works"}]
});
Project Configuration — Priorities
projectManagementConfigurationServiceAddPriorities
Add priorities to the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_AddPriorities_body | Yes | Wraps a PMC_PriorityCollection array of PMCPriorityData objects to add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceAddPriorities({
pMCPriorityCollection: [{priorityID: 1, priorityName: "High"}]
});
projectManagementConfigurationServiceDeletePriorities
Delete priorities from the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_DeletePriorities_body | Yes | Wraps a PMC_PriorityCollection array identifying the priorities to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceDeletePriorities({
pMCPriorityCollection: [{priorityID: 1}]
});
projectManagementConfigurationServiceGetPriorities
Get the priorities defined in the project management configuration.
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 priorities = check client->projectManagementConfigurationServiceGetPriorities();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementConfigurationService_GetPriorities",
"value": [
{"PriorityID": 1, "PriorityName": "High"}
]
}
projectManagementConfigurationServiceUpdatePriorities
Update priorities in the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_UpdatePriorities_body | Yes | Wraps a PMC_PriorityCollection array of PMCPriorityData objects with the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceUpdatePriorities({
pMCPriorityCollection: [{priorityID: 1, priorityName: "Critical"}]
});
Project Configuration — Stage Types
projectManagementConfigurationServiceAddStageTypes
Add stage types to the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_AddStageTypes_body | Yes | Wraps a PMC_StageTypeCollection array of PMCStageTypeData objects to add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceAddStageTypes({
pMCStageTypeCollection: [{stageID: 1, stageName: "Planning", stageDescription: "Initial planning stage"}]
});
projectManagementConfigurationServiceDeleteStageTypes
Delete stage types from the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_DeleteStageTypes_body | Yes | Wraps a PMC_StageTypeCollection array identifying the stage types to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceDeleteStageTypes({
pMCStageTypeCollection: [{stageID: 1}]
});
projectManagementConfigurationServiceGetStageTypes
Get the stage types defined in the project management configuration.
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 stageTypes = check client->projectManagementConfigurationServiceGetStageTypes();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementConfigurationService_GetStageTypes",
"value": [
{"StageID": 1, "StageName": "Planning", "StageDescription": "Initial planning stage"}
]
}
projectManagementConfigurationServiceUpdateStageTypes
Update stage types in the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_UpdateStageTypes_body | Yes | Wraps a PMC_StageTypeCollection array of PMCStageTypeData objects with the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceUpdateStageTypes({
pMCStageTypeCollection: [{stageID: 1, stageDescription: "Initial planning and design stage"}]
});
Project Configuration — Subproject Types
projectManagementConfigurationServiceAddSubprojectTypes
Add subproject types to the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_AddSubprojectTypes_body | Yes | Wraps a PMC_SubprojectTypesCollection array of PMCSubprojectTypeData objects to add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceAddSubprojectTypes({
pMCSubprojectTypesCollection: [{subprojectTypeID: 1, subprojectTypeName: "Civil"}]
});
projectManagementConfigurationServiceDeleteSubprojectTypes
Delete subproject types from the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_DeleteSubprojectTypes_body | Yes | Wraps a PMC_SubprojectTypesCollection array identifying the subproject types to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceDeleteSubprojectTypes({
pMCSubprojectTypesCollection: [{subprojectTypeID: 1}]
});
projectManagementConfigurationServiceGetSubprojectTypes
Get the subproject types defined in the project management configuration.
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 subprojectTypes = check client->projectManagementConfigurationServiceGetSubprojectTypes();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementConfigurationService_GetSubprojectTypes",
"value": [
{"SubprojectTypeID": 1, "SubprojectTypeName": "Civil"}
]
}
projectManagementConfigurationServiceUpdateSubprojectTypes
Update subproject types in the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_UpdateSubprojectTypes_body | Yes | Wraps a PMC_SubprojectTypesCollection array of PMCSubprojectTypeData objects with the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceUpdateSubprojectTypes({
pMCSubprojectTypesCollection: [{subprojectTypeID: 1, subprojectTypeName: "Civil & Structural"}]
});
Project Configuration — Tasks
projectManagementConfigurationServiceAddTasks
Add tasks to the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_AddTasks_body | Yes | Wraps a PMC_TaskCollection array of PMCTaskData objects to add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceAddTasks({
pMCTaskCollection: [{taskID: 1, taskName: "Site survey"}]
});
projectManagementConfigurationServiceDeleteTasks
Delete tasks from the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_DeleteTasks_body | Yes | Wraps a PMC_TaskCollection array identifying the tasks to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceDeleteTasks({
pMCTaskCollection: [{taskID: 1}]
});
projectManagementConfigurationServiceGetTasks
Get the tasks defined in the project management configuration.
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 tasks = check client->projectManagementConfigurationServiceGetTasks();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementConfigurationService_GetTasks",
"value": [
{"TaskID": 1, "TaskName": "Site survey"}
]
}
projectManagementConfigurationServiceUpdateTasks
Update tasks in the project management configuration.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementConfigurationService_UpdateTasks_body | Yes | Wraps a PMC_TaskCollection array of PMCTaskData objects with the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementConfigurationServiceUpdateTasks({
pMCTaskCollection: [{taskID: 1, taskName: "Detailed site survey"}]
});
Subprojects
projectManagementServiceAddSubproject
Add a subproject to a project management project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementService_AddSubproject_body | Yes | Wraps a PM_SubprojectDocumentData object describing the subproject to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: PMSubprojectDocumentParams|error
Sample code:
PMSubprojectDocumentParams created = check client->projectManagementServiceAddSubproject({
pMSubprojectDocumentData: {
SubprojectName: "Foundation Works",
ParentID: 1015,
ProjectID: 1015,
SubprojectType: 1,
StartDate: "2026-07-15",
DueDate: "2026-09-30"
}
});
Sample response:
{
"AbsEntry": 1042
}
projectManagementServiceDeleteSubproject
Delete a subproject from a project management project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementService_DeleteSubproject_body | Yes | Wraps a PM_SubprojectDocumentParams object identifying the subproject to delete |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementServiceDeleteSubproject({
pMSubprojectDocumentParams: {absEntry: 1042}
});
projectManagementServiceGetSubproject
Get a subproject of a project management project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementService_GetSubproject_body | Yes | Wraps a PM_SubprojectDocumentParams object identifying the subproject to retrieve |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: PMSubprojectDocumentData|error
Sample code:
PMSubprojectDocumentData subproject = check client->projectManagementServiceGetSubproject({
pMSubprojectDocumentParams: {absEntry: 1042}
});
Sample response:
{
"AbsEntry": 1042,
"Owner": 7,
"SubprojectName": "Foundation Works",
"StartDate": "2026-07-15",
"FinishedPercent": 0,
"ParentID": 1015,
"ProjectID": 1015,
"Order": 1,
"SubprojectType": 1,
"SubprojectContribution": 100,
"SubprojectStatus": "sst_Open",
"SubprojectEndDate": "2026-09-30",
"ActualCost": 0,
"PlannedCost": 18500.00,
"SubprojectDepth": 1,
"DueDate": "2026-09-30"
}
projectManagementServiceGetSubprojectsList
Get the list of subprojects belonging to a project management project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementService_GetSubprojectsList_body | Yes | Wraps a PM_SubprojectParams object identifying the parent project and whether it is itself a subproject |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200_6|error
Sample code:
inline_response_200_6 subprojects = check client->projectManagementServiceGetSubprojectsList({
pMSubprojectParams: {absEntry: 1015, isSubproject: "tNO"}
});
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementService_GetSubprojectsList",
"value": [
{"AbsEntry": 1042},
{"AbsEntry": 1043}
]
}
projectManagementServiceUpdateSubproject
Update a subproject of a project management project.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ProjectManagementService_UpdateSubproject_body | Yes | Wraps a PM_SubprojectDocumentData object with the fields to update, including the AbsEntry of the subproject |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementServiceUpdateSubproject({
pMSubprojectDocumentData: {AbsEntry: 1042, FinishedPercent: 25.0}
});
Project Management Time Sheets
listProjectManagementTimeSheet
Query the ProjectManagementTimeSheet collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListProjectManagementTimeSheetHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListProjectManagementTimeSheetQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ProjectManagementTimeSheetCollectionResponse|error
Sample code:
ProjectManagementTimeSheetCollectionResponse response = check client->listProjectManagementTimeSheet(
queries = {dollarTop: 10}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagementTimeSheet",
"value": [
{
"AbsEntry": 501,
"DocNumber": 501,
"TimeSheetType": "tsh_Employee",
"UserID": 7,
"FirstName": "Alex",
"LastName": "Wong",
"DateFrom": "2026-07-06",
"DateTo": "2026-07-10",
"UserCode": "AWONG"
}
],
"odata.nextLink": "ProjectManagementTimeSheet?$skip=10"
}
createProjectManagementTimeSheet
Create a new PM_TimeSheetData entity in the ProjectManagementTimeSheet collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PMTimeSheetData | Yes | The time sheet to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: PMTimeSheetData|error
Sample code:
PMTimeSheetData created = check client->createProjectManagementTimeSheet({
TimeSheetType: "tsh_Employee",
UserID: 7,
DateFrom: "2026-07-06",
DateTo: "2026-07-10",
PM_TimeSheetLineDataCollection: [
{Date: "2026-07-06", ActivityType: 10, StartTime: "0900", EndTime: "1700", ProjectID: 1015, StageID: 1}
]
});
Sample response:
{
"AbsEntry": 502,
"DocNumber": 502,
"TimeSheetType": "tsh_Employee",
"UserID": 7,
"FirstName": "Alex",
"LastName": "Wong",
"DateFrom": "2026-07-06",
"DateTo": "2026-07-10",
"PM_TimeSheetLineDataCollection": [
{"LineID": 0, "Date": "2026-07-06", "ActivityType": 10, "StartTime": "0900", "EndTime": "1700", "ProjectID": 1015, "StageID": 1}
]
}
getProjectManagementTimeSheet
Get a single PM_TimeSheetData entity from the ProjectManagementTimeSheet collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetProjectManagementTimeSheetQueries | No | OData query options: $expand, $select |
Returns: PMTimeSheetData|error
Sample code:
PMTimeSheetData sheet = check client->getProjectManagementTimeSheet(502);
Sample response:
{
"AbsEntry": 502,
"DocNumber": 502,
"TimeSheetType": "tsh_Employee",
"UserID": 7,
"FirstName": "Alex",
"LastName": "Wong",
"DateFrom": "2026-07-06",
"DateTo": "2026-07-10",
"PM_TimeSheetLineDataCollection": [
{"LineID": 0, "Date": "2026-07-06", "ActivityType": 10, "StartTime": "0900", "EndTime": "1700", "ProjectID": 1015, "StageID": 1}
]
}
deleteProjectManagementTimeSheet
Delete a PM_TimeSheetData entity from the ProjectManagementTimeSheet collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteProjectManagementTimeSheet(502);
updateProjectManagementTimeSheet
Partially update a PM_TimeSheetData entity in the ProjectManagementTimeSheet collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) |
payload | PMTimeSheetData | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateProjectManagementTimeSheet(502, {DateTo: "2026-07-11"});
Project Management Projects
listProjectManagements
Query the ProjectManagements collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListProjectManagementsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListProjectManagementsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ProjectManagementsCollectionResponse|error
Sample code:
ProjectManagementsCollectionResponse response = check client->listProjectManagements(
queries = {dollarTop: 20, dollarFilter: "ProjectStatus eq 'pst_Started'"}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectManagements",
"value": [
{
"AbsEntry": 1015,
"ProjectName": "New Warehouse Setup",
"StartDate": "2026-06-01",
"DueDate": "2026-12-31",
"ProjectType": "pt_Internal",
"ProjectStatus": "pst_Started",
"FinancialProject": "PRJ-2026-001",
"AllowSubprojects": "tYES",
"FinishedPercent": 15.0
}
],
"odata.nextLink": "ProjectManagements?$skip=20"
}
createProjectManagements
Create a new PM_ProjectDocumentData entity in the ProjectManagements collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PMProjectDocumentData | Yes | The project management project to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: PMProjectDocumentData|error
Sample code:
PMProjectDocumentData created = check client->createProjectManagements({
ProjectName: "New Warehouse Setup",
FinancialProject: "PRJ-2026-001",
ProjectType: "pt_Internal",
StartDate: "2026-06-01",
DueDate: "2026-12-31",
AllowSubprojects: "tYES"
});
Sample response:
{
"AbsEntry": 1015,
"ProjectName": "New Warehouse Setup",
"FinancialProject": "PRJ-2026-001",
"ProjectType": "pt_Internal",
"StartDate": "2026-06-01",
"DueDate": "2026-12-31",
"AllowSubprojects": "tYES",
"ProjectStatus": "pst_Started",
"FinishedPercent": 0
}
getProjectManagements
Get a single PM_ProjectDocumentData entity from the ProjectManagements collection by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetProjectManagementsQueries | No | OData query options: $expand, $select |
Returns: PMProjectDocumentData|error
Sample code:
PMProjectDocumentData project = check client->getProjectManagements(1015, queries = {dollarExpand: "PM_StagesCollection"});
Sample response:
{
"AbsEntry": 1015,
"ProjectName": "New Warehouse Setup",
"FinancialProject": "PRJ-2026-001",
"ProjectType": "pt_Internal",
"StartDate": "2026-06-01",
"DueDate": "2026-12-31",
"AllowSubprojects": "tYES",
"ProjectStatus": "pst_Started",
"FinishedPercent": 15.0,
"PM_StagesCollection": [
{"LineID": 0, "StageID": 1, "StageType": 1, "StartDate": "2026-06-01", "Description": "Planning", "IsFinished": "tNO"}
]
}
deleteProjectManagements
Delete a PM_ProjectDocumentData entity from the ProjectManagements collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteProjectManagements(1015);
updateProjectManagements
Partially update a PM_ProjectDocumentData entity in the ProjectManagements collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) |
payload | PMProjectDocumentData | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateProjectManagements(1015, {FinishedPercent: 25.0});
projectManagementsCancelProject
Bound action 'CancelProject' on ProjectManagements (binding type PM_ProjectDocumentData).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
absEntry | int:Signed32 | Yes | Key property 'AbsEntry' (Edm.Int32) of the project management project to cancel |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->projectManagementsCancelProject(1015);
Projects
listProjects
Query the Projects collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListProjectsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListProjectsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ProjectsCollectionResponse|error
Sample code:
ProjectsCollectionResponse response = check client->listProjects(queries = {dollarSelect: "Code,Name,Active"});
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#Projects",
"value": [
{
"Code": "PRJ-2026-001",
"Name": "New Warehouse Setup",
"ValidFrom": "2026-06-01",
"ValidTo": "2026-12-31",
"Active": "tYES"
}
],
"odata.nextLink": "Projects?$skip=20"
}
createProjects
Create a new Project entity in the Projects collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Project | Yes | The financial project code to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Project|error
Sample code:
Project created = check client->createProjects({
Code: "PRJ-2026-001",
Name: "New Warehouse Setup",
ValidFrom: "2026-06-01",
ValidTo: "2026-12-31",
Active: "tYES"
});
Sample response:
{
"Code": "PRJ-2026-001",
"Name": "New Warehouse Setup",
"ValidFrom": "2026-06-01",
"ValidTo": "2026-12-31",
"Active": "tYES"
}
getProjects
Get a single Project entity from the Projects collection 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 | GetProjectsQueries | No | OData query options: $expand, $select |
Returns: Project|error
Sample code:
Project project = check client->getProjects("PRJ-2026-001");
Sample response:
{
"Code": "PRJ-2026-001",
"Name": "New Warehouse Setup",
"ValidFrom": "2026-06-01",
"ValidTo": "2026-12-31",
"Active": "tYES"
}
deleteProjects
Delete a Project entity from the Projects collection.
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->deleteProjects("PRJ-2026-001");
updateProjects
Partially update a Project entity in the Projects collection (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | Project | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateProjects("PRJ-2026-001", {ValidTo: "2027-06-30"});
projectsServiceGetProjectList
Get project list.
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 projects = check client->projectsServiceGetProjectList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ProjectsService_GetProjectList",
"value": [
{"Code": "PRJ-2026-001", "Name": "New Warehouse Setup"}
]
}
Session
logout
Ends the active SAP Business One Service Layer session.
Parameters:
None
Returns: error?
Sample code:
check client->logout();