Human Capital Management REST API Developer Reference

responses

Represents a Response REST API structure

GET

URI /services/apexrest/v1.0/responses/*
Description Returns response records based on response ID, job question ID, or job application ID, and optionally custom fields of response that were passed as parameters in request URL

Input Parameters

ids Comma-separated Salesforce record IDs of responses
jobapplicationids Comma-separated Salesforce record IDs of candidate job applications
jobquestionids Comma-separated Salesforce record IDs of job questions
customfields Comma-separated custom field names of Response__c object

Sample Code


// GET Response
[{
   "ResponseTextLong": "Get Test Response Text Long 1",
   "ResponseText": "Get Test Response Text 1",
   "ResponseDate": "2015-02-02",
   "OwnerId": "005j000000BWLAkAAP",
   "Name": "R-0080",
   "LastModifiedDate": "2016-04-28T17:22:39.000Z",
   "LastModifiedById": "005j000000BWLAkAAP",
   "JobQuestion": "a1wj0000000x31LAAQ",
   "JobApplication": "a1sj0000001pyN6AAI",
   "Id": "a2xj0000000sdLEAAY",
   "CustomFields": [{
      "FieldName": "CustomFieldName",
      "Value": "CustomFieldValue"
   }],
   "CreatedDate": "2016-04-28T17:22:39.000Z",
   "CreatedById": "005j000000BWLAkAAP"
}]

POST

URI /services/apexrest/v1.0/responses/*
Description Insert response records

Input Parameters

records Response records that need to be inserted

Sample Code


// POST Request
{
   "records": [{
      "ResponseText": "Test Response Text 1",
         "ResponseTextLong": "Test Response Text Long 1",
      "ResponseDate": "2015-02-02",
      "JobQuestion": "a2pj000000534hjAAX",
      "JobApplication": "a2rj000000198ktAAY",
      "CustomFields": [{
            "FieldName": "CustomField1__c",
            "Value": "Test"
         },
         {
            "FieldName": "CustomField2__c",
            "Value": 2
         },
         {
            "FieldName": "CustomField3__c",
            "Value": "foo@bar.com"
         },
         {
            "FieldName": "CustomField4__c",
            "Value": "2015-02-02"
         },
         {
            "FieldName": "CustomField5__c",
            "Value": "true"
         }] 
   }, {
      "ResponseText": "Test Response Text 2",
         "ResponseTextLong": "Test Response Text Long 2",
      "ResponseDate": "2015-04-02",
      "JobQuestion": "a2pj000000534hiAAX",
      "JobApplication": "a2rj000000198kmAAY"    
   }]
}

// POST Response
[
   "a1fj000000104slAAI",
   "a1fj000000104smAAI"
]

PATCH

URI /services/apexrest/v1.0/responses/*
Description Insert or update response records

Input Parameters

records Response records that need to be inserted or updated

Sample Code


// PATCH Request
{
   "records": [{
      "Id": "a1fj000000103mv",
      "ResponseText": "Test Response Text 1",
         "ResponseTextLong": "Test Response Text Long 1",
      "ResponseDate": "2015-02-02",
      "JobQuestion": "a2pj000000534hjAAX",
      "JobApplication": "a2rj000000198ktAAY",
      "CustomFields": [{
            "FieldName": "CustomField1__c",
            "Value": "Test"
         },
         {
            "FieldName": "CustomField2__c",
            "Value": 2
         },
         {
            "FieldName": "CustomField3__c",
            "Value": "foo@bar.com"
         },
         {
            "FieldName": "CustomField4__c",
            "Value": "2015-02-02"
         },
         {
            "FieldName": "CustomField5__c",
            "Value": "true"
         }] 
   }, {
      "Id": "a1fj000000206sg",
      "ResponseText": "Test Response Text 2",
         "ResponseTextLong": "Test Response Text Long 2",
      "ResponseDate": "2015-04-02",
      "JobQuestion": "a2pj000000534hiAAX",
      "JobApplication": "a2rj000000198kmAAY"    
   }]
}

// PATCH Response
[
   "a1fj000000104slAAI",
   "a1fj000000104smAAI"
]
© Copyright 2009–2019 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.