The CreatorCon Call for Content is officially open! Get started here.

HRSD OOB REST APIs to Create HR Case

_Samay
Tera Expert

Dear Friends,

We are doing HRSD Integrations and we need to utilize OOB REST API - HR Case Creation for HRSD and their functions like Create Task.

I tried some JSON and it’s keep throwing errors.

Can anyone please share me, correct JSON payload to create HR Cases.

Also, If we would like to write a custom REST APIs to create HR Case then how we can do this.

Thanks,

3 REPLIES 3

Kieran Anson
Kilo Patron

 

Hi @_Samay ,

Which API are you referring to? The following?

  • /api/sn_hr_core/case_creation/create_task

Hi @Kieran Anson - Yes. 

api/sn_hr_core/case_creation/create_task 

 

That REST API isn't intended for general use, it's primary purpose is for the create case UI page /sn_hr_core_case_creation.do

 

I don't imagine SN will provide technical support to use it outside of this use case.

 

However, you can pass in a JSON object in the following format

{
  "table": "sn_hr_core_case",
  "fields": {
    "opened_for": {
      "value": "62826bf03710200044e0bfc8bcbe5df1",
      "setAsDisplayValue": false
    },
    "subject_person": {
      "value": "62826bf03710200044e0bfc8bcbe5df1",
      "setAsDisplayValue": false
    },
    "work_notes": {
      "value": "sdsds",
      "setAsDisplayValue": false
    },
    "hr_service": {
      "value": "6628cde49f331200d9011977677fcf0b"
    }
  }
}