Attachments

Minimum access level: My Money

Attributes

Attribute Description Kind
url The unique identifier for the attachment URI
content_src URL to the original full-size file URI
content_src_medium URL to a medium-size thumbnail (if a thumbnail exists) URI
content_src_small URL to a small-size thumbnail (if a thumbnail exists) URI
expires_at When the content_src URLs expire. New URLs should be fetched from the API once this timestamp passes. Timestamp
content_type MIME-type String
file_name Original name of the file String
file_size Size of original file in bytes Integer
description Free-text description String

Show a single attachment

GET https://api.freeagent.com/v2/attachments/:id

Response

Status: 200 OK
{  "attachment":
     {
        "url":"https://api.freeagent.com/v2/attachments/3",
        "content_src":"https://s3.amazonaws.com/freeagent-dev/attachments/1/original.png?AWSAccessKeyId=1K3MW21E6T8KWBY84B02&Expires=1314281186&Signature=GFAKDo%2Bi%2FsUMTYEgg6ZWGysB4k4%3D",
        "content_type":"image/png",
        "file_name":"barcode.png",
        "file_size":7673
      }
}
Show as XML
<?xml version="1.0" encoding="UTF-8"?>
<freeagent>
    <attachment>
      <url>https://api.freeagent.com/v2/attachments/3</url>
      <content-src>https://s3.amazonaws.com/freeagent-dev/attachments/1/original.png?AWSAccessKeyId=1K3MW21E6T8KWBY84B02&amp;Expires=1314281298&amp;Signature=jhGeAgqdnDwyFKHJoPI6AKU%2Fb2s%3D</content-src>
      <content-type>image/png</content-type>
      <file-name>barcode.png</file-name>
      <file-size type="integer">7673</file-size>
    </attachment>
  </expense>
</freeagent>
Show as JSON

Delete a single attachment

DELETE https://api.freeagent.com/v2/attachments/:id

Response

Status: 200 OK