Skip to main content

Actions

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

Available clients:

ClientPurpose
ClientManages ecpositionmanagement objects: PositionRequisitionStatus, PositionMatrixRelationship, Position, getPositionObjectData, PositionRightToReturn, over the SAP SuccessFactors OData v2 API.

Client​

You can use these APIs for maintain the information about employees position management.

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.ecpositionmanagement;

configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;

ecpositionmanagement:Client client = check new (
{
auth: { username, password }
},
hostname
);

Operations​

PositionRequisitionStatus​

listPositionRequisitionStatuses

Queries the PositionRequisitionStatus 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
queriesListPositionRequisitionStatusesQueriesNoQueries to be sent with the request

Returns: ListPositionRequisitionStatusesResponse&#124;error

Sample code:

ListPositionRequisitionStatusesResponse result = check client->listPositionRequisitionStatuses();

Sample response:

{
"d": {
"results": [
{
"code": "1000"
}
]
}
}
createPositionRequisitionStatus

Creates a new PositionRequisitionStatus entity from the supplied payload.

Parameters:

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

Returns: CreatedPositionRequisitionStatus&#124;error

Sample code:

CreatedPositionRequisitionStatus result = check client->createPositionRequisitionStatus(payload);

Sample response:

{
"d": {
"code": "1000"
}
}
getPositionRequisitionStatus

Retrieves a single PositionRequisitionStatus entity identified by its key property.

Parameters:

NameTypeRequiredDescription
codeintYeskey: code
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetPositionRequisitionStatusQueriesNoQueries to be sent with the request

Returns: PositionRequisitionStatus_1&#124;error

Sample code:

PositionRequisitionStatus_1 result = check client->getPositionRequisitionStatus(code);

Sample response:

{
"d": {
"code": "1000"
}
}
updatePositionRequisitionStatus

Updates the PositionRequisitionStatus identified by its key property with the supplied payload.

Parameters:

NameTypeRequiredDescription
codeintYeskey: code
payloadModifiedPositionRequisitionStatusYesNew property values
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updatePositionRequisitionStatus(code, payload);
deletePositionRequisitionStatus

Deletes the PositionRequisitionStatus identified by its key property.

Parameters:

NameTypeRequiredDescription
codeintYeskey: code
headersDeletePositionRequisitionStatusHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deletePositionRequisitionStatus(code);

PositionMatrixRelationship​

listPositionMatrixRelationships

Queries the PositionMatrixRelationship 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
queriesListPositionMatrixRelationshipsQueriesNoQueries to be sent with the request

Returns: ListPositionMatrixRelationshipsResponse&#124;error

Sample code:

ListPositionMatrixRelationshipsResponse result = check client->listPositionMatrixRelationships();

Sample response:

{
"d": {
"results": [
{
"Position_code": "1000",
"Position_effectiveStartDate": "2026-01-01",
"matrixRelationshipType": "string",
"relatedPositionNav": {}
}
]
}
}
createPositionMatrixRelationship

Creates a new PositionMatrixRelationship entity from the supplied payload.

Parameters:

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

Returns: CreatedPositionMatrixRelationship&#124;error

Sample code:

CreatedPositionMatrixRelationship result = check client->createPositionMatrixRelationship(payload);

Sample response:

{
"d": {
"Position_code": "1000",
"Position_effectiveStartDate": "2026-01-01",
"matrixRelationshipType": "string",
"relatedPositionNav": {
"results": []
}
}
}
getPositionMatrixRelationship

Retrieves a single PositionMatrixRelationship entity identified by its key properties.

Parameters:

NameTypeRequiredDescription
Position_codestringYeskey: Position_code
Position_effectiveStartDatestringYeskey: Position_effectiveStartDate
matrixRelationshipTypestringYeskey: matrixRelationshipType
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetPositionMatrixRelationshipQueriesNoQueries to be sent with the request

Returns: PositionMatrixRelationship_1&#124;error

Sample code:

PositionMatrixRelationship_1 result = check client->getPositionMatrixRelationship(Position_code, Position_effectiveStartDate, matrixRelationshipType);

