Expenses

The Expense Object

A Rutter Expense represents a purchase made by a business entity via prepaid card, credit card, bank, or other asset. Every expense is linked to a credit Account and a Vendor.

The expense line item contains information regarding the items purchased and accounts affected in the expense. Every expense line item is linked to a debit Account and optionally linked tracking categories like Classes, Locations, and Departments.

Files can be attached to Rutter Expenses in the form of Rutter Attachments.

Properties

idstring

The Rutter generated unique ID of the expense.

platform_idstring

The platform specific ID of the expense.

account_idstringnullable

The Rutter ID of the Account linked to the expense. Represents the account being credited.

subsidiary_idstringnullable

The Rutter ID of the Subsidiary linked to the expense. Supported for NetSuite.

vendor_idstringnullable

The Rutter ID of the Vendor linked to the expense.

transaction_datestring

The ISO 8601 timestamp that the expense was created.

currency_codeenum

The ISO 4217 currency code of the expense.

One ofAEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBOVBRLBSDBTNBWPBYRBZDCADCDFCHECHFCHWCLFCLPCNYCOPCOUCRCCUCCUPCVECZKDJFDKKDOPDZDEGPERNETBEURFJDFKPGBPGELGHSGIPGMDGNFGTQGYDHKDHNLHRKHTGHUFIDRILSINRIQDIRRISKJMDJODJPYKESKGSKHRKMFKPWKRWKWDKYDKZTLAKLBPLKRLRDLSLLTLLVLLYDMADMDLMGAMKDMMKMNTMOPMROMURMVRMWKMXNMXVMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSDGSEKSGDSHPSLLSOSSRDSSPSTDSVCSYPSZLTHBTJSTMTTNDTOPTRYTTDTWDTZSUAHUGXUSDUSNUSSUYIUYUUYWUZSVEFVNDVUVWSTXAFXAGXAUXBAXBBXBCXBDXCDXDRXFUXOFXPDXPFXPTXTSXXXYERZAR, or ZMW.
expense_typeenum

The type of expense.

One ofexpense or refund.
currency_ratenumberOptional

The exchange rate between the currency of the expense and the business default currency.

memostringnullable

The memo of the expense.

line_itemsarray

An array of line items associated with the expense.

Show line_items attributes
created_atstringnullable

The ISO 8601 timestamp that the expense was created.

updated_atstringnullable

The ISO 8601 timestamp that the expense was last updated.

last_synced_atstring

The ISO 8601 timestamp when the expense was last synced by Rutter.

platform_dataobjectOptional

The raw platform data corresponding to the Rutter object.

Endpoints
GET
/accounting/expenses
GET
/accounting/expenses/:id
POST
/accounting/expenses
PATCH
/accounting/expenses/:id
DELETE
/accounting/expenses/:id

List Expenses

GEThttps://production.rutterapi.com/versioned/accounting/expenses

Request Parameters

    access_tokenstringquery

    The access token of the connection.

    cursorstringqueryOptional

    The cursor to use for pagination. Use the value of next_cursor provided in a previous response.

    expandenumqueryOptional

    Used to request inclusion of optional objects.

    Can beplatform_data.
    expense_typeenumqueryOptional

    Filter results on the supplied expense type. Returns only expenses if not provided.

    One ofexpense or refund.
    force_fetchenumqueryOptional

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

    One oftrue or false.
    last_synced_at_minintegerqueryOptional

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

    limitintegerqueryOptional

    The number of entities to return. Defaults to 50. Maximum is 500.

    sortstringqueryOptional

    The field and direction to sort by (ASC or DESC), e.g. last_synced_at ASC. Currently supports the fields: updated_at, last_synced_at. If a field is provided but ASC or DESC is not, defaults to ASC. If this field is omitted, defaults, to updated_at DESC.

    transaction_date_maxintegerqueryOptional

    Unix Timestamp in milliseconds representing the maximum transaction_date datetime to fetch entities from. Supported for the following platforms: NETSUITE, QUICKBOOKS, XERO, ZOHOBOOKS.

    transaction_date_minintegerqueryOptional

    Unix Timestamp in milliseconds representing the minimum transaction_date datetime to fetch entities from. Supported for the following platforms: NETSUITE, QUICKBOOKS, XERO, ZOHOBOOKS.

    updated_at_maxintegerqueryOptional

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

    updated_at_minintegerqueryOptional

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

Response Body

    connectionobject
    Show connection attributes
    expensesarray
    Show expenses attributes
    next_cursorstringnullableOptional
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
  • Xero
    Xero
  • QuickBooks Desktop
    QuickBooks Desktop
