Create an assignment

post

/hcmRestApi/resources/11.13.18.05/emps/{empsUniqID}/child/assignments

Request

Path Parameters
  • This is the hash key of the attributes which make up the composite key for the Employees resource and used to uniquely identify an instance of Employees. The client should not generate the hash key value. Instead, the client should query on the Employees collection resource in order to navigate to a specific instance of Employees to get the hash key.
Header Parameters
  • This header accepts a string value. The string is a semi-colon separated list of =. It is used to perform effective date range operations. The accepted parameters are RangeMode, RangeSpan, RangeStartDate, RangeEndDate, RangeStartSequence and RangeEndSequence. The parameter values are always strings. The possible values for RangeMode are SET_LOGICAL_START, SET_LOGICAL_END, END_DATE, SET_EFFECTIVE_START, SET_EFFECTIVE_END, REPLACE_CORRECTION, REPLACE_UPDATE, RECONCILE_CORRECTION, CORRECTION, RECONCILE_UPDATE, UPDATE, ZAP and DELETE_CHANGES. The possible values for RangeSpan are PHYSICAL_ROW_END_DATE and LOGICAL_ROW_END_DATE. The values for RangeStartDate and RangeEndDate have to be a string representation of a date in yyyy-MM-dd format. The value for RangeStartSequence and RangeEndSequence must be strings such that when parsed they yield positive integers.
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
  • Title: Action Code
    Maximum Length: 30
    Action performed on a particular record, such as Hire, Add Pending Worker, Manager Change, and so on. Valid values are defined in the list ActionCodeLOV.
  • Title: Reason Code
    Maximum Length: 30
    User-defined code for the action reason. Specifies the reason for the action performed on the record. Valid values are defined in the list ActionReasonCodeLOV.
  • Title: Assignment Category
    Maximum Length: 30
    User-defined category such as Full-Time Permanent or Part-Time Permanent. Valid values are defined in the list AssignmentCategoryLOV.
  • Assignment Descriptive Flexfields
    Title: Assignment Descriptive Flexfields
    The assignmentDFF resource is a child of the assignments resource. It includes all employee assignment key flexfields as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
  • Assignment Extra Information Extensible FlexFields
    Title: Assignment Extra Information Extensible FlexFields
    The assignmentExtraInformation resource is a child of the emps resource. It includes all the extensible flexfields for additional assignment information as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
  • Title: Assignment ID
    Unique identifier for the assignment. This is a primary key generated by the application.
  • Title: Assignment Name
    Maximum Length: 80
    Name of the assignment.
  • Title: Assignment Number
    Maximum Length: 30
    Unique identifier for the assignment or terms. Valid for workers and nonworkers.
  • Title: Projected End Date
    Date on which the assignment is expected to end.
  • Title: Assignment Status
    Maximum Length: 30
    HR status of the assignment, such as Active or Inactive. Valid values are defined in the list AssignmentStatusLOV.
  • Title: Assignment Status Type ID
    Unique identifier for the user-defined assignment status. Valid values are defined in the list AssignmentStatusTypeIdLOV.
  • Title: Business Unit ID
    Unique identifier for the business unit. Valid values are defined in the list BusinessUnitIdLOV.
  • Default expense account represented as a concatenated value of all the related segments.
  • Title: Organization ID
    Unique identifier for the department. Valid values are defined in the list DepartmentIdLOV.
  • Title: Effective End Date
    Date at the end of the period within which the employee assignment is effective.
  • Title: Effective Start Date
    Date at the beginning of the period within which the employee assignment is effective.
  • Employee Representatives
    Title: Employee Representatives
    The empreps resource is a child of the assignments resource. It includes all employee representatives as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
  • Title: End Time
    Maximum Length: 5
    Work day normal end time.
  • Title: Frequency
    Maximum Length: 30
    Frequency of normal working hours such as week, month, year. Valid values are defined in the list FrequencyLOV.
  • Title: Full Time or Part Time
    Maximum Length: 30
    Indicates whether the position the employee is hired for is full-time or part-time. Valid values are defined in the list FullPartTimeLOV.
  • Title: Grade ID
    Unique identifier for the grade. Valid values are defined in the list GradeIdLOV.
  • Title: Grade Ladder ID
    Unique identifier for the grade ladder.
  • Title: Job ID
    Unique identifier for the job. Valid values are defined in the list JobIdLOV.
  • Title: Legal Entity ID
    Unique identifier for the legal entity.
  • Title: Location ID
    Unique identifier for the location. Valid values are defined in the list LocationIdLOV.
  • Title: Manager Assignment ID
    Identifier for the manager's assignment.
  • Title: Manager ID
    Unique identifier for a manager. Valid values are defined in the list ManagerIdLOV.
  • Title: Type
    Maximum Length: 30
    Role of the manager with regards to the overall organization structure. For example, functional, project leader, and so on.
  • People group represented as a concatenated value of all the related key flexfield segments.
  • People Group Key Flexfields
    Title: People Group Key Flexfields
    The peopleGroupKeyFlexfield resource is a child of the assignments resource. It includes all employee assignment key flexfields as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
  • Title: Period of Service ID
    Primary key generated by the application.
  • Title: Person Type ID
    Unique identifier for the person type. Valid values are defined in the list PersonTypeIdLOV.
  • Title: Position ID
    Unique identifier for a position. Valid values are defined in the list PositionIdLOV.
  • Title: Primary Assignment
    Maximum Length: 30
    Default Value: false
    Indicates whether the current assignment is the primary assignment. Valid values are Yes and No.
  • Title: Primary Work Relationship
    Maximum Length: 30
    Indicates whether the current work relationship is primary. Valid values are Yes and No.
  • Title: Primary Employment Terms
    Maximum Length: 30
    Default Value: false
    Indicates whether the current employment terms are primary. Valid values are Yes and No.
  • Title: Probation End Date
    End date of the probation period.
  • Title: Probation Period
    Duration of the probation period.
  • Title: Probation Unit
    Maximum Length: 30
    Units for the probation period duration. Valid values are defined in the list QUALIFYING_UNITS.
  • Title: Projected Start Date
    Proposed start date for the pending worker.
  • Title: Proposed Person Type
    Maximum Length: 30
    Unique identifier for the worker class. This value is valid only if the PersonTypeId is Pending Worker. It can be any of the employee or contingent worker types. Valid values are defined in the list ProposedPersonTypeIdLOV.
  • Title: Regular or Temporary
    Maximum Length: 30
    Indicates whether the position the employee is hired for is regular or temporary. Valid values are defined in the list RegularTemporaryLOV.
  • Title: Salary Amount
    Salary amount entered based on the salary frequency.
  • Identifier for the set of details linked to a worker's base pay. It identifies the payroll characteristics used to pay base earnings, the duration for which base pay is quoted, the factor used to annualize base pay, any components used to attribute base pay adjustments to different reasons, and any associated grade rate for salary validation. Valid values are defined in the list SalaryBasisIdLOV.
  • Title: Hourly Paid or Salaried
    Maximum Length: 30
    Identifies whether the assignment is paid by the hour or by a salary. Either maintained at the assignment level or employment or placement terms but not both. Valid values are defined in the list SalaryCodeLOV.
  • Title: Start Time
    Maximum Length: 5
    Work day normal start time.
  • Title: Effective Start Date
    Date at the beginning of the period within which the employee term is effective.
  • Title: Worker Category
    Maximum Length: 30
    Category of the worker such as Blue Collar, Civil Servant, and so on. Valid values are defined in the list WorkerCategoryLOV.
  • Title: Working as a Manager
    Maximum Length: 30
    Indicates whether the person is a manager. Valid values are Yes and No.
  • Title: Working at Home
    Maximum Length: 30
    Indicates whether the person is working at home. Valid values are Yes and No.
  • Title: Working Hours
    Normal working hours.
  • Title: Tax Address ID
    Unique identifier for the address that is used for taxation purposes. This can be different from a mailing address. Valid values are defined in the list WorkTaxAddressIdLOV.
