Skip to main content

Actions

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

Available clients:

ClientPurpose
ClientManages ecincometaxdeclaration objects: DeclarationType, FiscalYearVariant, FiscalYearToCountryMap, ItDeclarationTimeBound, ItDeclInvestmentType, ItDeclaration, over the SAP SuccessFactors OData v2 API.

Client​

You can use these APIs to record income tax declaration and submit tax declarations actuals. You can also use these APIs to categorize or group investment types, and configure the window period that controls the creation of actuals and proposals.

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

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

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

Operations​

DeclarationType​

listDeclarationTypes

Queries the DeclarationType 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
queriesListDeclarationTypesQueriesNoQueries to be sent with the request

Returns: ListDeclarationTypesResponse&#124;error

Sample code:

ListDeclarationTypesResponse result = check client->listDeclarationTypes();

Sample response:

{
"d": {
"results": [
{
"externalCode": "1000"
}
]
}
}
getDeclarationType

Retrieves a single DeclarationType entity identified by its key property.

Parameters:

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

Returns: DeclarationType&#124;error

Sample code:

DeclarationType result = check client->getDeclarationType(externalCode);

Sample response:

{
"externalCode": "1000"
}

FiscalYearVariant​

listFiscalYearVariants

Queries the FiscalYearVariant 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
queriesListFiscalYearVariantsQueriesNoQueries to be sent with the request

Returns: ListFiscalYearVariantsResponse&#124;error

Sample code:

ListFiscalYearVariantsResponse result = check client->listFiscalYearVariants();

Sample response:

{
"d": {
"results": [
{
"externalCode": "1000"
}
]
}
}
getFiscalYearVariant

Retrieves a single FiscalYearVariant entity identified by its key property.

Parameters:

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

Returns: FiscalYearVariant&#124;error

Sample code:

FiscalYearVariant result = check client->getFiscalYearVariant(externalCode);

Sample response:

{
"externalCode": "1000"
}

FiscalYearToCountryMap​

listFiscalYearToCountryMaps

Queries the FiscalYearToCountryMap 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
queriesListFiscalYearToCountryMapsQueriesNoQueries to be sent with the request

Returns: ListFiscalYearToCountryMapsResponse&#124;error

Sample code:

ListFiscalYearToCountryMapsResponse result = check client->listFiscalYearToCountryMaps();

Sample response:

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

Retrieves a single FiscalYearToCountryMap entity identified by its key property.

Parameters:

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

Returns: FiscalYearToCountryMap&#124;error

Sample code:

FiscalYearToCountryMap result = check client->getFiscalYearToCountryMap(externalCode);

Sample response:

{
"d": {}
}

ItDeclarationTimeBound​

listItDeclarationTimeBounds

Queries the ItDeclarationTimeBound 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
queriesListItDeclarationTimeBoundsQueriesNoQueries to be sent with the request

Returns: ListItDeclarationTimeBoundsResponse&#124;error

Sample code:

ListItDeclarationTimeBoundsResponse result = check client->listItDeclarationTimeBounds();

Sample response:

{
"d": {
"results": [
{
"externalCode": "1000"
}
]
}
}
getItDeclarationTimeBound

Retrieves a single ItDeclarationTimeBound entity identified by its key property.

Parameters:

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

Returns: ItDeclarationTimeBound&#124;error

Sample code:

ItDeclarationTimeBound result = check client->getItDeclarationTimeBound(externalCode);

Sample response:

{
"externalCode": "1000"
}

ItDeclInvestmentType​

listItDeclInvestmentTypes

Queries the ItDeclInvestmentType 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
queriesListItDeclInvestmentTypesQueriesNoQueries to be sent with the request

Returns: ListItDeclInvestmentTypesResponse&#124;error

Sample code:

ListItDeclInvestmentTypesResponse result = check client->listItDeclInvestmentTypes();

Sample response:

{
"d": {
"results": [
{
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"declarationTypeNav": {}
}
]
}
}
getItDeclInvestmentType

Retrieves a single ItDeclInvestmentType entity identified by its key properties.

Parameters:

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

Returns: ItDeclInvestmentType&#124;error

Sample code:

ItDeclInvestmentType result = check client->getItDeclInvestmentType(effectiveStartDate, externalCode);

Sample response:

{
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"declarationTypeNav": {
"externalCode": "1000"
}
}

ItDeclaration​

listItDeclarations

Queries the ItDeclaration 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
queriesListItDeclarationsQueriesNoQueries to be sent with the request

Returns: ListItDeclarationsResponse&#124;error

Sample code:

ListItDeclarationsResponse result = check client->listItDeclarations();

Sample response:

{
"d": {
"results": [
{
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"itDeclInvestmentTypeNav": {},
"typeNav": {}
}
]
}
}
getItDeclaration

Retrieves a single ItDeclaration entity identified by its key properties.

Parameters:

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

Returns: ItDeclaration&#124;error

Sample code:

ItDeclaration result = check client->getItDeclaration(effectiveStartDate, externalCode);

Sample response:

{
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"itDeclInvestmentTypeNav": {
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"declarationTypeNav": {
"externalCode": "1000"
}
},
"typeNav": {
"externalCode": "1000"
}
}