Sample response:

{
"d": {
"Position_code": "1000",
"Position_effectiveStartDate": "2026-01-01",
"matrixRelationshipType": "string",
"relatedPositionNav": {
"results": []
}
}
}
updatePositionMatrixRelationship

Updates the PositionMatrixRelationship identified by its key properties with the supplied payload.

Parameters:

NameTypeRequiredDescription
Position_codestringYeskey: Position_code
Position_effectiveStartDatestringYeskey: Position_effectiveStartDate
matrixRelationshipTypestringYeskey: matrixRelationshipType
payloadModifiedPositionMatrixRelationshipYesNew property values
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updatePositionMatrixRelationship(Position_code, Position_effectiveStartDate, matrixRelationshipType, payload);
deletePositionMatrixRelationship

Deletes the PositionMatrixRelationship identified by its key properties.

Parameters:

NameTypeRequiredDescription
Position_codestringYeskey: Position_code
Position_effectiveStartDatestringYeskey: Position_effectiveStartDate
matrixRelationshipTypestringYeskey: matrixRelationshipType
headersDeletePositionMatrixRelationshipHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deletePositionMatrixRelationship(Position_code, Position_effectiveStartDate, matrixRelationshipType);

Position​

listPositions

Queries the Position 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
queriesListPositionsQueriesNoQueries to be sent with the request

Returns: ListPositionsResponse&#124;error

Sample code:

ListPositionsResponse result = check client->listPositions();

Sample response:

{
"d": {
"results": [
{
"code": "1000",
"effectiveStartDate": "2026-01-01",
"parentPosition": {},
"positionMatrixRelationship": {}
}
]
}
}
createPosition

Creates a new Position entity from the supplied payload.

Parameters:

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

Returns: CreatedPosition&#124;error

Sample code:

CreatedPosition result = check client->createPosition(payload);

Sample response:

{
"d": {
"code": "1000",
"effectiveStartDate": "2026-01-01",
"parentPosition": {},
"positionMatrixRelationship": {
"results": []
}
}
}
getPosition

Retrieves a single Position entity identified by its key properties.

Parameters:

NameTypeRequiredDescription
codestringYeskey: code
effectiveStartDatestringYeskey: effectiveStartDate
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetPositionQueriesNoQueries to be sent with the request

Returns: Position_1&#124;error

Sample code:

Position_1 result = check client->getPosition(code, effectiveStartDate);

Sample response:

{
"d": {
"code": "1000",
"effectiveStartDate": "2026-01-01",
"parentPosition": {},
"positionMatrixRelationship": {
"results": []
}
}
}
updatePosition

Updates the Position identified by its key properties with the supplied payload.

Parameters:

NameTypeRequiredDescription
codestringYeskey: code
effectiveStartDatestringYeskey: effectiveStartDate
payloadModifiedPositionYesNew property values
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updatePosition(code, effectiveStartDate, payload);
deletePosition

Deletes the Position identified by its key properties.

Parameters:

NameTypeRequiredDescription
codestringYeskey: code
effectiveStartDatestringYeskey: effectiveStartDate
headersDeletePositionHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deletePosition(code, effectiveStartDate);

getPositionObjectData​

getgetPositionObjectData

Retrieves a single getPositionObjectData entity identified by its key properties.

Parameters:

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

Returns: Result&#124;error

Sample code:

Result result = check client->getgetPositionObjectData();

Sample response:

{
"d": {
"ruleFieldMappings": {}
}
}

PositionRightToReturn​

listPositionRightToReturns

Queries the PositionRightToReturn 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
queriesListPositionRightToReturnsQueriesNoQueries to be sent with the request

Returns: ListPositionRightToReturnsResponse&#124;error

Sample code:

ListPositionRightToReturnsResponse result = check client->listPositionRightToReturns();

Sample response:

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

Retrieves a single PositionRightToReturn entity identified by its key property.

Parameters:

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

Returns: PositionRightToReturn_1&#124;error

Sample code:

PositionRightToReturn_1 result = check client->getPositionRightToReturn(externalCode);

Sample response:

{
"d": {}
}