cancel
Showing results for 
Search instead for 
Did you mean: 

startDate in Positions API

PerforsN
Participant
0 Kudos

Hi,

I'm working on a python wrapper to work with the SAP Commissions API. I ran into a challenge with the Positions API, specifically the List query parameter startDate and endDate.

No matter how I format the date, the below request always fails with a 404, not fond.

GET https://{domainName}/api/v2/positions?startDate=2020-01-01&endDate=2200-01-01

I've tried combinations of startDate and endDate, leaving one out, nothing seems to work.

View Entire Topic
PerforsN
Participant
0 Kudos

Hi naveen.pandiri

I'm sorry to say that it doesn't. According to the docs, the startDate and endDate parameters should allow the retrieval of a position version other then the version for today's date.

For example, a position with two versions:

[
    {
        "name": "First Version",
        "effectiveStartDate": "2020-01-01",
        "effectiveEndDate": "2020-01-31",
    },
    {
        "name": "Second Version",
        "effectiveStartDate": "2020-02-01",
        "effectiveEndDate": "2200-01-01",
    }
]

the following command does not return any positions (assuming the above is the only position).

GET https://{domainName}/api/v2/positions?$filter=effectiveStartDate eq 2020-01-01 and effectiveEndDate eq 2020-01-31