Symptom
Response code 500 Error: "upserted failed: Invalid photo type for Key Photo/photoType=20" for Entity: Photo
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
SAP SuccessFactors HXM Suite
- Photo Odata API Entity
Reproducing the Issue
Scenario #1.
Upsert Photo entity with photoType 20 from OData API.
eg. https://apisalesdemo8.successfactors.com/odata/v2/upsert?$format=json
Payload:
"d": [
{
"key": "Photo/photoType=20,Photo/userId=sfadmin",
"status": "ERROR",
"editStatus": null,
"message": "upserted failed: Invalid photo type for Key Photo/photoType=20, Photo/userId=sfadmin with the index 0",
"index": 0,
"httpCode": 400,
"inlineResults": null
}
]
}
Photo: UPSERT failed for the row with key: Photo/photoType=20, Photo/userId=108743. Reason: upserted failed: Invalid photo type. The row will not be processed for subsequent entities
Cause
After b2211, Photo entity is not supporting to upsert the original-sized photo with photoType 20.
Resolution
Please use the valid photoType value in this Help Portal: Photo Types
Keywords
EDU-18263, upserted failed: Invalid photo type for Key Photo/photoType=20, photoType 20 , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem