Retrieve Document Delivery Preferences

You may want to retrieve the delivery preferences of documents that employees have specified in their document records for pay slips, year-end tax statements, and so on. You can use the documentDeliveryPreferences resource to retrieve the document delivery preference based on criteria such as person number and system document type.

Let's discuss these scenarios:

  • Retrieve document delivery preferences by person number
  • Retrieve document delivery preferences by system document type
  • Retrieve document delivery preferences by person number and system document type
  • Retrieve document delivery preferences beyond default limit

Retrieve by Person Number

Let's say that Denise is Jason's payroll representative. She wants to retrieve Jason's delivery preference for all the document types by using his person number.

To retrieve the document delivery preference:

  1. Perform a GET operation on the documentDeliveryPreferences resource by using the person number as a query parameter.
  2. View the delivery preference for all the document types for that person.

Example URL

Use this resource URL format.

GET
hcmRestApi/resources/11.13.18.05/documentDeliveryPreferences?q=PersonNumber='100000015254281'

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "PersonNumber": "100000015254281",
      "SystemDocumentType": "ORA_HRX_GB_PAE_LETTERS",
      "PaperPreference": "Y",
      "OnlinePreference": "N",
      "links": : [
          {
            ...}  
    }
  ]
}

Retrieve by System Document Type

Denise wants to view the delivery preference details of a specific document type for Jason.

To retrieve a specific document delivery preference:

  1. Perform a GET operation on the documentDeliveryPreferences resource by using the SystemDocumentType parameter and fields such as OnlinePreference and PaperPreference.
  2. View the delivery preference details for the document type.

Example URL

Use this resource URL format.

GET
hcmRestApi/resources/11.13.18.05/documentDeliveryPreferences?q=SystemDocumentType='US_AMOL_PAYROLL_EMP_1A3303'&fields=OnlinePreference,PaperPreference

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "OnlinePreference": "Y",
      "PaperPreference": "N",
      "links": [
         {
           ...}
    }
  ]
}

Retrieve by Person Number and System Document Type

Now, let's see how Denise can retrieve Jason's delivery preference details by using both the person number and the system document type.

To retrieve the document delivery preference:

  1. Perform a GET operation on the documentDeliveryPreferences by using the PersonNumber and SystemDocumentType parameters.
  2. View the delivery preference details for the document type.

Example URL

Use this resource URL format.

GET
hcmRestApi/resources/11.13.18.05/documentDeliveryPreferences?q=SystemDocumentType='US_AMOL_PAYROLL_EMP_1A3303';PersonNumber='100000015254281'

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "PersonNumber": "100000015254281",
      "SystemDocumentType": "US_AMOL_PAYROLL_EMP_1A3303",
      "PaperPreference": "N",
      "OnlinePreference": "Y",
      "links": : [
         {
           ...}
    }
  ]
}

Retrieve Beyond Default Limit

Let's say that Denise wants to retrieve the document delivery preference details of all the persons in her organization. She wants to retrieve more than 25 records for a specific system document type.

To retrieve the document delivery preference details:

  1. Perform a GET operation on the documentDeliveryPreferences resource by using the SystemDocumentType parameter for all the available document delivery preferences of all the persons.
  2. View the delivery preference details for the document type.

Example URL

Use this resource URL format.

GET
hcmRestApi/resources/11.13.18.05/documentDeliveryPreferences?q=SystemDocumentType='US_AMOL_PAYROLL_EMP_1A3303'&limit=100

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "PersonNumber": "100000015254281",
      "SystemDocumentType": "US_AMOL_PAYROLL_EMP_1A3303",
      "PaperPreference": "N",
      "OnlinePreference": "Y",
      "links": [
         {
          ...}
    }
  ]
}