AttachmentInfo (SOAP API)

IMPORTANT  The SOAP API entered a limited enhancement phase in Q4 2020. Access to version 1.6 will be deactivated.

The AttachmentInfo entity describes an Attachment in Autotask. Refer to the Overview section of this article to learn more about working with attachments in the Autotask SOAP API. For the REST API version of this entity, review AttachmentInfo (REST API)

IMPORTANT  Attachment behavior in the API has changed. To avoid service disruption, review our Changes to Attachment entities article for important information about this recent update.

BEFORE YOU BEGIN  This entity is unique. It does not use the standard create(), update() and delete() API calls. Instead, you must use one of the following three calls: GetAttachment(), CreateAttachment(), and DeleteAttachment(). Refer to Attachment API calls.

Entity details

You can also retrieve this information with the Web Services API call The getEntityInfo() SOAP API call.

Entity Name: AttachmentInfo
Can Create:  
Can Update:  
Can Query:
Can Delete:  
Can Have UDFs:  

Overview

Fields that cannot be queried

The following fields from this entity will return an error when queried.

  • FileSize

Conditions and requirements

General

  • Queries that specify IDs of entities with child data will return attachments associated with those children. For example, a query that specifies a TicketID value will return all attachments that are parented to that ticket, plus any attachments that are parented to child TicketNotes, TimeEntries, and Attachments.

    When adding an attachment to an entity's Data field, the attachment must be encoded as base64 binary data.

  • The API size limit for individual attachment files is 6 to 7 MB, with a maximum of 10,000,000 bytes within a five-minute period. If your integration exceeds these limits, an error is generated. Note that, if the integration exceeds the allowed volume per 5 minutes, API CreateAttachment() will stop accepting calls for 5 minutes.

NOTE   The API attachment file size limit is less than the 10 MB limit for individual attachment files when working through the Autotask UI.

  • File types are limited to the file types allowed in Autotask. For more information, see Add attachments in the Online Help. The maximum file size indicated in the Help does not apply to the API.
  • To add, download, and delete attachments with the API, you must use the three attachment specific API calls: GetAttachment(), CreateAttachment(), and DeleteAttachment().
  • All AttachmentInfo entity types except for Opportunity type must specify a TypeID and ParentID

Opportunity type attachments must specify a either a Type ID and ParentID, or TypeID and OpportunityID, or TypeID and both ParentID and OpportunityID.

OpportunityID value must be provided in order to query by OpportunityID.

  • To specify the associated entity, use Parent Type.  Use the The getFieldInfo() SOAP API call API call to determine ParentType picklist values.
  • To specify the type of attachment, use the Type field. Use the The getFieldInfo() SOAP API call API call to determine Type picklist values.
  • If your query supplies both an entityID and a parentID, the entityID will take precedence.

Contact impersonation validation rules for creating entities

  1. The API user security level has access to contact impersonation for attachments.
  2. Publish must always be ALL.
  3. Contacts can only create attachments for Tickets or Project/Task/Ticket Notes that they have created.
  4. The contact is active.
  5. The contact's account is active.

Special field attributes

Field Conditions and Requirements

ContentType

When you query an attachment entity's fields, you'll see the ContentType listed as FILE_LINK, FOLDER_LINK, URL, or FILE_ATTACHMENT. These values correspond to the content classifications shown within Autotask.

For more information about attachment types, refer to Add attachments.

Publish To specify whether the attachment should be available to all Autotask users, including Client Portal users, or internal users only, use the Publish field. Use the The getFieldInfo() SOAP API call API call to determine Publish picklist values.

Field definitions

Field Name Label Datatype Read Only Is Required Reference Name Picklist

AccountID

Account ID

integer

 

Account

 

AccountNoteID

Account Note ID

integer

 

AccountNote

 

AttachDate Attach Date datetime      
AttachedByContactID Attached By Contact long     Contact  
AttachedByResourceID Attached By Resource long   Resource  
ContentType Content Type string
(100)
     

ContractID

Contract ID

integer

 

Contract

 

ContractNoteID

Contract Note ID

integer

 

ContractNote

 

CreatorType

CreatorType

integer

 

 

ExpenseReportID

Expense Report ID

integer

 

ExpenseReport

 

FileSize File Size long      
FullPath File Name string (255)    
id Attachment ID long    
ImpersonatorCreatorResourceID Impersonator Creator Resource ID integer   Resource

 

InstalledProductID

Asset ID

integer

 

InstalledProduct

 

InstalledProductNoteID

Asset Note ID

integer

 

InstalledProductNote

 

OpportunityID Opportunity ID long   Opportunity  

ParentAttachmentID

Parent Attachment ID

integer

 

Multiple; varies based on parent.

 

ParentID Parent ID long    
ParentType Parent Type integer  

ProjectID

Project ID

integer

 

Project

 

ProjectNoteID

Project Note ID

integer

 

ProjectNote

 

Publish Publish integer  

ResourceID

Resource ID

integer

 

Resource

 

SalesOrderID

Sales Order ID

integer

 

SalesOrder

 

TaskID

Task ID

integer

 

Task

 

TaskNoteID

Task Note ID

integer

 

TaskNote

 

TicketID

Ticket ID

integer

 

Ticket

 

TicketNoteID

Ticket Note ID

integer

 

TicketNote

 

TimeEntryID

Time Entry ID

integer

 

TimeEntry

 

Title Title string (255)    
Type Type string (30)