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. This feature is currently only supported on 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.
platform_data
objectoptionalThe raw platform data corresponding to the Rutter object.
platform_data
attributes{
"id": "00000000-0000-0000-0000-000000000000",
"platform_id": "12345678",
"account_id": "00000000-0000-0000-0000-000000000000",
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
"vendor_id": "00000000-0000-0000-0000-000000000000",
"transaction_date": "2023-01-02T02:34:56.000Z",
"currency_code": "USD",
"expense_type": "expense",
"memo": "For a Rutter shirt.",
"line_items": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"class_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "00000000-0000-0000-0000-000000000000",
"department_id": "00000000-0000-0000-0000-000000000000",
"location_id": "00000000-0000-0000-0000-000000000000",
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
"total_amount": 12.34,
"description": "Rutter shirt"
}
],
"created_at": "2023-01-02T02:34:56.000Z",
"updated_at": "2023-01-02T02:34:56.000Z",
"platform_data": {
"id": 123,
"data": "Varies by platform"
}
}
List Expenses
GET /accounting/expensesRequest Parameters
access_token
stringqueryThe access token of the connection.
cursor
stringoptionalqueryThe cursor to use for pagination. This value is passed in from next_cursor
field in a previous request.
expand
enumoptionalqueryUsed to request inclusion of optional objects.
expense_type
enumoptionalqueryFilter results on the supplied expense type. Returns only expenses if not provided.
force_fetch
enumoptionalqueryForce a response even if the underlying connection hasn't finished the initial sync.
limit
integeroptionalqueryThe limit on the number of entities returned.
updated_at_max
integeroptionalqueryUnix Timestamp in milliseconds representing the maximum updated_at datetime to fetch entities from.
updated_at_min
integeroptionalqueryUnix Timestamp in milliseconds representing the minimum updated_at datetime to fetch entities from.
Response Body
connection
objectconnection
attributesexpenses
arrayexpenses
attributesnext_cursor
stringnullableoptional{
"connection": {
"id": "00000000-0000-0000-0000-000000000000",
"orgId": "00000000-0000-0000-0000-000000000000",
"platform": "NETSUITE"
},
"expenses": [
{
"id": "00000000-0000-0000-0000-000000000000",
"platform_id": "12345678",
"account_id": "00000000-0000-0000-0000-000000000000",
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
"vendor_id": "00000000-0000-0000-0000-000000000000",
"transaction_date": "2023-01-02T02:34:56.000Z",
"currency_code": "USD",
"expense_type": "expense",
"memo": "For a Rutter shirt.",
"line_items": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"class_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "00000000-0000-0000-0000-000000000000",
"department_id": "00000000-0000-0000-0000-000000000000",
"location_id": "00000000-0000-0000-0000-000000000000",
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
"total_amount": 12.34,
"description": "Rutter shirt"
}
],
"created_at": "2023-01-02T02:34:56.000Z",
"updated_at": "2023-01-02T02:34:56.000Z",
"platform_data": {
"id": 123,
"data": "Varies by platform"
}
}
],
"next_cursor": "MTY3NDgzMTk0Ml82MDY4ZDI0ZC02NGRmLTRmN2EtYTM0Ny0zN2ZmNjY5MGVmMjU="
}
Fetch an Expense
GET /accounting/expenses/:idRequest Parameters
id
stringpathThe Rutter generated unique ID of the object.
access_token
stringqueryThe access token of the connection.
force_fetch
enumoptionalqueryForce a response even if the underlying connection hasn't finished the initial sync.
Response Body
connection
objectconnection
attributesexpense
objectexpense
attributes{
"connection": {
"id": "00000000-0000-0000-0000-000000000000",
"orgId": "00000000-0000-0000-0000-000000000000",
"platform": "NETSUITE"
},
"expense": {
"id": "00000000-0000-0000-0000-000000000000",
"platform_id": "12345678",
"account_id": "00000000-0000-0000-0000-000000000000",
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
"vendor_id": "00000000-0000-0000-0000-000000000000",
"transaction_date": "2023-01-02T02:34:56.000Z",
"currency_code": "USD",
"expense_type": "expense",
"memo": "For a Rutter shirt.",
"line_items": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"class_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "00000000-0000-0000-0000-000000000000",
"department_id": "00000000-0000-0000-0000-000000000000",
"location_id": "00000000-0000-0000-0000-000000000000",
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
"total_amount": 12.34,
"description": "Rutter shirt"
}
],
"created_at": "2023-01-02T02:34:56.000Z",
"updated_at": "2023-01-02T02:34:56.000Z",
"platform_data": {
"id": 123,
"data": "Varies by platform"
}
}
}
Create an Expense
POST /accounting/expensesRequest Parameters
access_token
stringqueryThe access token of the connection.
Request Body
expense
objectexpense
attributesResponse Body
Any of:
expense
objectexpense
attributesasync_response
objectoptionalasync_response
attributeserrors
arrayoptionalerrors
attributes{
"expense": {
"account_id": "00000000-0000-0000-0000-000000000000",
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
"vendor_id": "00000000-0000-0000-0000-000000000000",
"transaction_date": "2023-01-02T02:34:56.000Z",
"currency_code": "USD",
"expense_type": "expense",
"currency_rate": 1,
"memo": "For a Rutter shirt.",
"line_items": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"class_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "00000000-0000-0000-0000-000000000000",
"department_id": "00000000-0000-0000-0000-000000000000",
"location_id": "00000000-0000-0000-0000-000000000000",
"total_amount": 12.34,
"description": "For a Rutter shirt."
}
]
}
}
{
"expense": {
"id": "00000000-0000-0000-0000-000000000000",
"platform_id": "12345678",
"account_id": "00000000-0000-0000-0000-000000000000",
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
"vendor_id": "00000000-0000-0000-0000-000000000000",
"transaction_date": "2023-01-02T02:34:56.000Z",
"currency_code": "USD",
"expense_type": "expense",
"memo": "For a Rutter shirt.",
"line_items": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"class_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "00000000-0000-0000-0000-000000000000",
"department_id": "00000000-0000-0000-0000-000000000000",
"location_id": "00000000-0000-0000-0000-000000000000",
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
"total_amount": 12.34,
"description": "Rutter shirt"
}
],
"created_at": "2023-01-02T02:34:56.000Z",
"updated_at": "2023-01-02T02:34:56.000Z",
"platform_data": {
"id": 123,
"data": "Varies by platform"
}
}
}
Update an Expense
PATCH /accounting/expenses/:idAll fields are conditionally required. This means that 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
stringpathThe Rutter generated unique ID of the object.
access_token
stringqueryThe access token of the connection.
Request Body
expense
objectexpense
attributesResponse Body
Any of:
expense
objectexpense
attributesasync_response
objectoptionalasync_response
attributeserrors
arrayoptionalerrors
attributes{
"expense": {
"account_id": "00000000-0000-0000-0000-000000000000"
}
}
{
"expense": {
"id": "00000000-0000-0000-0000-000000000000",
"platform_id": "12345678",
"account_id": "00000000-0000-0000-0000-000000000000",
"subsidiary_id": "00000000-0000-0000-0000-000000000000",
"vendor_id": "00000000-0000-0000-0000-000000000000",
"transaction_date": "2023-01-02T02:34:56.000Z",
"currency_code": "USD",
"expense_type": "expense",
"memo": "For a Rutter shirt.",
"line_items": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"class_id": "00000000-0000-0000-0000-000000000000",
"customer_id": "00000000-0000-0000-0000-000000000000",
"department_id": "00000000-0000-0000-0000-000000000000",
"location_id": "00000000-0000-0000-0000-000000000000",
"tax_rate_id": "00000000-0000-0000-0000-000000000000",
"total_amount": 12.34,
"description": "Rutter shirt"
}
],
"created_at": "2023-01-02T02:34:56.000Z",
"updated_at": "2023-01-02T02:34:56.000Z",
"platform_data": {
"id": 123,
"data": "Varies by platform"
}
}
}
Create an Expense Refund
POST /accounting/expenses/refundsEndpoint Removed in Version 2023-03-14