Actions
The ballerinax/sap.successfactors.ecpositionmanagement package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages 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.
| 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.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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListPositionRequisitionStatusesQueries | No | Queries to be sent with the request |
Returns: ListPositionRequisitionStatusesResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PositionRequisitionStatus | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedPositionRequisitionStatus|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:
| Name | Type | Required | Description |
|---|---|---|---|
code | int | Yes | key: code |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPositionRequisitionStatusQueries | No | Queries to be sent with the request |
Returns: PositionRequisitionStatus_1|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:
| Name | Type | Required | Description |
|---|---|---|---|
code | int | Yes | key: code |
payload | ModifiedPositionRequisitionStatus | Yes | New property values |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
code | int | Yes | key: code |
headers | DeletePositionRequisitionStatusHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListPositionMatrixRelationshipsQueries | No | Queries to be sent with the request |
Returns: ListPositionMatrixRelationshipsResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PositionMatrixRelationship | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedPositionMatrixRelationship|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:
| Name | Type | Required | Description |
|---|---|---|---|
Position_code | string | Yes | key: Position_code |
Position_effectiveStartDate | string | Yes | key: Position_effectiveStartDate |
matrixRelationshipType | string | Yes | key: matrixRelationshipType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPositionMatrixRelationshipQueries | No | Queries to be sent with the request |
Returns: PositionMatrixRelationship_1|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:
| Name | Type | Required | Description |
|---|---|---|---|
Position_code | string | Yes | key: Position_code |
Position_effectiveStartDate | string | Yes | key: Position_effectiveStartDate |
matrixRelationshipType | string | Yes | key: matrixRelationshipType |
payload | ModifiedPositionMatrixRelationship | Yes | New property values |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
Position_code | string | Yes | key: Position_code |
Position_effectiveStartDate | string | Yes | key: Position_effectiveStartDate |
matrixRelationshipType | string | Yes | key: matrixRelationshipType |
headers | DeletePositionMatrixRelationshipHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListPositionsQueries | No | Queries to be sent with the request |
Returns: ListPositionsResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Position | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedPosition|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:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | key: code |
effectiveStartDate | string | Yes | key: effectiveStartDate |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPositionQueries | No | Queries to be sent with the request |
Returns: Position_1|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:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | key: code |
effectiveStartDate | string | Yes | key: effectiveStartDate |
payload | ModifiedPosition | Yes | New property values |
headers | map<string|string[]> | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | key: code |
effectiveStartDate | string | Yes | key: effectiveStartDate |
headers | DeletePositionHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetgetPositionObjectDataQueries | No | Queries to be sent with the request |
Returns: Result|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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListPositionRightToReturnsQueries | No | Queries to be sent with the request |
Returns: ListPositionRightToReturnsResponse|error
Sample code:
ListPositionRightToReturnsResponse result = check client->listPositionRightToReturns();
Sample response:
{
"d": {
"results": [
{}
]
}
}
getPositionRightToReturn
Retrieves a single PositionRightToReturn entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: PositionRightToReturn_1|error
Sample code:
PositionRightToReturn_1 result = check client->getPositionRightToReturn(externalCode);
Sample response:
{
"d": {}
}