Skip to content

List expenses in approval

GET
/api/expenses/approvals
curl --request GET \
--url 'https://invoicing-api.eddish.app/api/expenses/approvals?scope=mine&state=pending' \
--header 'Authorization: Bearer <token>'

Lists expenses in the approval process. Only available when the account requires expense approval.

scope
string
default: mine

Mine for the caller’s own expenses, or toApprove for expenses the caller may decide. Defaults to mine.

state
string
default: pending

Pending, approved, returned or all. Defaults to pending.

from
string format: date

Earliest spent date to include, as yyyy-MM-dd.

to
string format: date

Latest spent date to include, as yyyy-MM-dd.

userId
string format: uuid

Only expenses entered by this person.

OK

Media typeapplication/json

Shorthand for the overwhelmingly common ServiceResponse&lt;TData, ErrorResponse&gt;. C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.

object
success

True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.

boolean
data

Payload on success; default on failure.

Array<object> | null

An expense, with its receipts and where it stands in approval.

object
id
required
string format: uuid
projectId
required

The project the expense is on. Empty for an expense that isn’t on a project, which is never billable.

null | string format: uuid
projectName
required
null | string
clientId
required
null | string format: uuid
clientName
required
null | string
expenseCategoryId
required
string format: uuid
expenseCategoryName
required
string
unit
required

The category’s unit, for showing “47 miles” rather than a bare number.

null | string
unitPrice
required

The category’s price per unit.

null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/
userId
required
string format: uuid
userName
required
string
spentDate
required

The day the money was spent, as yyyy-MM-dd.

string format: date
amount
required

The amount, in the account’s currency.

number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/
quantity
required

How many units, for a per-unit category. Empty when the amount was entered directly.

null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/
notes
required
null | string
billable
required
boolean
isLocked
required

True once the expense is on a sent invoice and can’t be changed.

boolean
isBilled
required

True once the expense is on an invoice.

boolean
invoiceId
required

The invoice the expense is on, if any.

null | string format: uuid
attachments
required
Array<object>

A receipt attached to an expense.

object
id
required
string format: uuid
expenseId
required
string format: uuid
fileName
required
string
contentType
required
string
fileSizeBytes
required

The file’s size in bytes.

integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
createdAtUtc
required
string format: date-time
reimbursable

Whether the money is owed back to the person who spent it.

boolean
approvalState

Open, Submitted, Approved, Returned or Reimbursed. Stays Open unless the account requires expense approval.

default: Open
Allowed values: Open Submitted Approved Returned Reimbursed
submittedAtUtc

When the expense was submitted for approval.

null | string format: date-time
decidedAtUtc

When it was approved or returned.

null | string format: date-time
returnNote

The note an approver left when sending it back.

null | string
reimbursedAtUtc

When it was marked as paid back.

null | string format: date-time
canDecide

Whether the caller may approve or return it now.

boolean
error
One of:
null

Example

{
"data": [
{
"reimbursable": false,
"approvalState": "Open",
"canDecide": false
}
]
}

Not signed in, or the credential isn’t recognised, has expired or was revoked: auth.missing_credential, auth.invalid_credential, auth.expired_credential, auth.revoked_credential.

Media typeapplication/json

Shorthand for the overwhelmingly common ServiceResponse&lt;TData, ErrorResponse&gt;. C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.

object
success

True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.

boolean
data

Payload on success; default on failure.

error

The Framework’s default error shape, used as the TError of ServiceResponse<TData, TError> unless an App genuinely needs its own.

object
code

Stable, machine-readable error identifier (for example account.not_found). Clients branch on this, never on string ErrorResponse.Message.

string
message

Human-readable description of what went wrong. Safe to surface to a User.

string
fieldErrors

Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.

null | object
details

Optional machine-readable facts about the failure that a client renders rather than parses out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and planName. Null (and omitted from JSON) for errors that carry none.

null | object

Example generated

{
"success": true,
"data": "example",
"error": {
"code": "example",
"message": "example",
"fieldErrors": "example",
"details": "example"
}
}

Not allowed. error.code says why: auth.role_not_permitted (your role doesn’t allow it), auth.read_only_token (the token can only read), app.no_seat (no seat in this App), auth.api_access_not_in_plan (the plan doesn’t include API access), auth.not_a_member (no longer a member of the Account), auth.insufficient_scope (an Account API key without the scope).

Media typeapplication/json

Shorthand for the overwhelmingly common ServiceResponse&lt;TData, ErrorResponse&gt;. C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.

object
success

True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.

boolean
data

Payload on success; default on failure.

error

The Framework’s default error shape, used as the TError of ServiceResponse<TData, TError> unless an App genuinely needs its own.

object
code

Stable, machine-readable error identifier (for example account.not_found). Clients branch on this, never on string ErrorResponse.Message.

string
message

Human-readable description of what went wrong. Safe to surface to a User.

string
fieldErrors

Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.

null | object
details

Optional machine-readable facts about the failure that a client renders rather than parses out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and planName. Null (and omitted from JSON) for errors that carry none.

null | object

Example generated

{
"success": true,
"data": "example",
"error": {
"code": "example",
"message": "example",
"fieldErrors": "example",
"details": "example"
}
}

Too many requests: rate_limit.exceeded. Wait the number of seconds in the Retry-After header.

Media typeapplication/json

Shorthand for the overwhelmingly common ServiceResponse&lt;TData, ErrorResponse&gt;. C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.

object
success

True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.

boolean
data

Payload on success; default on failure.

error

The Framework’s default error shape, used as the TError of ServiceResponse<TData, TError> unless an App genuinely needs its own.

object
code

Stable, machine-readable error identifier (for example account.not_found). Clients branch on this, never on string ErrorResponse.Message.

string
message

Human-readable description of what went wrong. Safe to surface to a User.

string
fieldErrors

Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.

null | object
details

Optional machine-readable facts about the failure that a client renders rather than parses out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and planName. Null (and omitted from JSON) for errors that carry none.

null | object

Example generated

{
"success": true,
"data": "example",
"error": {
"code": "example",
"message": "example",
"fieldErrors": "example",
"details": "example"
}
}
Retry-After
integer

Seconds to wait before trying again.