{
  "info": {
    "name": "CashPit API Collection",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Signup",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"full_name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"password\": \"Secret@123\",\n  \"user_consent\": 1,\n  \"device_details\": \"iOS 18.0|1.0.0\",\n  \"mobile_number\": \"+15551234567\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=signup",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "signup"
            }
          ]
        }
      }
    },
    {
      "name": "Account verification",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"user_id\": 1,\n  \"activation_code\": \"12345\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=account_verification",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "account_verification"
            }
          ]
        }
      }
    },
    {
      "name": "Login",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"email\": \"john@example.com\",\n  \"password\": \"Secret@123\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=login",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "login"
            }
          ]
        }
      }
    },
    {
      "name": "Change user password",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"old_password\": \"Secret@123\",\n  \"new_password\": \"Secret@456\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=change_password",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "change_password"
            }
          ]
        }
      }
    },
    {
      "name": "Enable disable 2 factor Authentication",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"enable_2fa\": 1,\n  \"verification_method_2fa\": \"text_msg\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=toggle_2fa",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "toggle_2fa"
            }
          ]
        }
      }
    },
    {
      "name": "Logout user",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=logout",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "logout"
            }
          ]
        }
      }
    },
    {
      "name": "deposit_to_main_balance",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"deposit_amount\": 500\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=deposit_to_main_balance",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "deposit_to_main_balance"
            }
          ]
        }
      }
    },
    {
      "name": "withdraw_from_main_balance",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"amount\": 100,\n  \"notes\": \"ATM withdrawal\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=withdraw_from_main_balance",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "withdraw_from_main_balance"
            }
          ]
        }
      }
    },
    {
      "name": "Create CashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_name\": \"Rent\",\n  \"category\": \"rent\",\n  \"target_amount\": 1200,\n  \"initial_deposit\": 100,\n  \"cashpit_color\": \"blue\",\n  \"lock_cashpit_until\": \"2026-05-01 12:00:00\",\n  \"auto_deposit_percent\": 25\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=create_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "create_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "Show all CashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=show_all_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "show_all_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "Deposit to cashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1,\n  \"amount\": 50\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=deposit_to_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "deposit_to_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "Withdraw from CashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1,\n  \"amount\": 25\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=withdraw_from_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "withdraw_from_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "Lock a CashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1,\n  \"lock_until_date_time\": \"2026-05-05 12:00:00\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=lock_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "lock_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "Unlock a CashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=unlock_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "unlock_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "Get cashPit details",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=get_cashpit_details",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "get_cashpit_details"
            }
          ]
        }
      }
    },
    {
      "name": "Delete cashPit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=delete_cashpit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "delete_cashpit"
            }
          ]
        }
      }
    },
    {
      "name": "add/update merchant auto-pay",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"cashpit_id\": 1,\n  \"merchant_name\": \"ABC Apartments\",\n  \"merchant_account_number\": \"1234567890\",\n  \"merchant_routing_number\": \"021000021\",\n  \"merchant_auto_pay_enable\": 1,\n  \"merchant_monthly_payment_date\": \"2026-05-02 10:00:00\",\n  \"merchant_monthly_payment_amount\": 1200\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=merchant_autopay",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "merchant_autopay"
            }
          ]
        }
      }
    },
    {
      "name": "request a debit card",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"mobile_number\": \"+15551234567\",\n  \"shipping_address\": \"123 Main Street, New York, NY\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=request_debit_card",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "request_debit_card"
            }
          ]
        }
      }
    },
    {
      "name": "debit_card_simulate_spend",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"amount\": 23.5,\n  \"note\": \"Coffee shop\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=debit_card_simulate_spend",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "debit_card_simulate_spend"
            }
          ]
        }
      }
    },
    {
      "name": "debit card set spending limit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"amount\": 500,\n  \"spending_limit_until_date\": \"2026-06-01\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=debit_card_set_spending_limit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "debit_card_set_spending_limit"
            }
          ]
        }
      }
    },
    {
      "name": "Report stolen debit card",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=report_stolen_debit_card",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "report_stolen_debit_card"
            }
          ]
        }
      }
    },
    {
      "name": "Unfreeze debit card",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=unfreeze_debit_card",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "unfreeze_debit_card"
            }
          ]
        }
      }
    },
    {
      "name": "Get debit card details",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=get_debit_card_details",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "get_debit_card_details"
            }
          ]
        }
      }
    },
    {
      "name": "Show direct deposit info",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=show_direct_deposit_info",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "show_direct_deposit_info"
            }
          ]
        }
      }
    },
    {
      "name": "Add budget_income",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"income_amount\": 3000,\n  \"income_frequency\": \"monthly\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=add_budget_income",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "add_budget_income"
            }
          ]
        }
      }
    },
    {
      "name": "Update budget_income",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"access_token\": \"{{access_token}}\",\n  \"user_id\": 1,\n  \"income_amount\": 3500,\n  \"income_frequency\": \"biweekly\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/index.php?endpoint=update_budget_income",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "index.php"
          ],
          "query": [
            {
              "key": "endpoint",
              "value": "update_budget_income"
            }
          ]
        }
      }
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "http://localhost/cashpit_app"
    },
    {
      "key": "access_token",
      "value": ""
    }
  ]
}