Tech tutorials, Reviews, How To's
Training and Certification Update API
API Call Structure
This is a simple API Call, with the appropriate access Token and data.
curl --location --request POST 'https://XXXXX.my.salesforce.com/services/apexrest/training' \
--header 'Authorization: Bearer XXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Cookie: BrowserId=XXXXX; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1' \
--data-raw '{
"Certifications":[{
“email”:”xxxx@xxxx.com”,
“certID”:”XXXXXXXXXXX”,
“courseName”:”XXXXXXXXXXXXX”,
“courseID”:”XXX”,
“courseType”:”Learning Path”,
“certApplicable”:”yes”,
“completionDate”:”DD-MM-YYYY”,
“expDate”:”DD-MM-YYYY”,
“courseScore”:XX
}]
}'
In this API Call, email ID passed must be available on the Salesforce as a Contact. If not, the data will not be stored. Similarly, the certID passed should be Unique and not assigned to any other certification object.
Course Name and Course ID can be a text field. courseType can be a “Learning Path” or “Course”
Completion Date and Expiry date must be in DD-MM-YYYY format. if there is no expiry date for the course or certification, then you must not pass that parameter at all. Passing NULL or “” as expDate will result in syntax error.
Response
The response to the API Will be as follows
If the Certification is updated correctly:
If there is a Duplicate Certification with the Certification ID
If there is no user with the email ID passed