取消
Showing results for
Search instead for
Did you mean:
edreir
Occasional Member - Level 2

Create an expense report

Hello,

I am trying to create an expense report, this is the code snippet I am using, written in python:

json_data = { "Name": "TEST #2", "Purpose": "Test create expense report", "PolicyID":"xyzxyzxyzxyzxyzxyzxyz", "Comment": "this is just a comment" } concur_resp = concur.api('v3.0/expense/reports', method='POST', params=params, headers={'Content-type': 'application/json', 'accept': '*'}, data=json.dumps(json_data))

I am getting a 500 error.

With the same user I am able to list the reports, get policies. So the authorization itself is working, at least to read.

My question is, do I need an special privileges to create reports? If so, which one? If it is not the case, can someone pleae help figure out what I am missing.

Thanks in advance

1 Solution
Solution
edreir
Occasional Member - Level 2

I could fix by removing the policyID parameter, it will then create the expense on the default policyID of the user.

Regards

View solution in original post

2 REPLIES2
Solution
edreir
Occasional Member - Level 2

I could fix by removing the policyID parameter, it will then create the expense on the default policyID of the user.

Regards

AshleyB
SAP Concur, Former Employee

Great to hear! Thanks for sharing your solution.


Best,
Ashley Bragg
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.
My Settings." disabled class="lia-form-type-text lia-inline-topic-not-allowed" aria-label="Sorry, either you cannot reply to this topic or you have not verified your email address by clicking on the verification link in the email we sent you when you registered. If you did not receive an email from us, or need us to resend it, please visit My Settings."> verify your email address." disabled class="lia-form-type-text lia-inline-topic-not-allowed-mobile" aria-label="Sorry, either you cannot reply to this topic or you must first verify your email address.">