Attachment

An Attachment is either:

Review the Usage Guidelines for the Attachment object.

XML

SOAP

REST

Database table

Object

Attachment

oaAttachment

Attachment

attachment

Supported Commands

Add, Read, Modify, Delete

add(), read(), modify(), upsert(), delete()

To work with attachments, use the endpoints and methods specific to the object the attachments are associated with. See REST API Endpoint Reference.

The Attachment object has the following standard properties:

Note:

Attachment object properties may also include custom fields. The object type supports the custom equal to read method and the enable_custom read attribute.

XML / SOAP

REST

Database

Description

attachmentCategoryId

attachment_category_id

The internal ID of the attachment category.

attachmentid

attachmentid

If non-zero, the attachment record associated with this attachment.

base64_data

base64_data

Base 64 encoded binary data of the attachment file.

created

created

created

[Read-only] The date and time the attachment was created.

See Date Fields

file_name

fileName

file_name

The filename of the attached file uploaded by the user.

fileType

[Read-only] The file type. This is used for tracking purposes.

hash_name

hash_name

[Read-only] The relative path and filename of the attached file stored on OpenAir servers.

hasThumbnail

[Read-only] A 1/0 field indicating if a thumbnail image is available for the attachment. Returned only if the Attachment Thumbnail and Attachment Viewer feature is enabled for the OpenAir account.

id

id

id

[Read-only] The unique internal identifier of the attachment. Assigned by OpenAir

isExcludedFromAlert

exclude_alert

A 1/0 field indicating if the attachment is excluded from the alert system.

is_a_folder

isFolder

is_a_folder

A 1/0 field indicating if other attachment records have this attachment record as a parent.

isLocked

is_locked

A 1/0 field indicating if the attachment is locked for editing.

isViewable

A 1/0 field indicating if the attachment is viewable using the Attachment Viewer feature. Returned only if the Attachment Thumbnail and Attachment Viewer feature is enabled for the OpenAir account.

locked_by

lockedBy

locked_by

[Read-only] The internal ID of the employee who uploaded the file. The value is 0 (zero) if unlocked.

name

name

name

The display name of the attachment.

notes

notes

notes

Notes about the attachment. This attribute is used for keyword search.

owner_type

association

The type of record this attachment is attached to. For example: user, envelope, ticket, timesheet, agreement, or customerpo.

ownerid

record

The internal ID of the record linking to this attachment.

parentid

parentid

The internal ID of the immediate ancestor attachment. If 0 or Null, the attachment is a top-level document or folder.

size

size

size

[Read-only] The file size in bytes.

updated

updated

updated

[Read-only] Time the record was last modified.

See Date Fields

uploadedBy

uploaded_by

[Read-only] The internal ID of the employee who uploaded the file.

workspaceid

workspaceId

workspaceid

The internal ID of the associated workspace.

Usage Guidelines

Review the following guidelines:

  • Some object properties are required depending on the is_a_folder property value:

    • If is_a_folder is set to 1 then following object properties are required:

      • name

      • workspaceid

    • Otherwise, the following object properties are required:

      • base64_data

      • file_name

      • owner_type

      • ownerid

  • It is not possible to add, modify, or delete an attachment file if the object that this file is attached to (object referenced by owner_type and ownerid) cannot be edited. For expense or timesheet attachments, for example, the associated Envelope or Timesheet must have a status equal to O (Open).

  • When adding an attachment file, the size of the attachment file (calculated from base64_data) must be smaller than the storage space available in your company's OpenAir account.

  • When modifying an Attachment, only the following properties can be updated:

    • attachmentid

    • name

    • notes

    • parentid

  • If the Attachment Thumbnail and Attachment Viewer feature is enabled for your OpenAir account, a thumbnail is generated automatically when you add an attachment of a supported format. The file_name property value must include a supported file extension. For more information about the Attachment Thumbnail feature, including supported file format and filename extensions, see Attachment Viewer and Attachment Thumbnail.