Create an asset contact
post
/crmRestApi/resources/11.13.18.05/assets/{AssetId}/child/assetContacts
Request
Path Parameters
-
AssetId(required): integer(int64)
The unique identifier of the asset.
Header Parameters
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
-
Upsert-Mode:
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
- application/json
Root Schema : schema
Type:
Show Source
object
-
AssetContactId: integer
(int64)
Title:
Asset Contact ID
The unique identifier of the primary contact associated with the asset. -
AssetId: integer
(int64)
Title:
Asset ID
The unique identifier of the Asset. -
ContactFunctionCode: string
Title:
Function
Maximum Length:30
The code indicating the function of a contact. A list of valid values is defined in the lookup FunctionTypesLookupPVO. -
ContactPartyId: integer
(int64)
Title:
Contact Party ID
The unique identifier of the party associated with the primary contact. -
ContactSourceSystem: string
Title:
Contact Source System
The system from where the contact associated with the asset is sourced. -
ContactSourceSystemReference: string
Title:
Contact Source System Reference
The reference system from where the contact associated with the asset is sourced. -
PrimaryFlag: boolean
Title:
Primary
Indicates whether the asset contact is the primary contact. If the value is true, then the asset contact is a primary contact.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
Root Schema : assets-assetContacts-item-response
Type:
Show Source
object
-
AssetContactId: integer
(int64)
Title:
Asset Contact ID
The unique identifier of the primary contact associated with the asset. -
AssetId: integer
(int64)
Title:
Asset ID
The unique identifier of the Asset. -
AssetNumber: string
Title:
Asset Number
Read Only:true
Maximum Length:100
The number that identifies the asset. -
ContactFunctionCode: string
Title:
Function
Maximum Length:30
The code indicating the function of a contact. A list of valid values is defined in the lookup FunctionTypesLookupPVO. -
ContactPartyId: integer
(int64)
Title:
Contact Party ID
The unique identifier of the party associated with the primary contact. -
ContactPartyNumber: string
Title:
Contact Party Number
Read Only:true
Maximum Length:30
The unique identifier of the contact associated with the asset. -
ContactSourceSystem: string
Title:
Contact Source System
The system from where the contact associated with the asset is sourced. -
ContactSourceSystemReference: string
Title:
Contact Source System Reference
The reference system from where the contact associated with the asset is sourced. -
CreatedBy: string
Title:
Created By
Read Only:true
Maximum Length:64
The user who created or imported the record. -
CreationDate: string
(date-time)
Title:
Creation Date
Read Only:true
The date and time when the record was created. -
EmailAddress: string
Title:
Email
Read Only:true
Maximum Length:320
The email address of the primary contact associated with the asset. -
FormattedPhoneNumber: string
Title:
Phone
Read Only:true
The formatted phone number of the primary contact associated with the asset. -
JobTitle: string
Title:
Job Title
Read Only:true
Maximum Length:100
The title of the job of the asset contact. -
LastUpdateDate: string
(date-time)
Title:
Last Updated Date
Read Only:true
The date and time when the record was last updated. -
LastUpdatedBy: string
Title:
Last Updated By
Read Only:true
Maximum Length:64
The user who last updated the record. -
LastUpdateLogin: string
Title:
Last Update Login
Read Only:true
Maximum Length:32
The login details of the user who last updated the record in the interface table or submitted the import process. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
PartyId: integer
(int64)
Title:
Party ID
Read Only:true
The unique identifier of the account, or contact associated with the asset. -
PartyName: string
Title:
Name
Read Only:true
Maximum Length:360
The name of the party associated with the primary contact. -
PersonProfileId: integer
(int64)
Title:
Contact Party ID
Read Only:true
The unique identifier of the contacts profile. -
PrimaryFlag: boolean
Title:
Primary
Indicates whether the asset contact is the primary contact. If the value is true, then the asset contact is a primary contact.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Links
- FunctionTypesLookupPVO
-
Parameters:
- finder:
LookupTypeActiveEnabledOrBindCodeFinder%3BBindLookupCode%3D{ContactFunctionCode}%2CBindLookupType%3DORA_ZCM_CONTACT_FUNCTION
The lookups resource is used to view standard lookup codes. - finder:
Examples
The following example shows how to create an asset contact by submitting a POST request on the REST resource using cURL.
cURL Command
curl -u <username:password> \ -X POST -d
@example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/assets/785805215/child/assetContacts
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "ContactPartyId": 2448 }
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "AssetContactId": 300100168153850, "AssetId": 785805215, "ContactPartyId": 2448, "CreatedBy": "SALES_ADMIN", "CreationDate": "2018-09-25T09:55:29+00:00", "LastUpdateDate": "2018-09-25T09:55:29.141+00:00", "LastUpdateLogin": "76AF2964E73B33C2E053773AF80A77BF", "LastUpdatedBy": "SALES_ADMIN", "ContactFunctionCode": null, "PartyName": "Lisa Smith", "EmailAddress": "sendmail-test-discard@oracle.com", "FormattedPhoneNumber": "+1 (800) 555-8355", "PartyId": 2448, "PrimaryFlag": false, "JobTitle": null, "PersonProfileId": 274466, "ContactPartyNumber": "CONTACT-1010", "links": [ ... ] }