Attachment

An object representing an attachment.

Supported API Calls: List | Get | Add | Update | Delete

Object Properties

object.

Property

Type

Description

Id

integer

A unique ID for the attachment object. When adding a new attachment the value must be 0.

Name

string (100)

Name of the attachment.

Url

string (100)

A Url if the attachment is represented as a URL.

Description

string (100)

Text for the attachment's description field.

ContentLength

integer

Stores the attachment's size in bytes.

ContentType

string (100)

Stores the attachment's content type (application/pdf, image/gif, etc.)

Extension

string (100)

Stores the attachment's 3 or 4 letter extension: jpg, doc, txt, etc.

ParentId

integer

The ID of the parent object the attachment is associated with. This value is optional.

ParentObject

string (100)

ParentObject identifies what kind of object the attachment object is a child of. Values are person, account (if it's an organization), contact, opportunity, project, case.

OwnerId

integer

The ID of the internal user who owns the attachment. This value is optional.

CreationDate

DateTime

Date the item was created.

Name

string (100)

Name of the file.

List

Description

Returns a lists of all Attachments for the specified object. Pass the parent object's ID and its type (person, case, account, etc.).

URL

https://{company}.bluecamroo.com/api/Attachment/list?parentId={parentId}&parentObject={parentObject}

HTTP Method

POST

Parameters

None

Data Return

Returns a list of existing Attachment objects for the parent object specified by parentid and parentobject. List is returned in the requested format (e.g., JSON or XML)

HTTP Return Status Code

200: Ok

401: Not authorized (you need to log in)

Get

Description

Returns the details of a specified Attachment.

URL

https://{company}.bluecamroo.com/api/Attachment/get/{id}

HTTP Method

GET

Parameters

None

Data Return

Returns the Attachment object in the requested format (e.g., JSON or XML)

HTTP Return Status Code

200: Ok

400: Bad Request (One or more input data items is not valid, for example a mandatory field is blank)

401: Not authorized (you need to log in)

403: Forbidden (you don't have permission to this resource)

AddAttachment

Description

Adds an Attachment object. Note the adding metho is done differently from other objects. See sample code.

URL

https://{company}.bluecamroo.com/api/Attachment/AddAttachment

HTTP Method

POST

Parameters

An Attachment object

Data Return

Returns the Attachment object in the requested format (e.g., JSON or XML)

HTTP Return Status Code

201: Created

401: Not authorized (you need to log in)

403: Forbidden (you don't have permission to this resource)

Example

An attachment is submitted using multipart/form-data:



// other properties

Update

Description

Updates an Attachment object.

URL

https://{company}.bluecamroo.com/api/Attachment/update

HTTP Method

PUT

Parameters

An Attachment object

Data Return

Returns the Attachment object in the requested format (e.g., JSON or XML)

HTTP Return Status Code

200: Ok

400: Bad Request (One or more input data items is not valid, for example a mandatory field is blank)

401: Not authorized (you need to log in)

403: Forbidden (you don't have permission to this resource)

Delete

Description

Deletes the specified Attachment.

URL

https://{company}.bluecamroo.com/api/Attachment/delete/{id}

HTTP Method

DELETE

Parameters

None

Data Return

None

HTTP Return Status Code

200: Ok

400: Bad Request (One or more input data items is not valid, for example a mandatory field is blank)

401: Not authorized (you need to log in)

403: Forbidden (you don't have permission to this resource)