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
id
stringThe Rutter generated unique ID of the expense.
platform_id
stringThe platform specific ID of the expense.
account_id
stringnullableThe Rutter ID of the Account linked to the expense. Represents the account being credited.
subsidiary_id
stringnullableThe Rutter ID of the Subsidiary linked to the expense. Supported for NetSuite.
vendor_id
stringnullableThe Rutter ID of the Vendor linked to the expense.
transaction_date
stringThe ISO 8601 timestamp that the expense was created.
currency_code
enumThe ISO 4217 currency code of the expense.
expense_type
enumThe type of expense.
currency_rate
numberOptionalThe exchange rate between the currency of the expense and the business default currency.
memo
stringnullableThe memo of the expense.
line_items
arrayAn array of line items associated with the expense.
line_items
attributescreated_at
stringnullableThe ISO 8601 timestamp that the expense was created.
updated_at
stringnullableThe ISO 8601 timestamp that the expense was last updated.
last_synced_at
stringThe ISO 8601 timestamp when the expense was last synced by Rutter.
platform_data
objectOptionalThe raw platform data corresponding to the Rutter object.
List Expenses
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
cursor
stringqueryOptionalUsed to paginate to the next batch of objects. Should be a copy of the next_cursor
value from the previous response.
expand
enumqueryOptionalInclude platform specific data (includes additional fields not provided by the Rutter object).
expense_type
enumqueryOptionalFilter results on the supplied expense type. Returns only expenses if not provided.
force_fetch
enumqueryOptionalUsed to force a response even if the underlying connection has not finished its initial sync.
last_synced_at_min
integerqueryOptionalUsed to filter objects with a last_synced_at
value greater than or equal to the supplied value. Should be a Unix time in milliseconds.
limit
integerqueryOptionalUsed to limit the number of returned objects. Defaults to 50.
sort
stringqueryOptionalUsed to sort the returned objects, e.g. last_synced_at ASC
. Currently supports the fields: updated_at
or 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_max
integerqueryOptionalUsed to filter objects with a transaction_date
value less than or equal to the supplied value. Should be a Unix time in milliseconds. Supported for the following platforms: NETSUITE, QUICKBOOKS, XERO, ZOHOBOOKS.
transaction_date_min
integerqueryOptionalUsed to filter objects with a transaction_date
value greater than or equal to the supplied value. Should be a Unix time in milliseconds. Supported for the following platforms: NETSUITE, QUICKBOOKS, XERO, ZOHOBOOKS.
updated_at_max
integerqueryOptionalUsed to filter objects with a updated_at
value less than or equal to the supplied value. Should be a Unix time in milliseconds.
updated_at_min
integerqueryOptionalUsed to filter objects with a updated_at
value greater than or equal to the supplied value. Should be a Unix time in milliseconds.
Response Body
connection
objectconnection
attributesexpenses
arrayexpenses
attributesnext_cursor
stringnullableOptional- QuickBooks
- NetSuite
- Xero
- QuickBooks Desktop
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
Request Parameters
id
stringpathRequiredThe Rutter generated unique ID of the object.
access_token
stringqueryRequiredThe access token of the connection.
force_fetch
enumqueryOptionalUsed to force a response even if the underlying connection has not finished its initial sync.
id_type
enumqueryOptionalUsed to indicate the type of id
that is supplied. Defaults to rutter
. Not supported on QuickBooks Desktop, Sage Intacct, or Dynamics 365.
Response Body
connection
objectconnection
attributesexpense
objectexpense
attributes- QuickBooks
- NetSuite
- Xero
- QuickBooks Desktop
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
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
Request Body
expense
objectexpense
attributesResponse Body
Any of:
expense
objectexpense
attributesasync_response
objectOptionalasync_response
attributeserrors
arrayOptionalerrors
attributes- QuickBooks
- NetSuite
- Xero
- QuickBooks Desktop
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}
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
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
id
stringpathRequiredThe Rutter generated unique ID of the object.
access_token
stringqueryRequiredThe access token of the connection.
Request Body
expense
objectexpense
attributesResponse Body
Any of:
expense
objectexpense
attributesasync_response
objectOptionalasync_response
attributeserrors
arrayOptionalerrors
attributes- QuickBooks
- NetSuite
1{
2 "expense": {
3 "account_id": "00000000-0000-0000-0000-000000000000"
4 }
5}
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
Request Parameters
id
stringpathRequiredThe Rutter generated unique ID of the object.
access_token
stringqueryRequiredThe access token of the connection.
Response Body
deleted_expense
objectdeleted_expense
attributes- QuickBooks
- Zoho Books
1{
2 "deleted_expense": {
3 "code": "deleted",
4 "success": true
5 }
6}
Have questions?
Contact support for personalized guidance.