Nested Schema : Assignment Descriptive Flexfields
Type: array
Title: Assignment Descriptive Flexfields
The assignmentDFF resource is a child of the assignments resource. It includes all employee assignment key flexfields as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
Show Source
Nested Schema : Assignment Extra Information Extensible FlexFields
Type: array
Title: Assignment Extra Information Extensible FlexFields
The assignmentExtraInformation resource is a child of the emps resource. It includes all the extensible flexfields for additional assignment information as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
Show Source
  • Discriminator: CategoryCode
    Discriminator: { "propertyName":"CategoryCode", "mapping":{ "PER_ASG_EIT":"#/components/schemas/oracle_apps_hcm_employment_core_flex_assignmentExtraInfoEFF_Category_view_j__CategoryPerAsgEitprivateVO-item-post-request" } }
Nested Schema : Employee Representatives
Type: array
Title: Employee Representatives
The empreps resource is a child of the assignments resource. It includes all employee representatives as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
Show Source
Nested Schema : People Group Key Flexfields
Type: array
Title: People Group Key Flexfields
The peopleGroupKeyFlexfield resource is a child of the assignments resource. It includes all employee assignment key flexfields as of the specified date. By default, the current date is retained. This resource is currently under controlled availability.
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : Discriminator: CategoryCode
Type: object
Discriminator: CategoryCode

Discriminator Values

