Skip to main content

Actions

The ballerinax/sap.successfactors.ecemployeecentralpayroll package exposes the following clients:

Available clients:

ClientPurpose
ClientManages 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.

FieldTypeDefaultDescription
authhttp:CredentialsConfigRequiredConfigurations related to client authentication
httpVersionhttp:HttpVersionSee defaultThe HTTP version understood by the client
http1Settingshttp:ClientHttp1SettingsSee defaultConfigurations related to HTTP/1.x protocol
http2Settingshttp:ClientHttp2SettingsSee defaultConfigurations related to HTTP/2 protocol
timeoutdecimalSee defaultThe maximum time to wait (in seconds) for a response before closing the connection
forwardedstringSee defaultThe choice of setting forwarded/x-forwarded header
followRedirectshttp:FollowRedirectsOptionalConfigurations associated with Redirection
poolConfighttp:PoolConfigurationOptionalConfigurations associated with request pooling
cachehttp:CacheConfigSee defaultHTTP caching related configurations
compressionhttp:CompressionSee defaultSpecifies the way of handling compression (accept-encoding) header
circuitBreakerhttp:CircuitBreakerConfigOptionalConfigurations associated with the behaviour of the Circuit Breaker
retryConfighttp:RetryConfigOptionalConfigurations associated with retrying
cookieConfighttp:CookieConfigOptionalConfigurations associated with cookies
responseLimitshttp:ResponseLimitConfigsSee defaultConfigurations associated with inbound response size limits
secureSockethttp:ClientSecureSocketOptionalSSL/TLS-related options
proxyhttp:ProxyConfigOptionalProxy server related options
socketConfighttp:ClientSocketConfigSee defaultProvides settings related to client socket configuration
validationbooleanSee defaultEnables the inbound payload validation functionality which provided by the constraint package. Enabled by default
laxDataBindingbooleanSee defaultEnables 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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeePayrollRunResultsItemssQueriesNoQueries to be sent with the request

Returns: ListEmployeePayrollRunResultsItemssResponse&#124;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:

NameTypeRequiredDescription
payloadEmployeePayrollRunResultsItemsYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeePayrollRunResultsItems&#124;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:

NameTypeRequiredDescription
EmployeePayrollRunResults_externalCodestringYeskey: EmployeePayrollRunResults_externalCode
EmployeePayrollRunResults_mdfSystemEffectiveStartDatestringYeskey: EmployeePayrollRunResults_mdfSystemEffectiveStartDate
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeePayrollRunResultsItemsQueriesNoQueries to be sent with the request

Returns: EmployeePayrollRunResultsItems&#124;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:

NameTypeRequiredDescription
EmployeePayrollRunResults_externalCodestringYeskey: EmployeePayrollRunResults_externalCode
EmployeePayrollRunResults_mdfSystemEffectiveStartDatestringYeskey: EmployeePayrollRunResults_mdfSystemEffectiveStartDate
externalCodestringYeskey: externalCode
payloadModifiedEmployeePayrollRunResultsItemsYesNew property values
headersmap<string|string[]>NoHeaders 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:

NameTypeRequiredDescription
EmployeePayrollRunResults_externalCodestringYeskey: EmployeePayrollRunResults_externalCode
EmployeePayrollRunResults_mdfSystemEffectiveStartDatestringYeskey: EmployeePayrollRunResults_mdfSystemEffectiveStartDate
externalCodestringYeskey: externalCode
headersDeleteEmployeePayrollRunResultsItemsHeadersNoHeaders 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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeePayrollRunResultssQueriesNoQueries to be sent with the request

Returns: ListEmployeePayrollRunResultssResponse&#124;error

Sample code:

ListEmployeePayrollRunResultssResponse result = check client->listEmployeePayrollRunResultss();

Sample response:

{
"d": {
"results": [
{
"d": {}
}
]
}
}
createEmployeePayrollRunResults

Creates a new EmployeePayrollRunResults entity from the supplied payload.

Parameters:

NameTypeRequiredDescription
payloadEmployeePayrollRunResultsYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeePayrollRunResults&#124;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:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
mdfSystemEffectiveStartDatestringYeskey: mdfSystemEffectiveStartDate
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeePayrollRunResultsQueriesNoQueries to be sent with the request

Returns: EmployeePayrollRunResults&#124;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:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
mdfSystemEffectiveStartDatestringYeskey: mdfSystemEffectiveStartDate
payloadModifiedEmployeePayrollRunResultsYesNew property values
headersmap<string|string[]>NoHeaders 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:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
mdfSystemEffectiveStartDatestringYeskey: mdfSystemEffectiveStartDate
headersDeleteEmployeePayrollRunResultsHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteEmployeePayrollRunResults(externalCode, mdfSystemEffectiveStartDate);