Batch Integrate Resources with an External Data Source
post
/primeapi/restapi/resource/syncBatch
Send a request to this endpoint to create or update one or more integrated resources. If an object provided in the request body does not exist in the application, an object is created using the request data. Integrated objects can only be modified using the API.
Request
Supported Media Types
- application/json
The unique identifier of resource data in an external source.S
Root Schema : List<ApiEntityExternallySourcedResource>
Type:
array
Title:
Show Source
List<ApiEntityExternallySourcedResource>
Nested Schema : ApiEntityExternallySourcedResource
Type:
Show Source
object
-
addressLine1:
string
The first line of the address of a location.
This might be the building number and street address. -
addressLine2:
string
The second line of the address of a location.
This might be a neighborhood or town. -
applicationUserId:
integer(int64)
The name of the user in the application that is also a resource.
-
calendar:
integer(int64)
The calendar assigned to the resource or role.
-
calendarName:
string
The name of the calendar.
-
calenderCode:
string
-
cityName:
string
The city name for a location.
-
codeValuesResource:
array codeValuesResource
Unique Items Required:
true
An array of code values for this resource object. -
costQuantityType:
string
Allowed Values:
[ "HOUR", "DAY", "WEEK", "MONTH", "YEAR" ]
The type of costs associated with a resource. -
countryCode:
string
The country for a location.
-
defaultSyncUnitsFromCost:
boolean
Default Value:
false
Sync units from cost. -
defaultUnitsPerHour:
object Unit
-
description:
string
Additional information for the resource or the role.
-
emailAddress:
string
The email address for the resource.
-
employeeNumber:
string
The resource identifier within the organization, typically the employee number or social security number.
-
isUser:
boolean
Default Value:
false
Indicates whether or not this resource is an application user. -
latitude:
number(double)
The geographical coordinate for the latitude of the location.
The default format for latitude is decimal degrees format, but the format you need to use will depend on your geolocation service. -
link:
string(uri)
Read Only:
true
-
longitude:
number(double)
The geographical coordinate for the longitude of the location.
The default format for longitude is decimal degrees format, but the format you need to use will depend on your geolocation service. -
managerName:
string
-
officePhoneNumber:
string
The office phone number for the resource.
-
otherPhoneNumber:
string
The alternate phone numbers for the resource.
-
overtimeFactor:
number(double)
The overtime factor used to compute the overtime price for the resource.
-
parent:
integer(int64)
The unique identifier for the parent resource or role.
-
postalCode:
string
The postal code, post code, or zip code of a location.
-
projectId:
integer(int64)
The unique identifier for the project.
-
resourceClass:
string
Allowed Values:
[ "RESOURCE", "ROLE" ]
The resource type. Valid values are:
Labor: Indicates that the selected resource performs labor, measured in units of time.
Nonlabor: Indicates that the selected resource does not perform labor, measured in units of time. Equipment is a nonlabor resource.
Material: Indicates that the resource has a unit of measure other than time. You can select a unit of measure for the material resource. -
resourceCode:
string
The unique identifier for the resource or role.
-
resourceId:
integer(int64)
The unique identifier for the resource or role.
-
resourceManagerId:
integer(int64)
The person designated as the manager for the resource.
-
resourceName:
string
The name of the resource or role.
-
resourceOwnershipType:
string
Allowed Values:
[ "WORKSPACE", "PROJECT" ]
The type of ownership for a resource. Possible values include Workspace and Project. -
resourceRoleAssignments:
array resourceRoleAssignments
The role assignment associated with the resource.
-
resourceRoleId:
integer(int64)
The identifier for the role assigned to the resource.
-
resourceStatus:
string
Allowed Values:
[ "ACTIVE", "INACTIVE" ]
Determines whether the resource or role is currently active.
Inactive resources might have left the organization, but are not deleted from the system because they might have been assigned an activity in the past or have incurred actual hours. -
resourceTitleName:
string
The job title for the resource.
For example, a resource may have the title Senior Engineer. -
resourceType:
string
Allowed Values:
[ "LABOR", "NONLABOR", "MATERIAL" ]
The resource type. Valid values are:
Labor: Indicates that the selected resource performs labor, measured in units of time.
Nonlabor: Indicates that the selected resource does not perform labor, measured in units of time. Equipment is a nonlabor resource.
Material: Indicates that the resource has a unit of measure other than time. You can select a unit of measure for the material resource. -
resourceWorkRates:
array resourceWorkRates
The work rates of the resource.
-
sourceId:
string
The unique identifier of resource data in an external source.Example:
coarse
-
stateCode:
string
A unique identifier for the state or province.
-
stateName:
string
The state, region, or province of a location.
-
unitOfMeasureCode:
string
The abbreviation for the unit of measure name.
-
unitOfMeasureId:
integer(int64)
The unit of measure used for the material resource.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date. -
user:
object ApiEntityExternallySourcedUser
-
workspaceCode:
string
The user-specified identifier of a workspace.
-
workspaceId:
integer(int64)
The name of the workspace where the resource or role was created.
-
workspaceName:
string
Name of a workspace.
Nested Schema : codeValuesResource
Type:
array
Unique Items Required:
true
An array of code values for this resource object.
Show Source
Nested Schema : Unit
Type:
object
Nested Schema : resourceRoleAssignments
Type:
array
The role assignment associated with the resource.
Show Source
Nested Schema : ApiEntityExternallySourcedUser
Type:
Show Source
object
-
companyId:
integer(int64)
The system-generated identifier of a user.
-
email:
string
The email address of a user.
-
firstName:
string
The first name of a user.
-
lastName:
string
The last name of a user.
-
link:
string(uri)
Read Only:
true
-
mobile:
string
The mobile phone number of a user.
-
phone:
string
The phone number of a user.
-
status:
string
The status of a user.
-
title:
string
The title of a user.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date. -
userId:
integer(int64)
The system-generated identifier of a user.
Nested Schema : ApiEntityCodeValueResource
Type:
Show Source
object
-
codeType:
object ApiEntityCodeType
-
codeValue:
object ApiEntityCodeValue
-
codeValueResourceId:
integer(int64)
The unique identifier of the resource assigned to the code value.
-
link:
string(uri)
Read Only:
true
-
resourceId:
integer(int64)
The unique identifier for the resource assigned to the code value.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date.
Nested Schema : ApiEntityCodeType
Type:
Show Source
object
-
assignments:
array assignments
Unique Items Required:
true
CodeType assignments. -
codeTypeCode:
string
Allowed Values:
[ "Length[1-40]" ]
This field displays the name of a code or value. -
codeTypeId:
integer(int64)
PRIMAVERA_DB_DOCUMENT:CO_CODE_TYPE,CODE_TYPE_ID
-
codeTypeName:
string
Allowed Values:
[ "Length[1-40]" ]
The name of a code or value. -
link:
string(uri)
Read Only:
true
-
pushDownType:
string
Allowed Values:
[ "MANUAL", "AUTOMATIC" ]
The push down type of the workspace code. -
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date. -
workspace:
integer(int64)
The ID of the owning workspace.
Nested Schema : ApiEntityCodeValue
Type:
Show Source
object
-
codeTypeId:
integer(int64)
The ID for the code type.
-
codeTypeName:
string
The name of a code or value.
-
codeValueCode:
string
Allowed Values:
[ "LENGTH[1-32]" ]
The unique identifier for the code value. -
codeValueId:
integer(int64)
The unique identifier for the code value.
-
codeValueName:
string
Allowed Values:
[ "LENGTH[1-100]" ]
The name of the code value. -
link:
string(uri)
Read Only:
true
-
parentCodeValue:
integer(int64)
The parent code value.
-
sequenceNumber:
integer(int32)
The number that specifies the position of the code value item within the code type list.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date.
Nested Schema : assignments
Type:
array
Unique Items Required:
true
CodeType assignments.
Show Source
Nested Schema : ApiEntityCodeEntityType
Type:
Show Source
object
-
codeType:
object ApiEntityCodeType
-
entityType:
string
Allowed Values:
[ "SCOPE_ITEM", "PROJECT", "SCOPE_ASSIGNMENT", "WBS", "WORK_PACKAGE", "ACTIVITY", "RESOURCE", "PBS", "CONTRACT", "RISK", "COMMITMENT", "REPORT", "TASKS", "STRATEGY", "PORTFOLIO", "FUND", "SUBMITTAL", "CHANGE_ORDER", "PAYMENT_APPLICATION", "CHANGE_EVENT", "CHANGES_ESTIMATES", "IDEA", "RFI", "CUSTOM_LOG_ITEM" ]
Indicates the type of object the code is associated to. -
link:
string(uri)
Read Only:
true
-
primaryKey:
integer(int64)
The unique identifier of a code type table.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date.
Nested Schema : ApiEntityResourceRoleAssignment
Type:
Show Source
object
-
link:
string(uri)
Read Only:
true
-
primaryFlag:
boolean
Default Value:
false
Determines whether this is the resource's main role. A role that does not have this option selected indicates that this is a secondary role for the resource. You can only assign one primary role per resource. A resource is not required to have a primary role. -
proficiency:
string
Allowed Values:
[ "ONE", "TWO", "THREE", "FOUR", "FIVE" ]
The skill level of the resource.
Skill levels are Master, Expert, Skilled, Proficient, and Inexperienced. -
resourceId:
integer(int64)
The unique identifier for the resource or role.
-
resourceRoleAssignmentId:
integer(int64)
The identifier for the resource.
-
roleCode:
string
The unique identifier for the resource or role.
-
roleId:
integer(int64)
The unique identifier for the resource or role.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date.
Nested Schema : ApiEntityResourceWorkRate
Type:
Show Source
object
-
effectiveEndDate:
string(date-time)
The date that corresponding units/time period and rates end for the resource or role.
-
effectiveStartDate:
string(date-time)
The date that the corresponding units/time period and rates go into effect for the resource or role.
-
link:
string(uri)
Read Only:
true
-
maxUnitsPerTime:
object Unit
-
resourceId:
integer(int64)
-
resourceWorkRateId:
integer(int64)
ID of a work rate.
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date. -
workspaceCode:
string
-
workspaceId:
integer(int64)
The name of the workspace where the resource or role was created.
Response
Supported Media Types
- application/json
207 Response
Successful Sync Operation.
Nested Schema : ApiEntityERPSyncApiResponse
Type:
Show Source
object
-
link:
string(uri)
Read Only:
true
-
message:
string
-
primaryKey:
integer(int64)
-
primaryKeyName:
string
-
primaryKeyValue:
integer(int64)
-
sourceId:
string
-
statusCode:
integer(int32)
-
uniqueName:
string
-
updateDate:
string(date-time)
Read Only:
true
The date on which the object was last updated. This parameter is not included in POST request responses. Use this parameter filter objects returned from GET requests by a particular modification date.
400 Response
Invalid Input.