Example Response Body
JSON
1
{
2
"connection": {
3
"id": "00000000-0000-0000-0000-000000000000",
4
"orgId": "00000000-0000-0000-0000-000000000000",
5
"platform": "NETSUITE"
6
},
7
"expenses": [
8
{
9
"id": "00000000-0000-0000-0000-000000000000",
10
"platform_id": "12345678",
11
"account_id": "00000000-0000-0000-0000-000000000000",
12
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
13
"vendor_id": "00000000-0000-0000-0000-000000000000",
14
"transaction_date": "2023-01-02T02:34:56.000Z",
15
"currency_code": "USD",
16
"expense_type": "expense",
17
"memo": "For a Rutter shirt.",
18
"line_items": [
19
{
20
"account_id": "00000000-0000-0000-0000-000000000000",
21
"class_id": "00000000-0000-0000-0000-000000000000",
22
"customer_id": "00000000-0000-0000-0000-000000000000",
23
"department_id": "00000000-0000-0000-0000-000000000000",
24
"location_id": "00000000-0000-0000-0000-000000000000",
25
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
26
"total_amount": 12.34,
27
"description": "Rutter shirt"
28
}
29
],
30
"created_at": "2023-01-02T02:34:56.000Z",
31
"updated_at": "2023-01-02T02:34:56.000Z",
32
"last_synced_at": "2023-01-02T02:34:56.000Z",
33
"platform_data": {
34
"id": 123,
35
"data": "Varies by platform"
36
}
37
}
38
],
39
"next_cursor": "MTY3NDgzMTk0Ml82MDY4ZDI0ZC02NGRmLTRmN2EtYTM0Ny0zN2ZmNjY5MGVmMjU="
40
}

Fetch an Expense

GEThttps://production.rutterapi.com/versioned/accounting/expenses/:id

Request Parameters

    idstringpath

    The Rutter generated unique ID of the object.

    access_tokenstringquery

    The access token of the connection.

    force_fetchenumqueryOptional

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

    One oftrue or false.
    id_typeenumqueryOptional

    Optionally, search for a connection by Rutter ID or platform ID. Defaults to rutter. Not supported on QuickBooks Desktop, Sage Intacct, or Dynamics 365.

    One ofrutter or platform.

Response Body

    connectionobject
    Show connection attributes
    expenseobject
    Show expense attributes
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
  • Xero
    Xero
  • QuickBooks Desktop
    QuickBooks Desktop
Example Response Body
JSON
1
{
2
"connection": {
3
"id": "00000000-0000-0000-0000-000000000000",
4
"orgId": "00000000-0000-0000-0000-000000000000",
5
"platform": "NETSUITE"
6
},
7
"expense": {
8
"id": "00000000-0000-0000-0000-000000000000",
9
"platform_id": "12345678",
10
"account_id": "00000000-0000-0000-0000-000000000000",
11
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
12
"vendor_id": "00000000-0000-0000-0000-000000000000",
13
"transaction_date": "2023-01-02T02:34:56.000Z",
14
"currency_code": "USD",
15
"expense_type": "expense",
16
"memo": "For a Rutter shirt.",
17
"line_items": [
18
{
19
"account_id": "00000000-0000-0000-0000-000000000000",
20
"class_id": "00000000-0000-0000-0000-000000000000",
21
"customer_id": "00000000-0000-0000-0000-000000000000",
22
"department_id": "00000000-0000-0000-0000-000000000000",
23
"location_id": "00000000-0000-0000-0000-000000000000",
24
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
25
"total_amount": 12.34,
26
"description": "Rutter shirt"
27
}
28
],
29
"created_at": "2023-01-02T02:34:56.000Z",
30
"updated_at": "2023-01-02T02:34:56.000Z",
31
"last_synced_at": "2023-01-02T02:34:56.000Z",
32
"platform_data": {
33
"id": 123,
34
"data": "Varies by platform"
35
}
36
}
37
}

Create an Expense

POSThttps://production.rutterapi.com/versioned/accounting/expenses

Request Parameters

    access_tokenstringquery

    The access token of the connection.

Request Body

    expenseobject
    Show expense attributes

Response Body

    Any of:

    expenseobject
    Show expense attributes
    async_responseobjectOptional
    Show async_response attributes
    errorsarrayOptional
    Show errors attributes
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
  • Xero
    Xero
  • QuickBooks Desktop
    QuickBooks Desktop
