v1

latestOpenAPI 3.0.12026-08-041753011.2 MB
Expense

Get all expenses on a workspace

get/v1/workspaces/{workspaceId}/expenses

Path parameters

workspaceIdstring required

Represents a workspace identifier across the system.

Example:64a687e29ae1f428e7ebe303

Represents a workspace identifier across the system.

Query parameters

pageinteger

Page number.

Example:1

Page number.

page-sizeinteger

Page size.

Example:50

Page size.

user-idstring

If provided, you'll get a filtered list of expenses which match the provided string in the user ID linked to the expense.

Response

OK

Example response

{
  "dailyTotals": [
    {
      "date": "2020-01-01",
      "total": 1500.75
    }
  ],
  "expenses": {
    "count": 25,
    "expenses": [
      {
        "category": {
          "id": "89a687e29ae1f428e7ebe303",
          "name": "Procurement",
          "priceInCents": 1000,
          "unit": "piece",
          "workspaceId": "64a687e29ae1f428e7ebe303"
        },
        "date": "89b687e29ae1f428e7ebe912",
        "fileId": "745687e29ae1f428e7ebe890",
        "fileName": "expense_20200101",
        "id": "64c777ddd3fcab07cfbb210c",
        "notes": "This is a sample note for this expense.",
        "project": {
          "clientId": "64c777ddd3fcab07cfbb210c",
          "clientName": "Client X",
          "color": "#000000",
          "id": "5b641568b07987035750505e",
          "name": "Software Development"
        },
        "task": {
          "id": "5b715448b0798751107918ab",
          "name": "Bugfixing"
        },
        "total": 10500.5,
        "userId": "89b687e29ae1f428e7ebe912",
        "workspaceId": "64a687e29ae1f428e7ebe303"
      }
    ]
  },
  "weeklyTotals": [
    {
      "date": "2020-01-01",
      "total": 20000.75
    }
  ]
}