Professional Services Automation REST API Developer Reference

Assignments

Inserts or updates time off request details as an assignment record.

Request Keys

The following keys are available to use for the time off to assignment integration.

  1. CorrelationId - The assignment's unique identifier that links it to a time off request in a third-party HCM application.
  2. ResourceCorrelationId - The resource's unique identifier that links them to a third-party HCM application.
  3. RequestStatus - The status of the time off request, such as Approved or Canceled.
  4. RequestDates - Details of each date in the time off request.
  5. Date - The individual date in the time off request.
  6. DateStatus - The status of the date, such as Approved or Canceled.
  7. Policy - The policy associated with the date.
  8. Unit - The unit of measurement associated with the date, such as days or hours.
  9. Quantity - The amount of time off requested for the date.
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 assignment's unique identifier that links it to a time off request in 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/assignments/*
Description Inserts time off request details as an assignment record.

Sample Code


//POST Request 1
[{
    "CorrelationId": "93847jdue7",
    "ResourceCorrelationId": "102420171",
    "RequestStatus": "Approved",
    "RequestDates": [{
        "Date": "2017-11-15",
        "DateStatus": "Approved",
        "Policy": "Vacation",
        "Unit": "days",
        "Quantity": "1"
    }]
},
{
   "CorrelationId": "93847jdue0",
   "ResourceCorrelationId": "102820171",
   "RequestStatus": "Approved",
   "RequestDates": [{
        "Date": "2017-11-16",
        "DateStatus": "Approved",
        "Policy": "Vacation",
        "Unit": "hours",
        "Quantity": "8"
    },{
        "Date": "2017-11-17",
        "DateStatus": "Approved",
        "Policy": "Sick",
        "Unit": "days",
        "Quantity": "1"
    }]
}]

//POST Response 1
HTTP/1.1 200 OK


//POST Request 2
[{
    "CorrelationId": "93847jdue7",
    "ResourceCorrelationId": "102420171",
    "RequestDates": [{
        "Date": "2017-11-15",
        "DateStatus": "Approved",
        "Policy": "Vacation",
        "Unit": "days",
        "Quantity": "1"
    }]
}]

//POST Response 2
HTTP/1.1 400 Bad Request

[{
    "CorrelationId": "93847jdue7",
    "Message": "You must enter a RequestStatus value. Contact your administrator."
}]

PATCH

URI /services/apexrest/pse/v1.0/assignments/*
Description Inserts or updates time off request details as an assignment record.

Sample Code


//PATCH Request 1
[{
    "CorrelationId": "93847jdue7",
    "ResourceCorrelationId": "102420171",
    "RequestStatus": "Approved",
    "RequestDates": [{
        "Date": "2017-11-15",
        "DateStatus": "Approved",
        "Policy": "Vacation",
        "Unit": "days",
        "Quantity": "1"
    }]
},
{
   "CorrelationId": "93847jdue0",
   "ResourceCorrelationId": "102820171",
   "RequestStatus": "Approved",
   "RequestDates": [{
        "Date": "2017-11-16",
        "DateStatus": "Approved",
        "Policy": "Vacation",
        "Unit": "hours",
        "Quantity": "8"
    },{
        "Date": "2017-11-17",
        "DateStatus": "Approved",
        "Policy": "Sick",
        "Unit": "days",
        "Quantity": "1"
    }]
}]

//PATCH Response 1
HTTP/1.1 200 OK


//PATCH Request 2
[{
    "CorrelationId": "93847jdue7",
    "ResourceCorrelationId": "102420171",
    "RequestDates": [{
        "Date": "2017-11-15",
        "DateStatus": "Approved",
        "Policy": "Vacation",
        "Unit": "days",
        "Quantity": "1"
    }]
}]

//PATCH Response 2
HTTP/1.1 400 Bad Request

[{
    "CorrelationId": "93847jdue7",
    "Message": "You must enter a RequestStatus value. Contact your administrator."
}]
© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.