Example Request Body
JSON
1
{
2
"expense": {
3
"account_id": "00000000-0000-0000-0000-000000000000",
4
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
5
"vendor_id": "00000000-0000-0000-0000-000000000000",
6
"transaction_date": "2023-01-02T02:34:56.000Z",
7
"currency_code": "USD",
8
"expense_type": "expense",
9
"currency_rate": 1,
10
"memo": "For a Rutter shirt.",
11
"line_items": [
12
{
13
"account_id": "00000000-0000-0000-0000-000000000000",
14
"class_id": "00000000-0000-0000-0000-000000000000",
15
"customer_id": "00000000-0000-0000-0000-000000000000",
16
"department_id": "00000000-0000-0000-0000-000000000000",
17
"location_id": "00000000-0000-0000-0000-000000000000",
18
"total_amount": 12.34,
19
"description": "For a Rutter shirt."
20
}
21
]
22
}
23
}
Example Response Body
JSON
1
{
2
"expense": {
3
"id": "00000000-0000-0000-0000-000000000000",
4
"platform_id": "12345678",
5
"account_id": "00000000-0000-0000-0000-000000000000",
6
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
7
"vendor_id": "00000000-0000-0000-0000-000000000000",
8
"transaction_date": "2023-01-02T02:34:56.000Z",
9
"currency_code": "USD",
10
"expense_type": "expense",
11
"memo": "For a Rutter shirt.",
12
"line_items": [
13
{
14
"account_id": "00000000-0000-0000-0000-000000000000",
15
"class_id": "00000000-0000-0000-0000-000000000000",
16
"customer_id": "00000000-0000-0000-0000-000000000000",
17
"department_id": "00000000-0000-0000-0000-000000000000",
18
"location_id": "00000000-0000-0000-0000-000000000000",
19
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
20
"total_amount": 12.34,
21
"description": "Rutter shirt"
22
}
23
],
24
"created_at": "2023-01-02T02:34:56.000Z",
25
"updated_at": "2023-01-02T02:34:56.000Z",
26
"last_synced_at": "2023-01-02T02:34:56.000Z",
27
"platform_data": {
28
"id": 123,
29
"data": "Varies by platform"
30
}
31
}
32
}

Update an Expense

PATCHhttps://production.rutterapi.com/versioned/accounting/expenses/:id

If a field value is provided, that field will take the updated value. If the field is not provided, the existing value will persist.

Request Parameters

    idstringpath

    The Rutter generated unique ID of the object.

    access_tokenstringquery

    The access token of the connection.

Request Body

    expenseobject
    Show expense attributes

Response Body

    Any of:

    expenseobject
    Show expense attributes
    async_responseobjectOptional
    Show async_response attributes
    errorsarrayOptional
    Show errors attributes
Support by integration
  • QuickBooks
    QuickBooks
  • Netsuite
    Netsuite
Example Request Body
JSON
1
{
2
"expense": {
3
"account_id": "00000000-0000-0000-0000-000000000000"
4
}
5
}
Example Response Body
JSON
1
{
2
"expense": {
3
"id": "00000000-0000-0000-0000-000000000000",
4
"platform_id": "12345678",
5
"account_id": "00000000-0000-0000-0000-000000000000",
6
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
7
"vendor_id": "00000000-0000-0000-0000-000000000000",
8
"transaction_date": "2023-01-02T02:34:56.000Z",
9
"currency_code": "USD",
10
"expense_type": "expense",
11
"memo": "For a Rutter shirt.",
12
"line_items": [
13
{
14
"account_id": "00000000-0000-0000-0000-000000000000",
15
"class_id": "00000000-0000-0000-0000-000000000000",
16
"customer_id": "00000000-0000-0000-0000-000000000000",
17
"department_id": "00000000-0000-0000-0000-000000000000",
18
"location_id": "00000000-0000-0000-0000-000000000000",
19
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
20
"total_amount": 12.34,
21
"description": "Rutter shirt"
22
}
23
],
24
"created_at": "2023-01-02T02:34:56.000Z",
25
"updated_at": "2023-01-02T02:34:56.000Z",
26
"last_synced_at": "2023-01-02T02:34:56.000Z",
27
"platform_data": {
28
"id": 123,
29
"data": "Varies by platform"
30
}
31
}
32
}

Delete an Expense

DELETEhttps://production.rutterapi.com/versioned/accounting/expenses/:id

Request Parameters

    idstringpath

    The Rutter generated unique ID of the object.

    access_tokenstringquery

    The access token of the connection.

Response Body

    deleted_expenseobject
    Show deleted_expense attributes
Support by integration
  • QuickBooks
    QuickBooks
  • Zoho Books
    Zoho Books
Example Response Body
JSON
1
{
2
"deleted_expense": {
3
"code": "deleted",
4
"success": true
5
}
6
}

Have questions?

Contact support for personalized guidance.

Contact support