Expensicat
API Reference

Categories

GET
/v1/categories

List all transaction categories

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/categories"
{
  "data": [
    {
      "id": "string",
      "organization_id": "string",
      "parent_id": "string",
      "name": "string",
      "color": "string",
      "slug": "string",
      "system_key": "string",
      "is_system": true,
      "description": "string",
      "tax_reporting_code": "string",
      "tax_type": "vat",
      "tax_category": "standard",
      "tax_rate": 0,
      "exclude_from_reports": true,
      "sort_order": 0,
      "children_count": 0,
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
POST
/v1/categories

Create a new transaction category

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/categories" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "color": "string",    "slug": "string"  }'
{
  "data": {
    "id": "string",
    "organization_id": "string",
    "parent_id": "string",
    "name": "string",
    "color": "string",
    "slug": "string",
    "system_key": "string",
    "is_system": true,
    "description": "string",
    "tax_reporting_code": "string",
    "tax_type": "vat",
    "tax_category": "standard",
    "tax_rate": 0,
    "exclude_from_reports": true,
    "sort_order": 0,
    "children_count": 0,
    "created_at": "string",
    "updated_at": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
GET
/v1/categories/{id}

Get a single category by ID

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/categories/string"
{
  "data": {
    "id": "string",
    "organization_id": "string",
    "parent_id": "string",
    "name": "string",
    "color": "string",
    "slug": "string",
    "system_key": "string",
    "is_system": true,
    "description": "string",
    "tax_reporting_code": "string",
    "tax_type": "vat",
    "tax_category": "standard",
    "tax_rate": 0,
    "exclude_from_reports": true,
    "sort_order": 0,
    "children_count": 0,
    "created_at": "string",
    "updated_at": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}