PSA REST API Developer Reference

Resources

Inserts or updates resource details as a contact or person account record.

Request Keys

The following keys are available to use for the worker to resource integration.

  1. CorrelationId - The resource's unique identifier that links them to a third-party HCM application.
  2. LastName - The resource's last name.
  3. Salutation - The resource's salutation that indicates their profession or marital status.
  4. FirstName - The resource's first name.
  5. Street - The street details of the resource's address.
  6. City - The city details of the resource's address.
  7. StateOrProvince - The state or province details of the resource's address.
  8. PostalCode - The postal code or ZIP code of the resource's address.
  9. Country - The country details of the resource's address.
  10. Phone - The resource's phone number.
  11. MobilePhone - The resource's mobile phone number.
  12. Email - The resource's email address.
  13. BusinessTitle - The resource's business title.
  14. ReportsTo - The resource's manager. This key is only available when creating resources as contacts.
  15. ExternalResource - Indicates that the resource is external to the organization, such as a contractor.
  16. CostCenter - The resource's cost center in the organization structure.
  17. Department - The resource's department in the organization structure.
  18. Division - The resource's division in the organization structure.
  19. Location - The resource's location in the organization structure.
  20. ResourceStatus - The resource's employment status.
  21. ResourceStatusEffectiveDate - The date the resource's employment status becomes effective.
  22. ResourceRole - The resource's role.
  23. WorkCalendar - The resource's work calendar.
  24. CustomField1 - Additional information.
  25. CustomField2 - Additional information.
  26. CustomField3 - Additional information.
  27. CustomField4 - Additional information.
  28. CustomField5 - Additional information.
  29. CustomField6 - Additional information.
  30. CustomField7 - Additional information.
  31. CustomField8 - Additional information.
  32. CustomField9 - Additional information.
  33. CustomField10 - Additional information.
  34. CustomField11 - Additional information.
  35. CustomField12 - Additional information.
  36. CustomField13 - Additional information.
  37. CustomField14 - Additional information.
  38. CustomField15 - Additional information.
You must use the date format YYYY-MM-DD, such as 2018-04-24.

Response Keys

The following keys are used in the response.
  1. CorrelationId - The resource's unique identifier that links them to a third-party HCM application.
  2. Message - The message returned when an error occurs in a processing request.

POST

