Actions
The ballerinax/sap.successfactors.ecemployeecentralpayroll package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages ecemployeecentralpayroll objects: EmployeePayrollRunResultsItems, EmployeePayrollRunResults, over the SAP SuccessFactors OData v2 API. |
Client
You can use these APIs to access the replicated payroll information of an employee including pay date, currency, and payroll provider.
Configuration
ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with the SAP SuccessFactors OData endpoint. Passed as the argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
auth | http:CredentialsConfig | Required | Configurations related to client authentication |
httpVersion | http:HttpVersion | See default | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | See default | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | See default | Configurations related to HTTP/2 protocol |
timeout | decimal | See default | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | See default | 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 | See default | HTTP caching related configurations |
compression | http:Compression | See default | 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 | See default | 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 | See default | Provides settings related to client socket configuration |
validation | boolean | See default | Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default |
laxDataBinding | boolean | See default | Enables relaxed data binding on the client side. When enabled, nil values are treated as optional, and absent fields are handled as nilable types. Enabled by default. |
The client also accepts a hostname string parameter (the SAP SuccessFactors API server host) and an optional port (defaults to 443).
Initializing the client
import ballerinax/sap.successfactors.ecemployeecentralpayroll;
configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;
ecemployeecentralpayroll:Client client = check new (
{
auth: { username, password }
},
hostname
);
Operations
EmployeePayrollRunResultsItems
listEmployeePayrollRunResultsItemss
Queries the EmployeePayrollRunResultsItems collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeePayrollRunResultsItemssQueries | No | Queries to be sent with the request |
Returns: ListEmployeePayrollRunResultsItemssResponse|error
Sample code:
ListEmployeePayrollRunResultsItemssResponse result = check client->listEmployeePayrollRunResultsItemss();
Sample response:
{
"d": {
"results": [
{
"EmployeePayrollRunResults_externalCode": "1000",
"EmployeePayrollRunResults_mdfSystemEffectiveStartDate": "2026-01-01",
"externalCode": "1000"
}
]
}
}
createEmployeePayrollRunResultsItems
Creates a new EmployeePayrollRunResultsItems entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeePayrollRunResultsItems | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeePayrollRunResultsItems|error
Sample code:
CreatedEmployeePayrollRunResultsItems result = check client->createEmployeePayrollRunResultsItems(payload);
Sample response:
{
"d": {
"EmployeePayrollRunResults_externalCode": "1000",
"EmployeePayrollRunResults_mdfSystemEffectiveStartDate": "2026-01-01",
"externalCode": "1000"
}
}
getEmployeePayrollRunResultsItems
Retrieves a single EmployeePayrollRunResultsItems entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeePayrollRunResults_externalCode | string | Yes | key: EmployeePayrollRunResults_externalCode |
EmployeePayrollRunResults_mdfSystemEffectiveStartDate | string | Yes | key: EmployeePayrollRunResults_mdfSystemEffectiveStartDate |
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeePayrollRunResultsItemsQueries | No | Queries to be sent with the request |
Returns: EmployeePayrollRunResultsItems|error
Sample code:
EmployeePayrollRunResultsItems result = check client->getEmployeePayrollRunResultsItems(EmployeePayrollRunResults_externalCode, EmployeePayrollRunResults_mdfSystemEffectiveStartDate, externalCode);
Sample response:
{
"EmployeePayrollRunResults_externalCode": "1000",
"EmployeePayrollRunResults_mdfSystemEffectiveStartDate": "2026-01-01",
"externalCode": "1000"
}
updateEmployeePayrollRunResultsItems
Updates the EmployeePayrollRunResultsItems identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeePayrollRunResults_externalCode | string | Yes | key: EmployeePayrollRunResults_externalCode |
EmployeePayrollRunResults_mdfSystemEffectiveStartDate | string | Yes | key: EmployeePayrollRunResults_mdfSystemEffectiveStartDate |
externalCode | string | Yes | key: externalCode |
payload | ModifiedEmployeePayrollRunResultsItems | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateEmployeePayrollRunResultsItems(EmployeePayrollRunResults_externalCode, EmployeePayrollRunResults_mdfSystemEffectiveStartDate, externalCode, payload);
deleteEmployeePayrollRunResultsItems
Deletes the EmployeePayrollRunResultsItems identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeePayrollRunResults_externalCode | string | Yes | key: EmployeePayrollRunResults_externalCode |
EmployeePayrollRunResults_mdfSystemEffectiveStartDate | string | Yes | key: EmployeePayrollRunResults_mdfSystemEffectiveStartDate |
externalCode | string | Yes | key: externalCode |
headers | DeleteEmployeePayrollRunResultsItemsHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteEmployeePayrollRunResultsItems(EmployeePayrollRunResults_externalCode, EmployeePayrollRunResults_mdfSystemEffectiveStartDate, externalCode);
EmployeePayrollRunResults
listEmployeePayrollRunResultss
Queries the EmployeePayrollRunResults collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeePayrollRunResultssQueries | No | Queries to be sent with the request |
Returns: ListEmployeePayrollRunResultssResponse|error
Sample code:
ListEmployeePayrollRunResultssResponse result = check client->listEmployeePayrollRunResultss();
Sample response:
{
"d": {
"results": [
{
"d": {}
}
]
}
}
createEmployeePayrollRunResults
Creates a new EmployeePayrollRunResults entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeePayrollRunResults | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeePayrollRunResults|error
Sample code:
CreatedEmployeePayrollRunResults result = check client->createEmployeePayrollRunResults(payload);
Sample response:
{
"d": {
"d": {}
}
}
getEmployeePayrollRunResults
Retrieves a single EmployeePayrollRunResults entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
mdfSystemEffectiveStartDate | string | Yes | key: mdfSystemEffectiveStartDate |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeePayrollRunResultsQueries | No | Queries to be sent with the request |
Returns: EmployeePayrollRunResults|error
Sample code:
EmployeePayrollRunResults result = check client->getEmployeePayrollRunResults(externalCode, mdfSystemEffectiveStartDate);
Sample response:
{
"d": {}
}
updateEmployeePayrollRunResults
Updates the EmployeePayrollRunResults identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
mdfSystemEffectiveStartDate | string | Yes | key: mdfSystemEffectiveStartDate |
payload | ModifiedEmployeePayrollRunResults | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateEmployeePayrollRunResults(externalCode, mdfSystemEffectiveStartDate, payload);
deleteEmployeePayrollRunResults
Deletes the EmployeePayrollRunResults identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
mdfSystemEffectiveStartDate | string | Yes | key: mdfSystemEffectiveStartDate |
headers | DeleteEmployeePayrollRunResultsHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteEmployeePayrollRunResults(externalCode, mdfSystemEffectiveStartDate);