Skip to Content
Product Information
Author's profile photo Antonio Maradiaga

Using the SAP Ariba Master Data Retrieval API for Sourcing

In this blog post, I will cover the SAP Ariba Master Data Retrieval API for Sourcing, which was released a couple of weeks ago. We’ll see the entities that are exposed in the new API, how these can be used and an example use case for reporting purposes.

The Master data retrieval API for Sourcing was released as part of the 2011 release. It is now possible to retrieve the master data that exists is your SAP Ariba realm. This enables third parties/customers to create applications extending SAP Ariba and be able to display a customer’s SAP Ariba Master Data in their applications. The API can also be used for auditing purposes, to validate the master data available in SAP Ariba compared to the system of origin.

⚡ Check out the documentation available for the Master Data Retrieval API for Sourcing: https://help.sap.com/viewer/ed78e1994e424374b6d81225a0276e0c/cloud/en-US/a401d6eb8f1743abac3e245ceadaf376.html

Entities

Each entity available in the API exposes different fields. To find out which fields an entity exposes, you can use the GET /entityTypes/{EntityName} method, e.g. GET /entityTypes/users. The table below shows the entities available and their corresponding API names:

Master data entity API lookup name
User users
Group groups
UnitOfMeasure uoms
LocaleID loaleids
ClassificationCodeMap classificationcodemap
Currency currency
CurrencyConversionRate currencyconversionrate
CommodityCode commoditycodes
Country countries
Language languages
PreferredSupplierLevel preferredsupplierlevel
SegmentationLevel segmentationlevels
Department s4departments
Region s4regions

When extracting data via the GET /entityTypes/{EntityName} method, it is possible to $select fields, $expand certain fields, $filter, and do pagination with $top$skip query parameters. Also, we can $includeInactive records, $includeFlexFields and $includeNullValues. In essence, this API kinda follows the OData system query options.

ℹ️ This is a read-only API, it is not possible to create master data through it.

Reporting use case

In SAP Ariba, it is possible to assign a user delegate for a period of time, e.g. when someone goes on vacation, a delegate will be able of doing that user’s approvals. We have a requirement to report on who are the users responsible for this delegations.

We can use the Master data retrieval API for Sourcing if we want to know who is the delegatee for whom. This is something that was not possible to before and it can easily be retrieved by using the API.

Request:

curl --location --request GET 'https://openapi.ariba.com/api/mds-search/v1/prod/entities/users?$filter=CanActAs.Name%20ne%20null&$count=true&$includeNullValues=false&$top=250&$select=UniqueName,Name,Active,TimeUpdated,CanActAs.Name&$expand=CanActAs' \
--header 'Accept-Language: en' \
--header 'X-Realm: YOURREALM-T' \
--header 'Authorization: Bearer ea97d123-1234-1234-1234-3f96b8ce1234' \
--header 'apiKey: dAAW72hKXfwTFdxCfA2JZ4Wk3o8fsWaLY'

Response:

As you can see in the response above, we are able to retrieve all the users that can act as someone else in the system. This is achieved by specifying the query parameter $filter=CanActAs.Name ne null.

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Arpil Gupta
      Arpil Gupta

      Hi Antonio,

      Nice blog, what is the limitation for this API , in terms of number of calls.

       

      Regards

      Arpil

      Author's profile photo Antonio Maradiaga
      Antonio Maradiaga
      Blog Post Author

      Hi Arpil Gupta , you can find the rate limits in the Developer portal documentation. See screenshot.

      MD%20Retrieval%20-%20Rate%20limits

      MD Retrieval - Rate limits

      Author's profile photo Manoj Suppahiya
      Manoj Suppahiya

      API Response header-parameters show the rate limit numbers.

      Author's profile photo Ramprasad Medindrao
      Ramprasad Medindrao

      Hello leads,

      Does Ariba provides API's for importing master data like User Data from external systems yet ?

      Author's profile photo Antonio Maradiaga
      Antonio Maradiaga
      Blog Post Author

      There are some web services that allow you to interact with users in the system. Check out all the web services here - https://help.sap.com/doc/631084d43b6a4216b391ec37ce94733b/cloud/en-US/ws_index.htm

      Author's profile photo Giuseppe Armeli
      Giuseppe Armeli

      Hi Antonio,

      Nice blog, how is it possible to have information about "start date" and "End date" for delagations?

      Thanks

      Giuseppe

      Author's profile photo Antonio Maradiaga
      Antonio Maradiaga
      Blog Post Author

      Hi Giuseppe Armeli , I haven't play with this API for quite some time....I'm not sure if that data is available. I would check if the entity has a field where these data could be included.

      Author's profile photo KANG MINHWA
      KANG MINHWA

      Hello. Antonio.

       

      I was recommended the API to retrieve mail address of sourcing project.( in the sourcing project, there is "message" tab and find out "post via e-mail.". after clicking post via e mail, we can find out the e-mail address to send the message and it will be piled up in the sourcing project message board)

       

      The request name we recommended is User (e-mail address). However, after we explored the api we cannot retrieve the e-mail address of sourcing project..

       

      Do you know request name to retrieve mail address of sourcing project?Please let me know.

      Thank you.

       

      Best regards.