cancel
Showing results for 
Search instead for 
Did you mean: 

Supplier Data API With Pagination - Fetch Modular Questions by SM Vendor ID

shivamshukla12
Contributor
0 Kudos
554

Hi All ,

We are trying to consume below API - Get /vendors/{vendorid}/workspaces/questionnaires but this is not giving any response 200 Blank. but when i see there is questionnaires in the backend Ariba System.

My goal is to get questionnaire templates dynamically. Can you please suggest.

Thanks,

Shivam

Accepted Solutions (0)

Answers (1)

Answers (1)

gabrielmendes
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Shivam, can you share the url you are testing?

The try out option you have in the Ariba API Portal and SAP Business Hub is just a test on how to build the URL and parameters for that specific api, it offers Mockup data not related to any customer.

If you are looking to get information from a customer realm, the customer needs to:

  • Request an application in SAP Ariba Portal, this application is created by the Ariba admin of the organization (customer side)
  • Request access to that API, where the admin selects the realm where this API is going to be enabled
  • After the application is approved and you have all details (apikey, oauth details) you can start builidng the calls for the customer realm
  • For each API in the portal you have environment details(attached) confirm you have the correct URL's

Hope it helps

shivamshukla12
Contributor
0 Kudos

Hi ,

Yes this is already done and i am pointing out to right realm as well. Please find below is the url.

https://openapi.ariba.com/api/supplierdatapagination/v4/prod/vendors/S10101011/workspaces/WS28767222...

But in response there are no questionnaires coming. it should logically gives us all the questions we need to ask during supplier registration process right ?

Thanks,

Shivam

gabrielmendes
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, looking at your URL i'm guessing is intentional to hide the customer realm for here because that testrealm-T is not a valid realm, I'm sharing a URL so you can compare:

https://openapi.ariba.com/api/supplierdatapagination/v4/prod/vendors/{{Supplier}}/workspaces/{{Works...

If you take a look at this URL, you have a QNA in the path missing (i think you are trying the methods for Modular questionnaires and registration forms don't fit here), don't use top initially, if you actually see that you need pagination you can use this parameter later.

Go from general to specific and confirm you are filling all required information:

  • Confirm you are getting the token as first step so you can move to next calls with Authorization = Bearer {{token}} as a header parameter
  • Try to go from Fetch vendors (filter by your SMID) and see what are the questionnaires you can bring for that supplier, use a simple filter (body) like this:
  • { "smVendorIds": [ "S10101011" ], "outputFormat": "JSON", "withQuestionnaire": true, "withGenericCustomFields": true}
  • After you get all combinations of WorkspaceID and QuestionnaireID for the supplier ("workspaceType": "REGISTRATION") you can move to the Endpoints for WorkspaceID OR WorskpaceID&QuestionnaireID in the section Question&Answers in the portal
  • You should have the questions and answers for that supplier registration form

Additional notes, check if supplier actually is in that phase in SLP (if it is not invited you don't have information here, if it was invited but questionnaire is not filled yet, if the questionnaire was completed but nothing was filled because there were not mandatory questions, look at that level too)

Hope it helps.