Delete Multiple Object Record Attachments
Delete object record attachments in bulk with a JSON or CSV input file. You can only delete the latest version of an attachment.
- The maximum input file size is 1GB.
- The values in the input must be UTF-8 encoded.
- CSVs must follow the standard format
. - The maximum batch size is 500.
DELETE
/api/{version}/vobjects/{object_name}/attachments/batchHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json or text/csv |
Accept | application/json (default) or application/xml |
Body Parameters
Section link for Body ParametersPrepare a CSV or JSON input file.
| Name | Description |
|---|---|
idconditional | The id of the object record to which to add the attachment. Not required if providing a unique field identifier (idParam) such as external_id__v. |
external_id__vconditional | Identify attachments by their external id. You must also add the idParam=external_id__v query parameter. |
attachment_idrequired | The id of the attachment being updated. |
Query Parameters
Section link for Query ParametersRequest
Section link for Requestcurl -X DELETE -H "Authorization: {SESSION_ID}" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "V15000000000305",
"attachment_id": "141"
}
]'
https://myvault.veevavault.com/api/v23.1/vobjects/veterinary_patient__c/attachments/batchResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"id": 141
}
]
}