Actions
The ballerinax/sap.businessone.service package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Create, query, update, and process SAP Business One service module objects — service calls, contracts, contract templates, customer equipment cards, and the solutions knowledge base — over the session-authenticated Service Layer (OData V3). |
Client
The Client provides access to every service module object exposed by the SAP Business One Service Layer — service calls, service contracts, contract templates, customer equipment cards, the knowledge base, queues, and service call reference data (origins, problem types & sub-types, statuses, and call 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.service;
businessone:SessionConfig session = {
companyDb: "SBODemoUS",
username: "manager",
password: "<password>"
};
service:Client client = check new (session, serviceUrl = "https://<host>:50000/b1s/v1");
Operations
Service Calls
listServiceCalls
Query the ServiceCalls collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallsCollectionResponse|error
Sample code:
ServiceCallsCollectionResponse response = check client->listServiceCalls(
queries = {dollarFilter: "Status eq 1", dollarTop: 20, dollarOrderby: "ServiceCallID desc"}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCalls",
"value": [
{
"ServiceCallID": 501,
"Subject": "Printer not powering on",
"CustomerCode": "C00001",
"CustomerName": "ACME Corp",
"ItemCode": "A00001",
"Status": 1,
"Priority": "scp_High",
"CallType": 3,
"ProblemType": 5,
"Description": "Device does not power on after outage",
"CreationDate": "2026-07-01",
"Queue": "SUPPORT"
}
],
"odata.nextLink": "ServiceCalls?$skip=20"
}
createServiceCalls
Create a new ServiceCall.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCall | Yes | The service call to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCall|error
Sample code:
ServiceCall created = check client->createServiceCalls({
Subject: "Printer not powering on",
CustomerCode: "C00001",
ItemCode: "A00001",
Priority: "scp_High",
CallType: 3,
ProblemType: 5,
Description: "Device does not power on after outage"
});
Sample response:
{
"ServiceCallID": 501,
"Subject": "Printer not powering on",
"CustomerCode": "C00001",
"ItemCode": "A00001",
"Status": 1,
"Priority": "scp_High",
"CallType": 3,
"ProblemType": 5,
"Description": "Device does not power on after outage",
"CreationDate": "2026-07-01"
}
getServiceCalls
Get a single ServiceCall by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
serviceCallID | int:Signed32 | Yes | Key property 'ServiceCallID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallsQueries | No | OData query options: $expand, $select |
Returns: ServiceCall|error
Sample code:
ServiceCall call = check client->getServiceCalls(501);
Sample response:
{
"ServiceCallID": 501,
"Subject": "Printer not powering on",
"CustomerCode": "C00001",
"CustomerName": "ACME Corp",
"Status": 1,
"Priority": "scp_High",
"CallType": 3,
"ProblemType": 5,
"Description": "Device does not power on after outage",
"CreationDate": "2026-07-01",
"Queue": "SUPPORT"
}
deleteServiceCalls
Delete a ServiceCall.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
serviceCallID | int:Signed32 | Yes | Key property 'ServiceCallID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCalls(501);
updateServiceCalls
Partially update a ServiceCall (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
serviceCallID | int:Signed32 | Yes | Key property 'ServiceCallID' (Edm.Int32) |
payload | ServiceCall | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCalls(501, {Resolution: "Replaced power supply unit", Status: 2});
serviceCallsClose
Bound action 'Close' on ServiceCalls (binding type ServiceCall).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
serviceCallID | int:Signed32 | Yes | Key property 'ServiceCallID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->serviceCallsClose(501);
Service Contracts
listServiceContracts
Query the ServiceContracts collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceContractsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceContractsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceContractsCollectionResponse|error
Sample code:
ServiceContractsCollectionResponse response = check client->listServiceContracts(
queries = {dollarFilter: "Status eq 'scs_Approved'", dollarTop: 20}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceContracts",
"value": [
{
"ContractID": 301,
"CustomerCode": "C00001",
"CustomerName": "ACME Corp",
"Status": "scs_Approved",
"ContractTemplate": "GOLD",
"ContractType": "ct_Customer",
"StartDate": "2026-01-01",
"EndDate": "2026-12-31",
"ResolutionTime": 4,
"ResolutionUnit": "rsu_Hours",
"Description": "Gold-tier annual support contract"
}
]
}
createServiceContracts
Create a new ServiceContract.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceContract | Yes | The service contract to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceContract|error
Sample code:
ServiceContract created = check client->createServiceContracts({
CustomerCode: "C00001",
ContractTemplate: "GOLD",
ContractType: "ct_Customer",
StartDate: "2026-01-01",
EndDate: "2026-12-31",
Description: "Gold-tier annual support contract"
});
Sample response:
{
"ContractID": 301,
"CustomerCode": "C00001",
"Status": "scs_Draft",
"ContractTemplate": "GOLD",
"ContractType": "ct_Customer",
"StartDate": "2026-01-01",
"EndDate": "2026-12-31",
"Description": "Gold-tier annual support contract"
}
getServiceContracts
Get a single ServiceContract by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
contractID | int:Signed32 | Yes | Key property 'ContractID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceContractsQueries | No | OData query options: $expand, $select |
Returns: ServiceContract|error
Sample code:
ServiceContract contract = check client->getServiceContracts(301);
Sample response:
{
"ContractID": 301,
"CustomerCode": "C00001",
"CustomerName": "ACME Corp",
"Status": "scs_Approved",
"ContractTemplate": "GOLD",
"ContractType": "ct_Customer",
"StartDate": "2026-01-01",
"EndDate": "2026-12-31",
"Description": "Gold-tier annual support contract"
}
deleteServiceContracts
Delete a ServiceContract.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
contractID | int:Signed32 | Yes | Key property 'ContractID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceContracts(301);
updateServiceContracts
Partially update a ServiceContract (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
contractID | int:Signed32 | Yes | Key property 'ContractID' (Edm.Int32) |
payload | ServiceContract | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceContracts(301, {Description: "Gold-tier annual support contract — renewed"});
serviceContractsCancel
Bound action 'Cancel' on ServiceContracts (binding type ServiceContract).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
contractID | int:Signed32 | Yes | Key property 'ContractID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->serviceContractsCancel(301);
serviceContractsClose
Bound action 'Close' on ServiceContracts (binding type ServiceContract).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
contractID | int:Signed32 | Yes | Key property 'ContractID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->serviceContractsClose(301);
Contract Templates
listContractTemplates
Query the ContractTemplates collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListContractTemplatesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListContractTemplatesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ContractTemplatesCollectionResponse|error
Sample code:
ContractTemplatesCollectionResponse response = check client->listContractTemplates(queries = {dollarTop: 20});
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ContractTemplates",
"value": [
{
"TemplateName": "GOLD",
"TemplateIsRenewal": "tYES",
"DurationOfCoverage": 12,
"ResponseValue": 4,
"ResolutionUnit": "rsu_Hours",
"Description": "Gold-tier annual support contract template",
"ContractType": "ct_Customer",
"IncludeParts": "tYES",
"IncludeLabor": "tYES",
"IncludeTravel": "tNO"
}
]
}
createContractTemplates
Create a new ContractTemplate.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ContractTemplate | Yes | The contract template to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ContractTemplate|error
Sample code:
ContractTemplate created = check client->createContractTemplates({
TemplateName: "GOLD",
TemplateIsRenewal: "tYES",
DurationOfCoverage: 12,
ResponseValue: 4,
ResolutionUnit: "rsu_Hours",
ContractType: "ct_Customer",
Description: "Gold-tier annual support contract template",
IncludeParts: "tYES",
IncludeLabor: "tYES",
IncludeTravel: "tNO"
});
Sample response:
{
"TemplateName": "GOLD",
"TemplateIsRenewal": "tYES",
"DurationOfCoverage": 12,
"ResponseValue": 4,
"ResolutionUnit": "rsu_Hours",
"ContractType": "ct_Customer",
"Description": "Gold-tier annual support contract template"
}
getContractTemplates
Get a single ContractTemplate by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
templateName | string | Yes | Key property 'TemplateName' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetContractTemplatesQueries | No | OData query options: $expand, $select |
Returns: ContractTemplate|error
Sample code:
ContractTemplate template = check client->getContractTemplates("GOLD");
Sample response:
{
"TemplateName": "GOLD",
"TemplateIsRenewal": "tYES",
"DurationOfCoverage": 12,
"ResponseValue": 4,
"ResolutionUnit": "rsu_Hours",
"ContractType": "ct_Customer",
"Description": "Gold-tier annual support contract template"
}
deleteContractTemplates
Delete a ContractTemplate.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
templateName | string | Yes | Key property 'TemplateName' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteContractTemplates("GOLD");
updateContractTemplates
Partially update a ContractTemplate (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
templateName | string | Yes | Key property 'TemplateName' (Edm.String) |
payload | ContractTemplate | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateContractTemplates("GOLD", {Description: "Gold-tier annual support contract template (revised)"});
Customer Equipment Cards
listCustomerEquipmentCards
Query the CustomerEquipmentCards collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListCustomerEquipmentCardsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListCustomerEquipmentCardsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: CustomerEquipmentCardsCollectionResponse|error
Sample code:
CustomerEquipmentCardsCollectionResponse response = check client->listCustomerEquipmentCards(
queries = {dollarFilter: "CustomerCode eq 'C00001'", dollarTop: 20}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#CustomerEquipmentCards",
"value": [
{
"EquipmentCardNum": 205,
"CustomerCode": "C00001",
"CustomerName": "ACME Corp",
"ManufacturerSerialNum": "SN-88213",
"InternalSerialNum": "INT-004",
"ItemCode": "A00001",
"ItemDescription": "Laser Printer",
"DeliveryDate": "2025-11-10",
"ContractCode": 301,
"StatusOfSerialNumber": "sns_Active"
}
]
}
createCustomerEquipmentCards
Create a new CustomerEquipmentCard.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CustomerEquipmentCard | Yes | The customer equipment card to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CustomerEquipmentCard|error
Sample code:
CustomerEquipmentCard created = check client->createCustomerEquipmentCards({
CustomerCode: "C00001",
ManufacturerSerialNum: "SN-88213",
ItemCode: "A00001",
DeliveryDate: "2025-11-10",
ContractCode: 301
});
Sample response:
{
"EquipmentCardNum": 205,
"CustomerCode": "C00001",
"ManufacturerSerialNum": "SN-88213",
"ItemCode": "A00001",
"DeliveryDate": "2025-11-10",
"ContractCode": 301
}
getCustomerEquipmentCards
Get a single CustomerEquipmentCard by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
equipmentCardNum | int:Signed32 | Yes | Key property 'EquipmentCardNum' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetCustomerEquipmentCardsQueries | No | OData query options: $expand, $select |
Returns: CustomerEquipmentCard|error
Sample code:
CustomerEquipmentCard card = check client->getCustomerEquipmentCards(205);
Sample response:
{
"EquipmentCardNum": 205,
"CustomerCode": "C00001",
"CustomerName": "ACME Corp",
"ManufacturerSerialNum": "SN-88213",
"ItemCode": "A00001",
"ItemDescription": "Laser Printer",
"DeliveryDate": "2025-11-10",
"ContractCode": 301,
"StatusOfSerialNumber": "sns_Active"
}
deleteCustomerEquipmentCards
Delete a CustomerEquipmentCard.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
equipmentCardNum | int:Signed32 | Yes | Key property 'EquipmentCardNum' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteCustomerEquipmentCards(205);
updateCustomerEquipmentCards
Partially update a CustomerEquipmentCard (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
equipmentCardNum | int:Signed32 | Yes | Key property 'EquipmentCardNum' (Edm.Int32) |
payload | CustomerEquipmentCard | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateCustomerEquipmentCards(205, {StatusOfSerialNumber: "sns_Returned"});
Knowledge Base Solutions
listKnowledgeBaseSolutions
Query the KnowledgeBaseSolutions collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListKnowledgeBaseSolutionsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListKnowledgeBaseSolutionsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: KnowledgeBaseSolutionsCollectionResponse|error
Sample code:
KnowledgeBaseSolutionsCollectionResponse response = check client->listKnowledgeBaseSolutions(
queries = {dollarFilter: "ItemCode eq 'A00001'"}
);
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#KnowledgeBaseSolutions",
"value": [
{
"SolutionCode": 77,
"ItemCode": "A00001",
"Status": 1,
"Solution": "Replace the fuser unit and reset the printer.",
"Symptom": "Print jobs jam after 200 pages",
"Cause": "Worn fuser unit",
"Description": "Fuser replacement procedure"
}
]
}
createKnowledgeBaseSolutions
Create a new KnowledgeBaseSolution.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | KnowledgeBaseSolution | Yes | The knowledge base solution to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: KnowledgeBaseSolution|error
Sample code:
KnowledgeBaseSolution created = check client->createKnowledgeBaseSolutions({
ItemCode: "A00001",
Symptom: "Print jobs jam after 200 pages",
Cause: "Worn fuser unit",
Solution: "Replace the fuser unit and reset the printer.",
Description: "Fuser replacement procedure"
});
Sample response:
{
"SolutionCode": 77,
"ItemCode": "A00001",
"Symptom": "Print jobs jam after 200 pages",
"Cause": "Worn fuser unit",
"Solution": "Replace the fuser unit and reset the printer.",
"Description": "Fuser replacement procedure"
}
getKnowledgeBaseSolutions
Get a single KnowledgeBaseSolution by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
solutionCode | int:Signed32 | Yes | Key property 'SolutionCode' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetKnowledgeBaseSolutionsQueries | No | OData query options: $expand, $select |
Returns: KnowledgeBaseSolution|error
Sample code:
KnowledgeBaseSolution solution = check client->getKnowledgeBaseSolutions(77);
Sample response:
{
"SolutionCode": 77,
"ItemCode": "A00001",
"Status": 1,
"Symptom": "Print jobs jam after 200 pages",
"Cause": "Worn fuser unit",
"Solution": "Replace the fuser unit and reset the printer.",
"Description": "Fuser replacement procedure"
}
deleteKnowledgeBaseSolutions
Delete a KnowledgeBaseSolution.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
solutionCode | int:Signed32 | Yes | Key property 'SolutionCode' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteKnowledgeBaseSolutions(77);
updateKnowledgeBaseSolutions
Partially update a KnowledgeBaseSolution (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
solutionCode | int:Signed32 | Yes | Key property 'SolutionCode' (Edm.Int32) |
payload | KnowledgeBaseSolution | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateKnowledgeBaseSolutions(77, {Solution: "Replace the fuser unit, reset the printer, and run a test page."});
Queues
listQueue
Query the Queue collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListQueueHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListQueueQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: QueueCollectionResponse|error
Sample code:
QueueCollectionResponse response = check client->listQueue();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#Queue",
"value": [
{
"QueueID": "SUPPORT",
"Description": "Level 1 Support Queue",
"Inactive": "tNO",
"QueueManager": 12,
"QueueEmail": "[email protected]",
"QueueMembers": [
{"QueueID": "SUPPORT", "MemberUserID": 15}
]
}
]
}
createQueue
Create a new Queue.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Queue | Yes | The queue to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Queue|error
Sample code:
Queue created = check client->createQueue({
QueueID: "SUPPORT",
Description: "Level 1 Support Queue",
QueueManager: 12,
QueueEmail: "[email protected]"
});
Sample response:
{
"QueueID": "SUPPORT",
"Description": "Level 1 Support Queue",
"QueueManager": 12,
"QueueEmail": "[email protected]"
}
getQueue
Get a single Queue by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
queueID | string | Yes | Key property 'QueueID' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetQueueQueries | No | OData query options: $expand, $select |
Returns: Queue|error
Sample code:
Queue queue = check client->getQueue("SUPPORT");
Sample response:
{
"QueueID": "SUPPORT",
"Description": "Level 1 Support Queue",
"Inactive": "tNO",
"QueueManager": 12,
"QueueEmail": "[email protected]"
}
deleteQueue
Delete a Queue.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
queueID | string | Yes | Key property 'QueueID' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteQueue("SUPPORT");
updateQueue
Partially update a Queue (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
queueID | string | Yes | Key property 'QueueID' (Edm.String) |
payload | Queue | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateQueue("SUPPORT", {QueueManager: 18});
Service Call Origins
listServiceCallOrigins
Query the ServiceCallOrigins collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallOriginsHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallOriginsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallOriginsCollectionResponse|error
Sample code:
ServiceCallOriginsCollectionResponse response = check client->listServiceCallOrigins();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallOrigins",
"value": [
{"Active": "tYES", "Description": "Customer phone call", "OriginID": 2, "Name": "Phone"}
]
}
createServiceCallOrigins
Create a new ServiceCallOrigin.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCallOrigin | Yes | The service call origin to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCallOrigin|error
Sample code:
ServiceCallOrigin created = check client->createServiceCallOrigins({
name: "Phone",
description: "Customer phone call",
active: "tYES"
});
Sample response:
{"Active": "tYES", "Description": "Customer phone call", "OriginID": 2, "Name": "Phone"}
getServiceCallOrigins
Get a single ServiceCallOrigin by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
originID | int:Signed32 | Yes | Key property 'OriginID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallOriginsQueries | No | OData query options: $expand, $select |
Returns: ServiceCallOrigin|error
Sample code:
ServiceCallOrigin origin = check client->getServiceCallOrigins(2);
Sample response:
{"Active": "tYES", "Description": "Customer phone call", "OriginID": 2, "Name": "Phone"}
deleteServiceCallOrigins
Delete a ServiceCallOrigin.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
originID | int:Signed32 | Yes | Key property 'OriginID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCallOrigins(2);
updateServiceCallOrigins
Partially update a ServiceCallOrigin (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
originID | int:Signed32 | Yes | Key property 'OriginID' (Edm.Int32) |
payload | ServiceCallOrigin | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCallOrigins(2, {description: "Inbound customer phone call"});
serviceCallOriginsServiceGetServiceCallOriginList
Get service call origin list.
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 origins = check client->serviceCallOriginsServiceGetServiceCallOriginList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallOriginsService_GetServiceCallOriginList",
"value": [
{"OriginID": 2, "Name": "Phone"}
]
}
Service Call Problem Types
listServiceCallProblemTypes
Query the ServiceCallProblemTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallProblemTypesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallProblemTypesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallProblemTypesCollectionResponse|error
Sample code:
ServiceCallProblemTypesCollectionResponse response = check client->listServiceCallProblemTypes();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallProblemTypes",
"value": [
{"ProblemTypeID": 5, "Active": "tYES", "Description": "Hardware failure", "Name": "Hardware"}
]
}
createServiceCallProblemTypes
Create a new ServiceCallProblemType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCallProblemType | Yes | The service call problem type to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCallProblemType|error
Sample code:
ServiceCallProblemType created = check client->createServiceCallProblemTypes({
name: "Hardware",
description: "Hardware failure",
active: "tYES"
});
Sample response:
{"ProblemTypeID": 5, "Active": "tYES", "Description": "Hardware failure", "Name": "Hardware"}
getServiceCallProblemTypes
Get a single ServiceCallProblemType by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
problemTypeID | int:Signed32 | Yes | Key property 'ProblemTypeID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallProblemTypesQueries | No | OData query options: $expand, $select |
Returns: ServiceCallProblemType|error
Sample code:
ServiceCallProblemType problemType = check client->getServiceCallProblemTypes(5);
Sample response:
{"ProblemTypeID": 5, "Active": "tYES", "Description": "Hardware failure", "Name": "Hardware"}
deleteServiceCallProblemTypes
Delete a ServiceCallProblemType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
problemTypeID | int:Signed32 | Yes | Key property 'ProblemTypeID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCallProblemTypes(5);
updateServiceCallProblemTypes
Partially update a ServiceCallProblemType (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
problemTypeID | int:Signed32 | Yes | Key property 'ProblemTypeID' (Edm.Int32) |
payload | ServiceCallProblemType | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCallProblemTypes(5, {description: "Hardware failure or malfunction"});
serviceCallProblemTypesServiceGetServiceCallProblemTypeList
Get service call problem type list.
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 problemTypes = check client->serviceCallProblemTypesServiceGetServiceCallProblemTypeList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallProblemTypesService_GetServiceCallProblemTypeList",
"value": [
{"ProblemTypeID": 5, "Name": "Hardware"}
]
}
Service Call Problem Sub-Types
listServiceCallProblemSubTypes
Query the ServiceCallProblemSubTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallProblemSubTypesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallProblemSubTypesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallProblemSubTypesCollectionResponse|error
Sample code:
ServiceCallProblemSubTypesCollectionResponse response = check client->listServiceCallProblemSubTypes();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallProblemSubTypes",
"value": [
{"Active": "tYES", "Description": "Won't power on", "ProblemSubTypeID": 12, "Name": "No power"}
]
}
createServiceCallProblemSubTypes
Create a new ServiceCallProblemSubType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCallProblemSubType | Yes | The service call problem sub-type to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCallProblemSubType|error
Sample code:
ServiceCallProblemSubType created = check client->createServiceCallProblemSubTypes({
name: "No power",
description: "Won't power on",
active: "tYES"
});
Sample response:
{"Active": "tYES", "Description": "Won't power on", "ProblemSubTypeID": 12, "Name": "No power"}
getServiceCallProblemSubTypes
Get a single ServiceCallProblemSubType by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
problemSubTypeID | int:Signed32 | Yes | Key property 'ProblemSubTypeID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallProblemSubTypesQueries | No | OData query options: $expand, $select |
Returns: ServiceCallProblemSubType|error
Sample code:
ServiceCallProblemSubType subType = check client->getServiceCallProblemSubTypes(12);
Sample response:
{"Active": "tYES", "Description": "Won't power on", "ProblemSubTypeID": 12, "Name": "No power"}
deleteServiceCallProblemSubTypes
Delete a ServiceCallProblemSubType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
problemSubTypeID | int:Signed32 | Yes | Key property 'ProblemSubTypeID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCallProblemSubTypes(12);
updateServiceCallProblemSubTypes
Partially update a ServiceCallProblemSubType (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
problemSubTypeID | int:Signed32 | Yes | Key property 'ProblemSubTypeID' (Edm.Int32) |
payload | ServiceCallProblemSubType | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCallProblemSubTypes(12, {description: "Device won't power on at all"});
serviceCallProblemSubTypesServiceGetServiceCallProblemSubTypeList
Get service call problem sub type list.
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 subTypes = check client->serviceCallProblemSubTypesServiceGetServiceCallProblemSubTypeList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallProblemSubTypesService_GetServiceCallProblemSubTypeList",
"value": [
{"ProblemSubTypeID": 12, "Name": "No power"}
]
}
Service Call Solution Status
listServiceCallSolutionStatus
Query the ServiceCallSolutionStatus collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallSolutionStatusHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallSolutionStatusQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallSolutionStatusCollectionResponse|error
Sample code:
ServiceCallSolutionStatusCollectionResponse response = check client->listServiceCallSolutionStatus();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallSolutionStatus",
"value": [
{"Active": "tYES", "Description": "Solution published and verified", "StatusId": 3, "Name": "Published"}
]
}
createServiceCallSolutionStatus
Create a new ServiceCallSolutionStatus.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCallSolutionStatus | Yes | The service call solution status to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCallSolutionStatus|error
Sample code:
ServiceCallSolutionStatus created = check client->createServiceCallSolutionStatus({
name: "Published",
description: "Solution published and verified",
active: "tYES"
});
Sample response:
{"Active": "tYES", "Description": "Solution published and verified", "StatusId": 3, "Name": "Published"}
getServiceCallSolutionStatus
Get a single ServiceCallSolutionStatus by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
statusId | int:Signed32 | Yes | Key property 'StatusId' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallSolutionStatusQueries | No | OData query options: $expand, $select |
Returns: ServiceCallSolutionStatus|error
Sample code:
ServiceCallSolutionStatus status = check client->getServiceCallSolutionStatus(3);
Sample response:
{"Active": "tYES", "Description": "Solution published and verified", "StatusId": 3, "Name": "Published"}
deleteServiceCallSolutionStatus
Delete a ServiceCallSolutionStatus.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
statusId | int:Signed32 | Yes | Key property 'StatusId' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCallSolutionStatus(3);
updateServiceCallSolutionStatus
Partially update a ServiceCallSolutionStatus (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
statusId | int:Signed32 | Yes | Key property 'StatusId' (Edm.Int32) |
payload | ServiceCallSolutionStatus | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCallSolutionStatus(3, {description: "Solution published, verified, and archived"});
serviceCallSolutionStatusServiceGetServiceCallSolutionStatusList
Get service call solution status list.
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 statuses = check client->serviceCallSolutionStatusServiceGetServiceCallSolutionStatusList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallSolutionStatusService_GetServiceCallSolutionStatusList",
"value": [
{"StatusId": 3, "Name": "Published"}
]
}
Service Call Statuses
listServiceCallStatus
Query the ServiceCallStatus collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallStatusHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallStatusQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallStatusCollectionResponse|error
Sample code:
ServiceCallStatusCollectionResponse response = check client->listServiceCallStatus();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallStatus",
"value": [
{"Active": "tYES", "Description": "Newly logged call", "StatusId": 1, "Name": "Open"}
]
}
createServiceCallStatus
Create a new ServiceCallStatus.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCallStatus | Yes | The service call status to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCallStatus|error
Sample code:
ServiceCallStatus created = check client->createServiceCallStatus({
name: "Open",
description: "Newly logged call",
active: "tYES"
});
Sample response:
{"Active": "tYES", "Description": "Newly logged call", "StatusId": 1, "Name": "Open"}
getServiceCallStatus
Get a single ServiceCallStatus by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
statusId | int:Signed32 | Yes | Key property 'StatusId' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallStatusQueries | No | OData query options: $expand, $select |
Returns: ServiceCallStatus|error
Sample code:
ServiceCallStatus status = check client->getServiceCallStatus(1);
Sample response:
{"Active": "tYES", "Description": "Newly logged call", "StatusId": 1, "Name": "Open"}
deleteServiceCallStatus
Delete a ServiceCallStatus.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
statusId | int:Signed32 | Yes | Key property 'StatusId' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCallStatus(1);
updateServiceCallStatus
Partially update a ServiceCallStatus (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
statusId | int:Signed32 | Yes | Key property 'StatusId' (Edm.Int32) |
payload | ServiceCallStatus | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCallStatus(1, {description: "Newly logged, not yet assigned"});
serviceCallStatusServiceGetServiceCallStatusList
Get service call status list.
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 statuses = check client->serviceCallStatusServiceGetServiceCallStatusList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallStatusService_GetServiceCallStatusList",
"value": [
{"StatusId": 1, "Name": "Open"}
]
}
Service Call Types
listServiceCallTypes
Query the ServiceCallTypes collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListServiceCallTypesHeaders | No | Headers to be sent with the request, e.g. Prefer: odata.maxpagesize=100 to control server-side paging |
queries | ListServiceCallTypesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: ServiceCallTypesCollectionResponse|error
Sample code:
ServiceCallTypesCollectionResponse response = check client->listServiceCallTypes();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallTypes",
"value": [
{"Active": "tYES", "Description": "On-site hardware repair", "CallTypeID": 3, "Name": "Repair"}
]
}
createServiceCallTypes
Create a new ServiceCallType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | ServiceCallType | Yes | The service call type to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ServiceCallType|error
Sample code:
ServiceCallType created = check client->createServiceCallTypes({
name: "Repair",
description: "On-site hardware repair",
active: "tYES"
});
Sample response:
{"Active": "tYES", "Description": "On-site hardware repair", "CallTypeID": 3, "Name": "Repair"}
getServiceCallTypes
Get a single ServiceCallType by key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
callTypeID | int:Signed32 | Yes | Key property 'CallTypeID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetServiceCallTypesQueries | No | OData query options: $expand, $select |
Returns: ServiceCallType|error
Sample code:
ServiceCallType callType = check client->getServiceCallTypes(3);
Sample response:
{"Active": "tYES", "Description": "On-site hardware repair", "CallTypeID": 3, "Name": "Repair"}
deleteServiceCallTypes
Delete a ServiceCallType.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
callTypeID | int:Signed32 | Yes | Key property 'CallTypeID' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteServiceCallTypes(3);
updateServiceCallTypes
Partially update a ServiceCallType (PATCH/MERGE semantics).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
callTypeID | int:Signed32 | Yes | Key property 'CallTypeID' (Edm.Int32) |
payload | ServiceCallType | Yes | Fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateServiceCallTypes(3, {description: "On-site hardware repair and part replacement"});
serviceCallTypesServiceGetServiceCallTypeList
Get service call type list.
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 callTypes = check client->serviceCallTypesServiceGetServiceCallTypeList();
Sample response:
{
"odata.metadata": "https://<host>:50000/b1s/v1/$metadata#ServiceCallTypesService_GetServiceCallTypeList",
"value": [
{"CallTypeID": 3, "Name": "Repair"}
]
}
Session Management
logout
Ends the active SAP Business One Service Layer session.
Parameters:
None
Returns: error?
Sample code:
check client->logout();