SAP Knowledge Base Article - Public

3512116 - Data Privacy Consent Statement REST API for PROFILE_PHOTO is returning {"Statement profile_photo-USA not found", "code": 404} 

Symptom

  • Data Privacy Consent Statement (DPCS) APIs to view consent statements can be used.
  • While fetching the Data Privacy Consent Statement (DPCS) APIs to view consent statements the API returns following error: "message": {"Statement profile_photo-USA not found", "code": 404}.
  • This article demonstrates how to utilize the OData API to view the DPCS details.

Environment

  • SAP SuccessFactors HXM Suite

Reproducing the Issue

  1. Created a Data Privacy Consent Statement (DPCS) and fetching it with the help of API.
  2. The error below returned:
    {"Statement profile_photo-USA not found", "code": 404} 

Cause

  1. If there is no Data Privacy Consent Statement (DPCS) created for the type:PROFILE_PHOTO and the DPCS statement is tried to be fetched it give the error.
  2. The DPCS should be in the Active status if it is created in the system if the DPCS is inactive it will give the error.
  3. Another reason this might occur due to the error in DPCS is created with the type:PROFILE_PHOTO and it is active, but the DPCS is created and does not have the configuration which is mentioned in the query which is being called.

Resolution

For example, below get query is performed to fetch a latest DPCS for a given country and locale:

GET: [DC API URL]/rest/security/privacy/v1/statements?type=PROFILE_PHOTO&country=USA&language=en_US

Here in the API query the DPCS which you are trying to fetch should have field setup as type=PROFILE_PHOTO, country=USA and language=en_US.

To get the DPCS result with API query the DPCS should have the above field configured as the above if the DPCS is not having the above field set then it would give you an error message.

Ensure the DPCS has the field setup as in the API query to get the result.

See Also

See implementation guide for further reference: Creating Data Privacy Consent Statements | SAP Help Portal

Overview of DPCS Overview | Data Privacy Consent Statement | SAP Business Accelerator Hub

Please check the KBA 2215682 - SuccessFactors API URLs and external IPs to find [DC API URL] for your instance.

3452944 - Data Privacy Consent Statement APIs - Recruiting Management - SAP for Me 

Keywords

PROFILE_PHOTO, {"Statement profile_photo-USA not found", "code": 404}, profile_photo, Data Privacy Consent Statement DPCS API, DPCS API, /rest/security/privacy/v1/statements, Consent, Statement  , KBA , LOD-SF-INT-API , API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HCM Core 2405