cancel
Showing results for 
Search instead for 
Did you mean: 
jmontoya
Occasional Member - Level 2

REST API filters

I am trying to get all the itemizations for all the expenses in this month, but the filter bellow is not working. Please advise.

 

https://www.concursolutions.com/api/v3.0/expense/itemizations?limit=3&user=ALL&TransactionDate[gt]=2...

 

when I use the url above I get all the records since 2015.

 

Thanks, in advance.

1 Solution
Solution
jmontoya
Occasional Member - Level 2

I changed my GET call to:

 

/api/v3.0/expense/entries?limit=100&user=ALL 

 

Now I am getting all the data I need. We can close this post and accept this as the correct answer.

 

View solution in original post

8 REPLIES 8
KevinD
Community Manager
Community Manager

@jmontoya Hello there. My go to person for API questions is out of office currently. I'm posting internally to see if I can get a response.


Thank you,
Kevin
SAP Concur Community Manager
Did this response answer your question? Be sure to select “Accept as Solution” so your fellow community members can be helped by it as well.
KevinD
Community Manager
Community Manager

@jmontoya here is what I received from my internal post:

"it looks like there is not a request parameter filter for date on that endpoint, so the caller will likely have to filter the desired date range on their end."

This a link I was provided: https://developer.concur.com/api-reference/expense/expense-report/expense-itemization.html


Thank you,
Kevin
SAP Concur Community Manager
Did this response answer your question? Be sure to select “Accept as Solution” so your fellow community members can be helped by it as well.
jmontoya
Occasional Member - Level 2

Okay that makes sense, thank you. I was wondering why I could not find any documentation/samples about filtering expenses.

 

The problem I have then: is that when I pull the data for the expenses' reports using:
                /api/v3.0/expense/reports?limit=100&user=ALL

 

I get 34,577 records.

 

Then I use this call to get the itemizations for those reports:

                 /api/v3.0/expense/itemizations?limit=100&user=ALL

 

but in this call I only get : 7,347 records

 

I would think that I should get 34,577 records or more since each report may have 1 or more items.

 

That is why I started trying to pull the data month by month to see if I was going to get better numbers. But if can't filter the data, that is not going to help me either. Any ideas why I can't pull all the data?

 

Thanks.

 

 

Solution
jmontoya
Occasional Member - Level 2

I changed my GET call to:

 

/api/v3.0/expense/entries?limit=100&user=ALL 

 

Now I am getting all the data I need. We can close this post and accept this as the correct answer.

 

gabyyuan
Occasional Member - Level 1

   /api/v3.0/expense/reports?limit=100&user=ALL, isnt that restricting the records to 100? how come you get 34,577 records? Please advise @jmontoya . Thank you very much.😀

jmontoya
Occasional Member - Level 2

The API endpoint returns a max of 100 records. I am using a Copy Data activity in Azure Data factory and when you enable pagination rules, you can download all the data without implementing the whole pagination logic. It is actually very convenient.

gabyyuan
Occasional Member - Level 1

Understood, thank you 🙂

jeff526
Occasional Member - Level 2

Is there a way to make a similar call with the v4 API?