---
title: "Get Db Rules"
method: GET
path: "/api/payday/db-rules"
tags: ["Payday"]
deprecated: true
---

# Get Db Rules

`GET /api/payday/db-rules`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/payday/db-rules`
- Auth: HTTP bearer

> **Deprecated.**

Fetch the user's payday allocation rules, with the timeline they produce.

The timeline ships with the rules so the payday screen can render on mount
from this one response instead of following it with POST /rules/{user_id}.

## Response `200`

Successful Response

- DBRulesResponse
  - `rules` PaydayRule[], required
    - `id` string, required
    - `type` string, required
    - `amount` number, required
    - `timing` string, required
    - `timing_label` string, required
    - `active` boolean, required
    - `description` string, nullable
    - `target_id` string, nullable
    - `target_label` string, nullable
    - `virtual_budget_category` string, nullable
    - `pot_category` string, nullable
    - `goal_id` string, nullable
    - `goal_name` string, nullable
  - `total_allocated` number
  - `remaining_after_rules` number
  - `timeline` TimelineEvent[]
    - `order` integer, required
    - `day` integer, required
    - `label` string, required
    - `amount` number, required
    - `type` string, required
    - `icon` string, required
    - `color_key` string, required
  - `budget_proposals` BudgetProposal[]
    - `category` string, required
    - `proposed_limit` number, required
    - `current_limit` number, nullable
    - `source` string, required

---

[API](https://skmtc.dev/earmarkiq/apis/earmark-api.md) · [All operations](https://skmtc.dev/earmarkiq/apis/earmark-api/llms.txt) · [OpenAPI document](https://skmtc.dev/earmarkiq/apis/earmark-api/revisions/4a2c41907105?raw)
