Bill Attachments

The Attachment Object

A Rutter Bill Attachment represents a file that can be attached to a bill. In general we provide attachments data only for attachments that have been created through our POST endpoint. However, there are some platform specific differences.

Platform Differences

Xero:

  • We provide historical attachments that were created outside of our API.

Properties

idstringRequired

The Rutter ID of the attachment. This can be the same as the Platform ID. This ID is not guaranteed to be unique across all attachment objects for a connection.

platform_idstringRequired

The platform specific ID of the attachment.

attached_to_idstringnullableRequired

The Rutter ID of the entity linked to the attachment.

file_namestringRequired

The file name of the attachment.

file_urlstringRequired

The Rutter generated URL containing a downloadable version of the attachment.

attached_to_typestringnullableRequired

The type of entity linked to the attachment.

created_atstringRequired

The ISO 8601 timestamp that the attachment was created.

Note: The following platforms dont't support this field, and may return an empty string:

  • Xero
Endpoints
GET
/accounting/bills/attachments
GET
/accounting/bills/attachments/:id
GET
/accounting/bills/:id/attachments
GET
/accounting/bills/:id/attachments/:attachmentId/file
POST
/accounting/bills/:id/attachments

List Bill Attachments

GEThttps://production.rutterapi.com/versioned/accounting/bills/attachments

Request Parameters

    access_tokenstringqueryRequired

    The access token of the connection.

    attached_to_idstringquery

    The ID of the entity that the attachment is attached to.

    cursorstringquery

    The cursor to use for pagination. This value is passed in from next_cursor field in a previous request.

    expandenumquery

    Used to request inclusion of optional objects.

    Can beplatform_data.
    force_fetchenumquery

    Force a response even if the underlying connection hasn't finished the initial sync.

    One oftrue or false.
    limitintegerquery

    The limit on the number of entities returned.

    updated_at_maxintegerquery

    Unix Timestamp in milliseconds representing the maximum updated_at datetime to fetch entities from.

    updated_at_minintegerquery

    Unix Timestamp in milliseconds representing the minimum updated_at datetime to fetch entities from.

Response Body

    attachmentsarrayRequired
    Show attachments attributes
    next_cursorstringnullableRequired
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
  • Xero
    Xero
  • Sage Intacct
    Sage Intacct
Example Response Body
JSON
1
{
2
"attachments": [
3
{
4
"id": "00000000-0000-0000-0000-000000000000",
5
"platform_id": "12345678",
6
"attached_to_id": "00000000-0000-0000-0000-000000000000",
7
"file_name": "receipt.jpg",
8
"file_url": "https://rutteraccountingattachments.s3.amazonaws.com/00000000-0000-0000-0000-000000000000-receipt.jpg",
9
"attached_to_type": "EXPENSE",
10
"created_at": "2023-01-02T02:34:56.000Z"
11
}
12
],
13
"next_cursor": "MTY3NDgzMTk0Ml82MDY4ZDI0ZC02NGRmLTRmN2EtYTM0Ny0zN2ZmNjY5MGVmMjU="
14
}

Fetch a Bill Attachment metadata

GEThttps://production.rutterapi.com/versioned/accounting/bills/attachments/:id

Request Parameters

    idstringpathRequired

    The Rutter generated unique ID of the attachment.

    access_tokenstringqueryRequired

    The access token of the connection.

    force_fetchenumquery

    Force a response even if the underlying connection hasn't finished the initial sync.

    One oftrue or false.

Response Body

    attachmentobjectRequired
    Show attachment attributes
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
  • Xero
    Xero
  • Sage Intacct
    Sage Intacct

List Attachments for Bill

GEThttps://production.rutterapi.com/versioned/accounting/bills/:id/attachments

Request Parameters

    idstringpathRequired

    The Rutter generated unique ID of the Rutter Entity.

    access_tokenstringqueryRequired

    The access token of the connection.

    force_fetchenumquery

    Force a response even if the underlying connection hasn't finished the initial sync.

    One oftrue or false.

Response Body

    attachmentsarrayRequired
    Show attachments attributes
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
  • Xero
    Xero
  • Zoho Books
    Zoho Books
Example Response Body
JSON
1
{
2
"attachments": [
3
{
4
"id": "00000000-0000-0000-0000-000000000000",
5
"platform_id": "12345678",
6
"attached_to_id": "00000000-0000-0000-0000-000000000000",
7
"file_name": "attachment.pdf",
8
"file_url": "/accounting/bills/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000/file",
9
"attached_to_type": "BILL",
10
"created_at": "2023-01-02T02:34:56.000Z"
11
}
12
]
13
}

Download a Bill Attachment

GEThttps://production.rutterapi.com/versioned/accounting/bills/:id/attachments/:attachmentId/file

Request Parameters

    attachmentIdstringpathRequired

    The platform unique ID of the attachment.

    idstringpathRequired

    The Rutter generated unique ID of the object.

    access_tokenstringqueryRequired

    The access token of the connection.

    force_fetchenumquery

    Force a response even if the underlying connection hasn't finished the initial sync.

    One oftrue or false.

Response Body

    Support by integration
    • QuickBooks
      QuickBooks
    • Netsuite
      Netsuite
    • Xero
      Xero
    • Zoho Books
      Zoho Books

    Create a Bill Attachment

    POSThttps://production.rutterapi.com/versioned/accounting/bills/:id/attachments

    For this endpoint, the request body is not application/json, it is multipart/form-data.

    Request Parameters

      idstringpathRequired

      The Rutter generated unique ID of the underlying entity type.

      access_tokenstringqueryRequired

      The access token of the connection.

    Request Body

      filestringRequired

      The file content (PDF, JPG, CSV, TXT, etc).

      file_namestringRequired

      The file name of the attachment.

    Response Body

      Any of:

      attachmentobjectRequired
      Show attachment attributes
      async_responseobject
      Show async_response attributes
      errorsarray
      Show errors attributes
    Support by integration
    • QuickBooks
      QuickBooks
    • Netsuite
      Netsuite
    • Xero
      Xero
    • Sage Intacct
      Sage Intacct
    Example Request Body
    JSON
    1
    {
    2
    "file": "multipart/form-data",
    3
    "file_name": "T-shirt Receipt"
    4
    }
    Example Response Body
    JSON
    1
    {
    2
    "attachment": {
    3
    "id": "00000000-0000-0000-0000-000000000000",
    4
    "platform_id": "12345678",
    5
    "attached_to_id": "00000000-0000-0000-0000-000000000000",
    6
    "file_name": "receipt.jpg",
    7
    "file_url": "https://rutteraccountingattachments.s3.amazonaws.com/00000000-0000-0000-0000-000000000000-receipt.jpg",
    8
    "attached_to_type": "EXPENSE",
    9
    "created_at": "2023-01-02T02:34:56.000Z"
    10
    }
    11
    }

    Have questions?

    Contact support for personalized guidance.

    Contact support