v1

latestOpenAPI 3.0.12026-08-041753011.2 MB
Expense Report

Generate an expense report

Expense report data on FREE subscription plan is limited to a maximum interval length of one month (31 days).

post/v1/workspaces/{workspaceId}/reports/expenses/detailed

Path parameters

workspaceIdstring required

Represents a workspace identifier across the system.

Example:60f91b3ffdaf031696ec6bbb

Request body

approvalState'APPROVED' | 'UNAPPROVED' | 'ALL'

Represents an approval state

billableboolean

Indicates whether report is billable

dateRangeEndstring required

Provide date in format YYYY-MM-DDTHH:MM:SS.ssssss. The system interprets this value based on the user's timezone (provided in the timeZone request parameter or the timezone configured in the user profile)

dateRangeStartstring required

Provide date in format YYYY-MM-DDTHH:MM:SS.ssssss. The system interprets this value based on the user's timezone (provided in the timeZone request parameter or the timezone configured in the user profile)

dateRangeType'ABSOLUTE' | 'TODAY' | 'YESTERDAY' | 'THIS_WEEK' | 'LAST_WEEK' | 'PAST_TWO_WEEKS' | 'THIS_MONTH' | 'LAST_MONTH' | 'THIS_YEAR' | 'LAST_YEAR'

Represents date range type of expense report

exportType'JSON' | 'JSON_V1' | 'PDF' | 'CSV' | 'XLSX' | 'ZIP'

Represents an export type

invoicingState'INVOICED' | 'UNINVOICED' | 'ALL'

Represents an invoicing state

notestring

Represents a search term for filtering report entries by note

pageinteger

Page number.

pageSizeinteger

Page size.

sortColumn'ID' | 'PROJECT' | 'USER' | 'CATEGORY' | 'DATE' | 'AMOUNT'

Represents expenses sort column

sortOrder'ASCENDING' | 'DESCENDING'

Represents a sort order

timeZonestring

Represents a time zone

userLocalestring

Represents a user locale

weekStart'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY'

Represents week start

withoutNoteboolean

If set to 'true', report will only include entries with empty note

zoomLevel'WEEK' | 'MONTH' | 'YEAR'

Represents a zoom level

Example request

{
  "approvalState": "APPROVED",
  "billable": true,
  "categories": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "clients": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "currency": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "dateRangeEnd": "2021-10-27T23:59:59.999",
  "dateRangeStart": "2021-10-27T00:00:00",
  "dateRangeType": "TODAY",
  "exportType": "JSON",
  "invoicingState": "INVOICED",
  "note": "some note keyword",
  "page": 1,
  "pageSize": 50,
  "projects": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "sortColumn": "ID",
  "sortOrder": "ASCENDING",
  "tasks": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "timeZone": "Europe/Budapest",
  "userGroups": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "userLocale": "en",
  "users": {
    "contains": "CONTAINS",
    "ids": [
      "5b715448b079875110792222",
      "5b715448b079875110791111"
    ],
    "status": "ACTIVE"
  },
  "weekStart": "MONDAY",
  "zoomLevel": "WEEK"
}

Response

OK

Example response

{
  "expenses": [
    {
      "approvalRequestId": "5b715612b079875110791336",
      "categoryId": "5b715612b079875110791334",
      "date": "2021-10-27T00:00:00Z",
      "fileId": "5b715612b079875110791335",
      "id": "5b715612b079875110791122",
      "notes": "Expenses Note",
      "projectId": "5b715612b079875110791333",
      "quantity": 10,
      "userId": "5b715612b079875110791121",
      "workspaceId": "5b715612b079875110791121"
    }
  ],
  "totals": {
    "expensesCount": 2,
    "totalAmount": 20,
    "totalAmountBillable": 20
  }
}