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.
customer_id
stringnullableOptionalThe Rutter ID of the Customer linked to the expense. This is used when expenses should be marked as billable to customers. Supported for Zoho Books.
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
stringfilterableThe ISO 8601 timestamp that the expense was created.
currency_code
enumThe ISO 4217 currency code of the expense.
expense_type
enumfilterableThe 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
stringfilterablenullableThe ISO 8601 timestamp that the expense was created.
updated_at
stringfilterablenullableThe ISO 8601 timestamp that the expense was last updated.
last_synced_at
stringfilterableThe ISO 8601 timestamp when the expense was last synced by Rutter.
platform_url
stringnullableA URL pointing to the object in the underlying platform. When no URL exists for the specific object, the value may be a larger URL containing the object.
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.
limit
integerqueryOptionalUsed to limit the number of returned objects. Defaults to 50.
filter
stringqueryOptionalNot currently supported on Sage Intacct or Sage Business Cloud. Used to specify a filtering criteria for response objects. Refer to Filtering Objects to understand the syntax for the filtering criteria. The filtering syntax only supports fields decorated with a filterable
tag in the response object.
Filterable fields: transaction_date
, expense_type
, created_at
, updated_at
, last_synced_at
.
sort
stringqueryOptionalUsed to sort the response objects, e.g. last_synced_at ASC
. If a value is provided but ASC
or DESC
is not, defaults to ASC
. If omitted, defaults to updated_at DESC
. Supports only fields decorated with a filterable
tag in the response object except on Sage Intacct and Sage Business Cloud. For those platforms, only updated_at_min
, updated_at_max
and last_synced_at_min
fields are supported and not deprecated.
Sortable fields: transaction_date
, expense_type
, created_at
, updated_at
, last_synced_at
.
expand
enumqueryOptionalInclude platform specific data (includes additional fields not provided by the Rutter object).
expense_type
enumfilterablequeryOptionalDeprecated - use filter
instead. The exact expect type to filter on. Defaults to expense
if not provided.
last_synced_at_min
integerqueryOptionalDeprecated - use filter
instead. Used to filter objects with a last_synced_at
value greater than or equal to the supplied value. Should be a Unix time in milliseconds.
transaction_date_max
integerqueryOptionalDeprecated - use filter
instead. Used to filter objects with a transaction_date
value less than or equal to the supplied value. Should be a Unix time in milliseconds. Not currently supported on Sage Intacct or Sage Business Cloud.
transaction_date_min
integerqueryOptionalDeprecated - use filter
instead. Used to filter objects with a transaction_date
value greater than or equal to the supplied value. Should be a Unix time in milliseconds. Not currently supported on Sage Intacct or Sage Business Cloud.
updated_at_max
integerqueryOptionalDeprecated - use filter
instead. Used 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
integerqueryOptionalDeprecated - use filter
instead. Used to filter objects with a updated_at
value greater than or equal to the supplied value. Should be a Unix time in milliseconds.
force_fetch
enumqueryOptionalUsed to force a response even if the underlying connection has not finished its initial sync.
Response Body
- QuickBooks
- Xero
- QuickBooks Desktop
- NetSuite
1{
2 "expenses": [
3 {
4 "id": "00000000-0000-0000-0000-000000000000",
5 "platform_id": "12345678",
6 "account_id": "00000000-0000-0000-0000-000000000000",
7 "customer_id": "00000000-0000-0000-0000-000000000000",
8 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
9 "vendor_id": "00000000-0000-0000-0000-000000000000",
10 "transaction_date": "2023-01-02T02:34:56.000Z",
11 "currency_code": "USD",
12 "expense_type": "expense",
13 "memo": "For a Rutter shirt.",
14 "line_items": [
15 {
16 "account_id": "00000000-0000-0000-0000-000000000000",
17 "class_id": "00000000-0000-0000-0000-000000000000",
18 "customer_id": "00000000-0000-0000-0000-000000000000",
19 "department_id": "00000000-0000-0000-0000-000000000000",
20 "location_id": "00000000-0000-0000-0000-000000000000",
21 "project_id": "00000000-0000-0000-0000-000000000000",
22 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
23 "total_amount": 12.34,
24 "description": "Rutter shirt"
25 }
26 ],
27 "created_at": "2023-01-02T02:34:56.000Z",
28 "updated_at": "2023-01-02T02:34:56.000Z",
29 "last_synced_at": "2023-01-02T02:34:56.000Z",
30 "platform_url": "https://platform.com/resource?id=123",
31 "platform_data": {
32 "id": 123,
33 "data": "Varies by platform"
34 }
35 }
36 ],
37 "next_cursor": "MTY3NDgzMTk0Ml82MDY4ZDI0ZC02NGRmLTRmN2EtYTM0Ny0zN2ZmNjY5MGVmMjU=",
38 "connection": {
39 "id": "00000000-0000-0000-0000-000000000000",
40 "orgId": "00000000-0000-0000-0000-000000000000",
41 "platform": "NETSUITE"
42 }
43}
Fetch an Expense
Request Parameters
id
stringpathRequiredThe unique ID of the object.
access_token
stringqueryRequiredThe access token of the connection.
id_type
enumqueryOptionalUsed to indicate the type of id
that is supplied. Defaults to rutter
. Not currently supported on Sage Intacct or Sage Business Cloud.
force_fetch
enumqueryOptionalUsed to force a response even if the underlying connection has not finished its initial sync.
Response Body
- QuickBooks
- Xero
- QuickBooks Desktop
- NetSuite
1{
2 "expense": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "platform_id": "12345678",
5 "account_id": "00000000-0000-0000-0000-000000000000",
6 "customer_id": "00000000-0000-0000-0000-000000000000",
7 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
8 "vendor_id": "00000000-0000-0000-0000-000000000000",
9 "transaction_date": "2023-01-02T02:34:56.000Z",
10 "currency_code": "USD",
11 "expense_type": "expense",
12 "memo": "For a Rutter shirt.",
13 "line_items": [
14 {
15 "account_id": "00000000-0000-0000-0000-000000000000",
16 "class_id": "00000000-0000-0000-0000-000000000000",
17 "customer_id": "00000000-0000-0000-0000-000000000000",
18 "department_id": "00000000-0000-0000-0000-000000000000",
19 "location_id": "00000000-0000-0000-0000-000000000000",
20 "project_id": "00000000-0000-0000-0000-000000000000",
21 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
22 "total_amount": 12.34,
23 "description": "Rutter shirt"
24 }
25 ],
26 "created_at": "2023-01-02T02:34:56.000Z",
27 "updated_at": "2023-01-02T02:34:56.000Z",
28 "last_synced_at": "2023-01-02T02:34:56.000Z",
29 "platform_url": "https://platform.com/resource?id=123",
30 "platform_data": {
31 "id": 123,
32 "data": "Varies by platform"
33 }
34 },
35 "connection": {
36 "id": "00000000-0000-0000-0000-000000000000",
37 "orgId": "00000000-0000-0000-0000-000000000000",
38 "platform": "NETSUITE"
39 }
40}
Create an Expense
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
Request Body
response_mode
enumOptionalThe response mode for our async endpoints. prefer_sync
allows calling the API in a best-effort, synchronous fashion and wait for the response. If this takes too long we will instead return the asynchronous response. This is the default behavior. async
makes the API respond with the asynchronous response. See Asynchronous Operations.
expense
objectexpense
attributesResponse Body
- Xero
- QuickBooks Desktop
- NetSuite
1{
2 "expense": {
3 "account_id": "00000000-0000-0000-0000-000000000000",
4 "customer_id": "00000000-0000-0000-0000-000000000000",
5 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
6 "vendor_id": "00000000-0000-0000-0000-000000000000",
7 "transaction_date": "2023-01-02T02:34:56.000Z",
8 "currency_code": "USD",
9 "expense_type": "expense",
10 "currency_rate": 1,
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 "project_id": "00000000-0000-0000-0000-000000000000",
20 "total_amount": 12.34,
21 "description": "For a Rutter shirt."
22 }
23 ]
24 }
25}
1{
2 "expense": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "platform_id": "12345678",
5 "account_id": "00000000-0000-0000-0000-000000000000",
6 "customer_id": "00000000-0000-0000-0000-000000000000",
7 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
8 "vendor_id": "00000000-0000-0000-0000-000000000000",
9 "transaction_date": "2023-01-02T02:34:56.000Z",
10 "currency_code": "USD",
11 "expense_type": "expense",
12 "memo": "For a Rutter shirt.",
13 "line_items": [
14 {
15 "account_id": "00000000-0000-0000-0000-000000000000",
16 "class_id": "00000000-0000-0000-0000-000000000000",
17 "customer_id": "00000000-0000-0000-0000-000000000000",
18 "department_id": "00000000-0000-0000-0000-000000000000",
19 "location_id": "00000000-0000-0000-0000-000000000000",
20 "project_id": "00000000-0000-0000-0000-000000000000",
21 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
22 "total_amount": 12.34,
23 "description": "Rutter shirt"
24 }
25 ],
26 "created_at": "2023-01-02T02:34:56.000Z",
27 "updated_at": "2023-01-02T02:34:56.000Z",
28 "last_synced_at": "2023-01-02T02:34:56.000Z",
29 "platform_url": "https://platform.com/resource?id=123",
30 "platform_data": {
31 "id": 123,
32 "data": "Varies by platform"
33 }
34 }
35}
Update an Expense
If a field is provided, that field will take the updated value. If a field is not provided, the existing value will persist. The exception is for array fields such as `line_items`. For these fields, the entire array will be replaced with the new array value.
Request Parameters
id
stringpathRequiredThe Rutter generated unique ID of the object.
access_token
stringqueryRequiredThe access token of the connection.
Request Body
response_mode
enumOptionalThe response mode for our async endpoints. prefer_sync
allows calling the API in a best-effort, synchronous fashion and wait for the response. If this takes too long we will instead return the asynchronous response. This is the default behavior. async
makes the API respond with the asynchronous response. See Asynchronous Operations.
expense
objectexpense
attributesResponse Body
- QuickBooks
- Xero
- 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 "customer_id": "00000000-0000-0000-0000-000000000000",
7 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
8 "vendor_id": "00000000-0000-0000-0000-000000000000",
9 "transaction_date": "2023-01-02T02:34:56.000Z",
10 "currency_code": "USD",
11 "expense_type": "expense",
12 "memo": "For a Rutter shirt.",
13 "line_items": [
14 {
15 "account_id": "00000000-0000-0000-0000-000000000000",
16 "class_id": "00000000-0000-0000-0000-000000000000",
17 "customer_id": "00000000-0000-0000-0000-000000000000",
18 "department_id": "00000000-0000-0000-0000-000000000000",
19 "location_id": "00000000-0000-0000-0000-000000000000",
20 "project_id": "00000000-0000-0000-0000-000000000000",
21 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
22 "total_amount": 12.34,
23 "description": "Rutter shirt"
24 }
25 ],
26 "created_at": "2023-01-02T02:34:56.000Z",
27 "updated_at": "2023-01-02T02:34:56.000Z",
28 "last_synced_at": "2023-01-02T02:34:56.000Z",
29 "platform_url": "https://platform.com/resource?id=123",
30 "platform_data": {
31 "id": 123,
32 "data": "Varies by platform"
33 }
34 }
35}
Delete an Expense
Request Parameters
id
stringpathRequiredThe Rutter generated unique ID of the object.
access_token
stringqueryRequiredThe access token of the connection.
Request Body
response_mode
enumOptionalThe response mode for our async endpoints. prefer_sync
allows calling the API in a best-effort, synchronous fashion and wait for the response. If this takes too long we will instead return the asynchronous response. This is the default behavior. async
makes the API respond with the asynchronous response. See Asynchronous Operations.
Response Body
- QuickBooks
- Xero
- Zoho Books
1{
2 "code": "deleted",
3 "success": true
4}
Have questions?
Contact support for personalized guidance.