Replace an attachment
patch
/crmRestApi/resources/11.13.18.05/accounts/{PartyNumber}/child/Attachment/{AttachmentUniqID}
Request
Path Parameters
-
AttachmentUniqID(required): string
This is the hash key of the attributes which make up the composite key for the Account Attachments resource and used to uniquely identify an instance of Account Attachments. The client should not generate the hash key value. Instead, the client should query on the Account Attachments collection resource in order to navigate to a specific instance of Account Attachments to get the hash key.
-
PartyNumber(required): string
The unique alternate identifier for the account party. You can update the value if the profile option HZ_GENERATE_PARTY_NUMBER is set to True. The default value is a concatenation of the value specified in the profile option ZCA_PUID_PREFIX and a unique system generated sequence number. Inactive records can't be updated.
Header Parameters
-
Metadata-Context: string
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: string
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
- application/json
Root Schema : schema
Type:
Show Source
object-
CategoryName: string
Title:
CategoryMaximum Length:30The name of the category of the attachment. - ContentRepositoryFileShared: boolean
-
DatatypeCode: string
Title:
TypeMaximum Length:30Default Value:FILEThe code indicating the data type. A list of valid values is defined in the lookup WEB_PAGE. -
Description: string
Title:
DescriptionMaximum Length:255The description of the attachment. -
DmDocumentId: string
Maximum Length:
255The unique identifier of the attached document. -
DmFolderPath: string
Title:
Dm Folder PathMaximum Length:1000The folder path of the attachment. -
DmVersionNumber: string
Maximum Length:
255The current version number of the attachment. -
DownloadInfo: string
Title:
DownloadInfoJSON object represented as a string containing information used to programmatically retrieve a file attachment. -
ErrorStatusCode: string
Title:
Error Status CodeThe code indicating the type of error, if any, for the attachment. -
ErrorStatusMessage: string
Title:
Error Status MessageThe error message, if any, for the attachment. -
ExpirationDate: string
(date-time)
Title:
Expiration DateThe date when the contents in the attachment expire. -
FileContents: string
(byte)
Title:
File ContentsThe contents of the attachment. -
FileName: string
Title:
File NameMaximum Length:2048The file name of the attachment. -
FileUrl: string
Title:
File UrlThe URL of the attached file. -
PostProcessingAction: string
Title:
PostProcessingActionThe name of the action that can be performed after an attachment is uploaded. -
Title: string
Title:
TitleThe title of the attachment. -
UploadedFileContentType: string
Title:
Uploaded File Content TypeThe content type of the attachment. -
UploadedFileLength: integer
Title:
File SizeThe length of the attachment file. -
UploadedFileName: string
Title:
Uploaded File NameThe name of the attachment file. -
UploadedText: string
Title:
Uploaded TextThe text of the attachment. -
Uri: string
Title:
UriMaximum Length:4000The URI of the attachment. -
Url: string
Title:
UrlMaximum Length:4000The URL of the attachment.
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 : accounts-Attachment-item-response
Type:
Show Source
object-
AsyncTrackerId: string
Title:
Asynchronous Upload Tracker IdThe unique identifier used for tracking the uploaded files. -
AttachedDocumentId: integer
(int64)
Title:
Attached Document IdThe unique identifier of the attached document. -
CategoryName: string
Title:
CategoryMaximum Length:30The name of the category of the attachment. - ContentRepositoryFileShared: boolean
-
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:255The user who created the attachment. -
CreatedByUserName: string
Title:
Created By User NameRead Only:trueThe user name of the person who uploaded the attachment. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date when the attachment record was created. -
DatatypeCode: string
Title:
TypeMaximum Length:30Default Value:FILEThe code indicating the data type. A list of valid values is defined in the lookup WEB_PAGE. -
Description: string
Title:
DescriptionMaximum Length:255The description of the attachment. -
DmDocumentId: string
Maximum Length:
255The unique identifier of the attached document. -
DmFolderPath: string
Title:
Dm Folder PathMaximum Length:1000The folder path of the attachment. -
DmVersionNumber: string
Maximum Length:
255The current version number of the attachment. -
DownloadInfo: string
Title:
DownloadInfoJSON object represented as a string containing information used to programmatically retrieve a file attachment. -
ErrorStatusCode: string
Title:
Error Status CodeThe code indicating the type of error, if any, for the attachment. -
ErrorStatusMessage: string
Title:
Error Status MessageThe error message, if any, for the attachment. -
ExpirationDate: string
(date-time)
Title:
Expiration DateThe date when the contents in the attachment expire. -
FileContents: string
(byte)
Title:
File ContentsThe contents of the attachment. -
FileName: string
Title:
File NameMaximum Length:2048The file name of the attachment. -
FileUrl: string
Title:
File UrlThe URL of the attached file. -
FileWebImage: string
(byte)
Title:
File Web ImageRead Only:trueThe base64 encoded image of the file displayed in .png format if the source is a convertible image. -
LastUpdateDate: string
(date-time)
Title:
Last Update DateRead Only:trueThe date when the record was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:255The user who last updated the record. -
LastUpdatedByUserName: string
Title:
Last Updated By UserRead Only:trueThe user name of the person who last updated the attachment. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
PostProcessingAction: string
Title:
PostProcessingActionThe name of the action that can be performed after an attachment is uploaded. -
Title: string
Title:
TitleThe title of the attachment. -
UploadedFileContentType: string
Title:
Uploaded File Content TypeThe content type of the attachment. -
UploadedFileLength: integer
Title:
File SizeThe length of the attachment file. -
UploadedFileName: string
Title:
Uploaded File NameThe name of the attachment file. -
UploadedText: string
Title:
Uploaded TextThe text of the attachment. -
Uri: string
Title:
UriMaximum Length:4000The URI of the attachment. -
Url: string
Title:
UrlMaximum Length:4000The URL of the attachment. -
UserName: string
Title:
User NameRead Only:trueMaximum Length:255The login associated with the attachment.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed 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.
Examples
The following example shows how to replace an attachment by submitting a patch request on the REST resource using cURL.
Example of Request Body
The following shows an example of the request body in JSON format.
{
"DatatypeCode" : "TEXT",
"FileName" : "SBS_Updated.txt",
"UploadedText": "Sample Text 05/12 test SBS",
"CategoryName": "MISC"
}
Example of Response Body
The following shows an example of the response body in JSON format.
{
"LastUpdateDate": "2016-08-22T02:11:43-07:00",
"LastUpdatedBy": "SALES_ADMIN",
"DatatypeCode": "TEXT",
"FileName": "SBS_Updated.txt",
"DmFolderPath": null,
"Url": null,
"CategoryName": "MISC",
"UserName": "Miscellaneous",
"Uri": null,
"FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a34944?XFND_SCHEME_ID=1=B25B6B7ABCD03DA19B9E59CDB464BCEEB86A3D0D=-8618586562321053085=1471857815795=0-Uwm4K7UViQp4DkFsIMPbIuPyypH6l25y2RnjFpSWlVVI5SsD-Dn87qvtAe6yr1C77s3gkOPQmRGXcYBNGW6tvd~gbxxI6Dm9pSthr4oTOV2PJesp5yYh3WY16MWa-UlgQ2i7~nTLWz0gZuBv6CMl275I9PJyTbhpZOmGemnYiJhpjhDxCj2N-KlSMQN-qDr9-3Nrp5SghW0yJk028tODi2IDz7RB15bwVBh-ZdZt-s-u4AVKmNA0z1IPXNo-g64dB9g-EQX4~ZX-j6iPdqm~6Uy0Vc~1EDnaH3S9R5ZWykhbo4d76PkWx6~AdUBLXSogQCYG5679ctFpljRBYx2w__=34944",
"UploadedText": null,
"UploadedFileContentType": "text/plain",
"UploadedFileLength": 29,
"UploadedFileName": "SALES_ADMIN-1471857215000.txt",
"ContentRepositoryFileShared": "false",
"Title": "Sample Text 05/12 test SBS",
"Description": "",
"ErrorStatusCode": null,
"ErrorStatusMessage": null,
"CreatedBy": "SALES_ADMIN",
"CreationDate": "2016-08-22T02:11:43-07:00",
"ExpirationDate": null,
"links": [
...
]
}