Skip to content

Determine if Attachments are Enabled on an Object

GET/api/{version}/metadata/vobjects/{object_name}
NameDescription
Acceptapplication/json (default) or application/xml
NameDescription
{object_name}The object name__v field value (product__v, country__v, custom_object__c, etc.).
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.1/metadata/vobjects/site__v
{
    "responseStatus": "SUCCESS",
    "object": {
        "created_date": "2014-02-03T20:12:29.000Z",
        "created_by": 1,
        "allow_attachments": true,
        "auditable": true,
        "modified_date": "2015-01-06T22:34:15.000Z",
        "status": [
            "active__v"
        ],
        "urls": {
            "field": "/api/v19.1/metadata/vobjects/site__v/fields/{NAME}",
            "record": "/api/v19.1/vobjects/site__v/{id}",
            "attachments": "/api/v19.1/vobjects/site__v/{id}/attachments",
            "list": "/api/v19.1/vobjects/site__v",
            "metadata": "/api/v19.1/metadata/vobjects/site__v"
        },
        "label_plural": "Study Sites",
        "role_overrides": false,
        "label": "Study Site",
        "in_menu": true,
        "help_content": null,
        "source": "standard",
        "order": null,
        "modified_by": 46916,
        "description": null,
        "name": "site__v"
    }
}

Shown above, "allow_attachments" is set to true for this object and "attachments" is included in the list of urls, indicating that attachments are enabled on the site__v object. This means that any of the object records can have attachments.