Match One Schema
Show Source
Nested Schema : oracle_apps_hcm_employment_core_flex_assignmentExtraInfoEFF_Category_view_j__CategoryPerAsgEitprivateVO-item-post-request
Type: object
Show Source
Nested Schema : InformationORA_5FPER_5FRET_5FGRADEprivateVO
Type: array
Show Source
Nested Schema : workers-workRelationships-assignments-assignmentsEFF-InformationORA_5FPER_5FRET_5FGRADEprivateVO-item-post-request
Type: object
Show Source
Nested Schema : emps-assignments-empreps-item-post-request
Type: object
Show Source
Nested Schema : emps-assignments-peopleGroupKeyFlexfield-item-post-request
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : emps-assignments-item-response
Type: object
Show Source
Nested Schema : assignmentDFF
Type: array
Show Source
Nested Schema : assignmentExtraInformation
Type: array
Show Source
  • Discriminator: CategoryCode
    Discriminator: { "propertyName":"CategoryCode", "mapping":{ "PER_ASG_EIT":"#/components/schemas/oracle_apps_hcm_employment_core_flex_assignmentExtraInfoEFF_Category_view_j__CategoryPerAsgEitprivateVO-item-response" } }
Nested Schema : empreps
Type: array
Show Source
Nested Schema : peopleGroupKeyFlexfield
Type: array
Show Source
Nested Schema : emps-assignments-assignmentDFF-item-response
Type: object
Show Source
Nested Schema : Discriminator: CategoryCode
Type: object
Discriminator: CategoryCode

Discriminator Values

Match One Schema
Show Source
Nested Schema : oracle_apps_hcm_employment_core_flex_assignmentExtraInfoEFF_Category_view_j__CategoryPerAsgEitprivateVO-item-response
Type: object
Show Source
Nested Schema : InformationORA_5FPER_5FRET_5FGRADEprivateVO
Type: array
Show Source
Nested Schema : workers-workRelationships-assignments-assignmentsEFF-InformationORA_5FPER_5FRET_5FGRADEprivateVO-item-response
Type: object
Show Source
Nested Schema : emps-assignments-empreps-item-response
Type: object
Show Source
Nested Schema : emps-assignments-peopleGroupKeyFlexfield-item-response
Type: object
Show Source
Back to Top

Examples

The following example shows how to create an employee assignment by submitting a POST request on the REST resource using cURL.

curl -i -u "<username>:<password>" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -H "Effective-Of: RangeStartDate=2014-06-01" -X POST -d <payload> https://<host>:<port>/hcmRestApi/resources/11.13.18.05/emps/00020000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B597419030000787077080000014349EB6440780000000EACED00057708000110F07EBB2F8D/child/assignments

Example of Payload

The following shows an example of the payload

{
  "AssignmentName" : "EmpPT6A5_Assignment1457526107131",
  "PersonTypeId" : "13",
  "BusinessUnitId" : "202",
  "LocationId" : "204",
  "JobId" : "18",
  "GradeId" : "31",
  "DepartmentId" : "204",
  "WorkerCategory" : "WC",
  "AssignmentCategory" : "FR",
  "WorkingAtHome" : "N",
  "WorkingAsManager" : "N",
  "SalaryCode" : "H",
  "WorkingHours" : "8",
  "Frequency" : "D",
  "EndTime" : "17:00",
  "SalaryAmount" : "100000",
  "SalaryBasisId" : "100010024999994",
  "ActionCode" : "ADD_ASSIGN",
  "AssignmentStatus" : "ACTIVE",
  "LegalEntityId" : "300100003448002"
}

Example of Response Header

The following shows an example of the response header.

Status: HTTP/1.1 201 Created
Content-Type : application/json

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
  "AssignmentName":"EmpPT6A5_Assignment1457526107131",
  "PersonTypeId":13,
  "BusinessUnitId":202,
  "LocationId":204,
  "JobId":18,
  "GradeId":31,
  "DepartmentId":204,
  "WorkerCategory":"WC",
  "AssignmentCategory":"FR",
  "WorkingAtHome":"N",
  "WorkingAsManager":"N",
  "SalaryCode":"H",
  "WorkingHours":8,
  "Frequency":"D",
  "StartTime":"08:00",
  "EndTime":"17:00",
  "SalaryAmount":100000,
  "SalaryBasisId":100010024999994,
  "ActionCode":"ADD_ASSIGN",
  "ActionReasonCode":null,
  "AssignmentStatus":"ACTIVE",
  "WorkTaxAddressId":null,
  "AssignmentId":300100081102810,
  "EffectiveStartDate":"2014-06-01",
  "EffectiveEndDate":"4712-12-31",
  "PositionId":null,
  "TermsEffectiveStartDate":"2014-06-01",
  "ManagerAssignmentId":null,
  "ManagerId":null,
  "ManagerType":null,
  "AssignmentNumber":"E9551600082366393",
  "PeriodOfServiceId":300100081102753,
  "OriginalHireDate":null,
  "PrimaryAssignmentFlag":"Y",
  "ProbationPeriodEndDate":null,
  "ProbationPeriodLength":null,
  "ProbationPeriodUnitOfMeasure":null,
  "AssignmentProjectedEndDate":null,
  "ActualTerminationDate":null,
  "LegalEntityId":300100003448002,
  "PrimaryWorkRelationFlag":"Y",
  "PrimaryWorkTermsFlag":"N",
  "CreationDate":"2016-03-09 17:53:13.033",
  "LastUpdateDate":"2016-03-09 17:53:14.981",
    "links":[24]
       0:  {...
          ...}
}
Back to Top