Create Expense Entry
Creates a new Expense Entry
- application/json
Request Body
- vehicle_id integer required
Possible values:
>= 1
- expense_entry_type_id integer required
Possible values:
>= 1
- vendor_id integer
Possible values:
>= 1
- total_amount_cents integer required
The total amount of this Expense Entry, in cents.
- occurred_at date-time required
Date and time of the expense. We recommend using ISO-8601 formatted dates to avoid ambiguity.
- notes string
Additional comments.
- custom_fields object
*Full details on working with Custom Fields here.
documents_attributes object[]
An array of one or more document objects to add to the record. You may provide your own
file_url
, or follow our Attaching Documents and Images guide to upload to our third party storage provider.name stringPossible values:
<= 255 characters
The name to give the file which will be shown in the UI.
file_url stringPossible values:
<= 255 characters
The URL pointing to the file.
file_mime_type stringPossible values:
<= 255 characters
The MIME type of the file. For example,
application/pdf
.file_name stringPossible values:
<= 255 characters
The name of the file.
file_size integerThe size of the file in bytes.
images_attributes object[]
An array of one or more image objects to add to the record. You may provide your own
file_url
, or follow our Attaching Documents and Images guide to upload to our third party storage provider.name stringPossible values:
<= 255 characters
The name to give the image which will be shown in the UI.
file_url stringPossible values:
<= 255 characters
The URL pointing to the image.
file_mime_type stringPossible values:
<= 255 characters
The MIME type of the image. For example,
image/png
.file_name stringPossible values:
<= 255 characters
The name of the image.
file_size integerThe size of the image file in bytes.
- 201
- 401
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- id integer
Possible values:
>= 1
- created_at date-time
The date and time at which this record was created.
- updated_at date-time
The date and time at which this record was most recently updated.
- account_id integer
The ID of the
Account
that owns this Expense Entry. - notes string
Additional comments.
- expense_entry_type_id integer
Possible values:
>= 1
- occurred_at date-time
Date and time of the expense.
- vehicle_id integer
The ID of the associated
Vehicle
. - vendor_id NullableId
Possible values:
>= 1
- custom_fields object
*Full details on working with Custom Fields here.
- billable_id integer
The ID of the associated
Acquisition
, if applicable. - billable_type string
Possible values: [
Acquisition
]The billable type, if applicable.
- bulk_watch_record boolean
Whether or not this record is being watched in bulk.
- comments_count integer
The number of
Comments
on this record. - documents_count integer
The number of documents attached to this record.
- images_count integer
The number of images attached to this record.
- import_id integer
The ID of the
Import
that created this record, if applicable. - is_sample boolean
Whether or not this record is sample data.
- recurring_expense_entry_id integer
The ID of the associated recurring Expense Entry, if applicable.
- skip_automatic_watchers_callbacks boolean
Whether or not to skip automatic watchers callbacks.
- total_amount_cents string
The total amount of the expense.
- vehicle_archived_at date-time
The date and time the associated
Vehicle
was archived, if applicable. - watchable_options object
Options related to watching the record.
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"account_id": 0,
"notes": "string",
"expense_entry_type_id": 0,
"occurred_at": "2023-03-14T13:46:27-06:00",
"vehicle_id": 0,
"vendor_id": 0,
"custom_fields": {},
"billable_id": 0,
"billable_type": "Acquisition",
"bulk_watch_record": true,
"comments_count": 0,
"documents_count": 0,
"images_count": 0,
"import_id": 0,
"is_sample": true,
"recurring_expense_entry_id": 0,
"skip_automatic_watchers_callbacks": true,
"total_amount_cents": "string",
"vehicle_archived_at": "2024-11-18",
"watchable_options": {}
}
Request could not be authenticated
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Unprocessable Entity
- application/json
- Schema
- Example (from schema)
- Example
Schema
errors object
typeitems string
{
"errors": {}
}
{
"errors": {
"field1": [
"error1",
"error2"
],
"field2": [
"error3"
]
}
}
Something unexpected happened
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}