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
stringRequiredThe Rutter generated unique ID of the expense.
platform_id
stringRequiredThe platform specific ID of the expense.
account_id
stringRequiredThe Rutter ID of the Account linked to the expense. Represents the account being credited.
subsidiary_id
stringnullableRequiredThe Rutter ID of the Subsidiary linked to the expense. This feature is currently only supported on NetSuite.
vendor_id
stringnullableRequiredThe Rutter ID of the Vendor linked to the expense.
expense_date
stringnullableRequiredThe ISO 8601 timestamp that the expense was created.
currency_rate
numberThe exchange rate between the currency of the expense and the business default currency.
memo
stringnullableRequiredThe memo of the expense.
currency_code
enumnullableThe ISO 4217 currency code of the expense.
line_items
arrayRequiredAn array of line items associated with the expense.
line_items
attributescreated_at
stringnullableRequiredThe ISO 8601 timestamp that the expense was created.
updated_at
stringnullableRequiredThe ISO 8601 timestamp that the expense was last updated.
last_synced_at
stringRequiredThe ISO 8601 timestamp when the expense was last synced by Rutter.
platform_data
objectThe raw platform data corresponding to the Rutter object.
List Expenses
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
cursor
stringqueryThe cursor to use for pagination. This value is passed in from next_cursor
field in a previous request.
expand
enumqueryUsed to request inclusion of optional objects.
force_fetch
enumqueryForce a response even if the underlying connection hasn't finished the initial sync.
last_synced_at_min
integerqueryUnix Timestamp in milliseconds representing the minimum last_synced_at datetime to fetch entities from.
limit
integerqueryThe limit on the number of entities returned.
sort
stringqueryThe 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
.
updated_at_max
integerqueryUnix Timestamp in milliseconds representing the maximum updated_at datetime to fetch entities from.
updated_at_min
integerqueryUnix Timestamp in milliseconds representing the minimum updated_at datetime to fetch entities from.
Response Body
connection
objectRequiredconnection
attributesexpenses
arrayRequiredexpenses
attributesnext_cursor
stringnullable- Dynamics 365
- Exact
- Free Agent
- Netsuite
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 "expense_date": "2023-01-02T02:34:56.000Z",
15 "memo": "For a Rutter shirt.",
16 "currency_code": "USD",
17 "line_items": [
18 {
19 "platform_id": "12345678",
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 "description": "Rutter shirt",
27 "amount": "12.34"
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
enumqueryForce a response even if the underlying connection hasn't finished the initial sync.
id_type
enumqueryOptionally, search for a connection by Rutter ID or platform ID. Defaults to rutter
. Not supported on Quickbooks Desktop or Dynamics 365.
Response Body
connection
objectRequiredconnection
attributesexpense
objectRequiredexpense
attributes- Dynamics 365
- Exact
- Free Agent
- Netsuite
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 "expense_date": "2023-01-02T02:34:56.000Z",
14 "memo": "For a Rutter shirt.",
15 "currency_code": "USD",
16 "line_items": [
17 {
18 "platform_id": "12345678",
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 "description": "Rutter shirt",
26 "amount": "12.34"
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
objectRequiredexpense
attributesResponse Body
Any of:
expense
objectRequiredexpense
attributesasync_response
objectasync_response
attributeserrors
arrayerrors
attributes- Dynamics 365
- Exact
- Free Agent
- Netsuite
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 "expense_date": "2023-01-02T02:34:56.000Z",
7 "currency_code": "USD",
8 "currency_rate": 1,
9 "memo": "For a Rutter shirt.",
10 "line_items": [
11 {
12 "account_id": "00000000-0000-0000-0000-000000000000",
13 "class_id": "00000000-0000-0000-0000-000000000000",
14 "customer_id": "00000000-0000-0000-0000-000000000000",
15 "department_id": "00000000-0000-0000-0000-000000000000",
16 "location_id": "00000000-0000-0000-0000-000000000000",
17 "amount": 12.34,
18 "description": "For a Rutter shirt."
19 }
20 ]
21 }
22}
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 "expense_date": "2023-01-02T02:34:56.000Z",
9 "memo": "For a Rutter shirt.",
10 "currency_code": "USD",
11 "line_items": [
12 {
13 "platform_id": "12345678",
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 "description": "Rutter shirt",
21 "amount": "12.34"
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
objectRequiredexpense
attributesResponse Body
Any of:
expense
objectRequiredexpense
attributesasync_response
objectasync_response
attributeserrors
arrayerrors
attributes- Netsuite
- Quickbooks
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 "expense_date": "2023-01-02T02:34:56.000Z",
9 "memo": "For a Rutter shirt.",
10 "currency_code": "USD",
11 "line_items": [
12 {
13 "platform_id": "12345678",
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 "description": "Rutter shirt",
21 "amount": "12.34"
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
objectRequireddeleted_expense
attributes- Quickbooks
1{
2 "deleted_expense": {
3 "code": "deleted",
4 "success": true
5 }
6}
Have questions?
Contact support for personalized guidance.