Replace a contact's picture

patch

/crmRestApi/resources/11.13.18.05/contacts/{PartyNumber}/child/PictureAttachment/{PictureAttachmentUniqID}

Request

Path Parameters
  • The alternate key identifier for the contact party. The profile option HZ_GENERATE_PARTY_NUMBER controls whether the attribute value can be system generated or user-provided during create. Review and update the value for this attribute using the Setup and Maintenance work area, Manage Trading Community Common Profile Options task. Inactive records can't be updated.
  • This is the hash key of the attributes which make up the composite key for the Attachments resource and used to uniquely identify an instance of Attachments. The client should not generate the hash key value. Instead, the client should query on the Attachments collection resource in order to navigate to a specific instance of Attachments to get the hash key.
Header Parameters
  • 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.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
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 : contacts-PictureAttachment-item-response
Type: object
Show Source
Back to Top

Examples

The following example shows how to Replace a contact's picture by submitting a patch request on the REST resource using cURL.

cURL Command

curl -u <username:password> \ -X PATCH https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/contacts/CDRM_9375/child/PictureAttachment/00020000000EACED00057708000110F080FDB40F0000000EACED00057708000110F080FDB40E

Example of Request Body

The following shows an example of the request body in JSON format.

{
    "FileName" : "Profile_Updated.jpeg"
}

Example of Response Body

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

{
  "LastUpdateDate": "2016-11-02T05:36:34-07:00",
  "LastUpdatedBy": "SALES_ADMIN",
  "DatatypeCode": "FILE",
  "FileName": "Profile_Updated.jpeg",
  "DmFolderPath": null,
  "Url": null,
  "CategoryName": "HZ_PARTY_IMAGES",
  "UserName": "Party Images",
  "Uri": null,
  "FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a95942?XFND_SCHEME_ID=1&XFND_CERT_FP=3A968D6BBFB75202A7A690DDB3BD073A9D79564C&XFND_RANDOM=7250836942280977150&XFND_EXPIRES=1478091085840&XFND_SIGNATURE=NUqrOwxqJitDOZtqCJKGo0dNQWYo8qDSICeygtp84N5AbxnC0teOLO3S2MRFL56gbicx-GNlhyBqUk0cTzAvFMJ3KsdabHsIx-1vHBZbtUPWhhKEohPUekyTO9dPoLAfZD0jidxbnlFKcvXin21kGd4Q9QIQMfRYNqweKnGbXbVvyNZkC8IRScuYMdogM9~R5QlJloqeQBs2NXnPUTmH~CG6j3ZG3GPbYBqwauFjy5iGEj35r3KVNYI2USMXo3Ob6Rc3RjVgFPHIk1yyCpmmuka7sQ8muAWQa4MgQAQK2RpbnRcFQqJCeYiSyK99wfcwPvIAGJE~0N7Fz2QClLkSDw__&Id=95942&download",
  "UploadedText": null,
  "UploadedFileContentType": "image/jpeg",
  "UploadedFileLength": 10956,
  "UploadedFileName": null,
  "ContentRepositoryFileShared": "false",
  "Title": "Profile.jpeg",
  "Description": "",
  "ErrorStatusCode": null,
  "ErrorStatusMessage": null,
  "CreatedBy": "SALES_ADMIN",
  "CreationDate": "2016-11-02T05:36:34-07:00",
  "ExpirationDate": null,
  "links": [
    {
      "rel": "self",
      "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/contacts/CDRM_9375/child/PictureAttachment/00020000000EACED00057708000110F080FDB40F0000000EACED00057708000110F080FDB40E",
      "name": "PictureAttachment",
      "kind": "item"
    },
    {
      "rel": "canonical",
      "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/contacts/CDRM_9375/child/PictureAttachment/00020000000EACED00057708000110F080FDB40F0000000EACED00057708000110F080FDB40E",
      "name": "PictureAttachment",
      "kind": "item"
    },
    {
      "rel": "parent",
      "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/contacts/CDRM_9375",
      "name": "contacts",
      "kind": "item"
    },
    {
      "rel": "enclosure",
      "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/contacts/CDRM_9375/child/PictureAttachment/00020000000EACED00057708000110F080FDB40F0000000EACED00057708000110F080FDB40E/enclosure/FileContents",
      "name": "FileContents",
      "kind": "other"
    }
  ]
}
Back to Top