URI /services/apexrest/pse/v1.0/resources/*
Description Inserts resource details as a contact or person account record.

Sample Code


//POST Request 1
[{
   "CorrelationId": "93847jdue7",
   "LastName": "Smith",
   "Salutation": "Mr",
   "FirstName": "John",
   "Street": "123 Test St",
   "City": "Philadelphia",
   "StateOrProvince": "PA",
   "PostalCode": "12345",
   "Country": "USA",
   "Phone": "847-321-4326",
   "MobilePhone": "555-805-4326",
   "Email": "test@test.com",
   "BusinessTitle": "Marketing Consultant",
   "ReportsTo": "93847jdue2",
   "ExternalResource": false,
   "Division": "Sales",
   "CostCenter": "11223344",
   "Department": "Mid Market Sales",
   "Location": "Philadelphia",
   "ResourceStatus": "A",
   "ResourceStatusEffectiveDate": "1991-11-20",
   "ResourceRole": "Architect",
   "WorkCalendar": "US Default",
   "CustomField1": "test",
   "CustomField2": "test2",
   "CustomField3": "test3",
   "CustomField4": "test4",
   "CustomField5": "test5",
   "CustomField6": "test6",
   "CustomField7": "test7",
   "CustomField8": "test8",
   "CustomField9": "test9",
   "CustomField10": "test10",
   "CustomField11": "test11",
   "CustomField12": "test12",
   "CustomField13": "test13",
   "CustomField14": "test14",
   "CustomField15": "test15"
},
{
   "CorrelationId": "93847jdue0",
   "LastName": "Smith",
   "Salutation": "Mr",
   "FirstName": "Jonathan",
   "Street": "123 Test St",
   "City": "Philadelphia",
   "StateOrProvince": "PA",
   "PostalCode": "12645",
   "Country": "USA",
   "Phone": "847-325-4326",
   "MobilePhone": "555-815-4326",
   "Email": "test2@test.com",
   "BusinessTitle": "Marketing Consultant",
   "ReportsTo": "93847jdue2",
   "ExternalResource": false,
   "Division": "Sales",
   "CostCenter": "11223344",
   "Department": "Mid Market Sales",
   "Location": "Philadelphia",
   "ResourceStatus": "A",
   "ResourceStatusEffectiveDate": "1991-11-20",
   "ResourceRole": "Architect",
   "WorkCalendar": "US Default",
   "CustomField1": "test",
   "CustomField2": "test2",
   "CustomField3": "test3",
   "CustomField4": "test4",
   "CustomField5": "test5",
   "CustomField6": "test6",
   "CustomField7": "test7",
   "CustomField8": "test8",
   "CustomField9": "test9",
   "CustomField10": "test10",
   "CustomField11": "test11",
   "CustomField12": "test12",
   "CustomField13": "test13",
   "CustomField14": "test14",
   "CustomField15": "test15"
}
]

//POST Response 1
HTTP/1.1 200 OK


//POST Request 2
[{
   "CorrelationId": "93847jdue7",
   "LastName": "Smith",
   "ABCkey": "1234"
}]

//POST Response 2
HTTP/1.1 400 Bad Request

[{
    "CorrelationId": "93847jdue7",
    "Message": "The following keys are invalid: ABCkey. Contact your administrator."
}]

PATCH

URI /services/apexrest/pse/v1.0/resources/*
Description Inserts or updates resource details as a contact or person account record.

Sample Code


//PATCH Request 1
[{
   "CorrelationId": "93847jdue7",
   "LastName": "Smith",
   "Salutation": "Mr",
   "FirstName": "John",
   "Street": "123 Test St",
   "City": "Philadelphia",
   "StateOrProvince": "PA",
   "PostalCode": "12345",
   "Country": "USA",
   "Phone": "847-321-4326",
   "MobilePhone": "555-805-4326",
   "Email": "test@test.com",
   "BusinessTitle": "Marketing Consultant",
   "ReportsTo": "93847jdue3",
   "ExternalResource": false,
   "Division": "Sales",
   "CostCenter": "11223344",
   "Department": "Mid Market Sales",
   "Location": "Philadelphia",
   "ResourceStatus": "A",
   "ResourceStatusEffectiveDate": "1991-11-20",
   "ResourceRole": "Architect",
   "WorkCalendar": "US Default",
   "CustomField1": "test",
   "CustomField2": "test2",
   "CustomField3": "test3",
   "CustomField4": "test4",
   "CustomField5": "test5",
   "CustomField6": "test6",
   "CustomField7": "test7",
   "CustomField8": "test8",
   "CustomField9": "test9",
   "CustomField10": "test10",
   "CustomField11": "test11",
   "CustomField12": "test12",
   "CustomField13": "test13",
   "CustomField14": "test14",
   "CustomField15": "test15" 
},
{
   "CorrelationId": "93847jdue0",
   "LastName": "Smith",
   "Salutation": "Mr",
   "FirstName": "Jonathan",
   "Street": "123 Test St",
   "City": "Philadelphia",
   "StateOrProvince": "PA",
   "PostalCode": "12645",
   "Country": "USA",
   "Phone": "847-325-4326",
   "MobilePhone": "555-815-4326",
   "Email": "test2@test.com",
   "BusinessTitle": "Marketing Consultant",
   "ReportsTo": "93847jdue6",
   "ExternalResource": false,
   "Division": "Sales",
   "CostCenter": "11223344",
   "Department": "Mid Market Sales",
   "Location": "Philadelphia",
   "ResourceStatus": "A",
   "ResourceStatusEffectiveDate": "1991-11-20",
   "ResourceRole": "Architect",
   "WorkCalendar": "US Default",
   "CustomField1": "test",
   "CustomField2": "test2",
   "CustomField3": "test3",
   "CustomField4": "test4",
   "CustomField5": "test5",
   "CustomField6": "test6",
   "CustomField7": "test7",
   "CustomField8": "test8",
   "CustomField9": "test9",
   "CustomField10": "test10",
   "CustomField11": "test11",
   "CustomField12": "test12",
   "CustomField13": "test13",
   "CustomField14": "test14",
   "CustomField15": "test15"
}
]

//PATCH Response 1
HTTP/1.1 200 OK


//PATCH Request 2
[{
   "CorrelationId": "93847jdue7",
   "LastName": "Smith",
   "ABCkey": "1234",
}]

//PATCH Response 2
HTTP/1.1 400 Bad Request

[{
    "CorrelationId": "93847jdue7",
    "Message": "The following keys are invalid: ABCkey. Contact your administrator."
}]
© Copyright 2009–2019 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.