$kind: http-request
url: "{{Local_URL}}accounts/budgets"
method: POST
headers:
  username: textugapp
  apiKey: db03834002ed60dfa53963cc66bbeeb730142a16fd1bbbb6e1ebca862a798359
body:
  type: json
  content: "//Operational\r

    //Allocating - Account categories (Income, and Expense Categories\r

    //Items - Filter category ledgers when adding items\r

    //Item period splits\r

    {\r

    \    //\"name\": \"Q1 2024 Operational Budget\",\r

    \    \"fiscal_year_id\": \"2bb336ac-0d91-4689-99a5-d3d8810ca878\",\r

    \    \"currency_id\": \"770458bc-12dd-48cc-b467-519a2e6ee7b0\",\r

    \    \"description\": \"Quarter 1 operational budget for 2024\",\r

    \    \"parent_id\": \"\",\r

    \    \"budget_category\": \"Operational\", //Operational or Capital
    Expenditure\r

    \    \"allocations\": [\r

    \        {\r

    \            \"account_category_id\": 37,\r

    \            \"allocated_amount\": 40000,\r

    \            \"description\": \"Sales department allocation\",\r

    \            \"items\": [\r

    \                {\r

    \                    \"amount\": 12000.00,\r

    \                    \"type\": \"Expense\",\r

    \                    \"coa\": \"23\",\r

    \                    \"description\": \"Sales Expenses\",\r

    \                    \"period_splits\": {\r

    \                        \"period_type\": \"Monthly\",\r

    \                        \"splits\": [\r

    \                            {\r

    \                                \"period_start\": \"2025-01-01\",\r

    \                                \"period_end\": \"2025-04-30\",\r

    \                                \"period_amount\": 4000\r

    \                            },\r

    \                            {\r

    \                                \"period_start\": \"2025-05-01\",\r

    \                                \"period_end\": \"2025-08-30\",\r

    \                                \"period_amount\": 4000\r

    \                            },\r

    \                            {\r

    \                                \"period_start\": \"2025-09-01\",\r

    \                                \"period_end\": \"2025-12-31\",\r

    \                                \"period_amount\": 4000\r

    \                            }\r

    \                        ]\r

    \                    }\r

    \                },\r

    \                {\r

    \                    \"amount\": 28000.00,\r

    \                    \"type\": \"Expense\",\r

    \                    \"coa\": \"15\",\r

    \                    \"description\": \"Interest on loans\",\r

    \                    \"period_splits\": {\r

    \                        \"period_type\": \"Yearly\",\r

    \                        \"splits\": [\r

    \                            {\r

    \                                \"period_start\": \"2025-01-01\",\r

    \                                \"period_end\": \"2025-12-31\",\r

    \                                \"period_amount\": 28000\r

    \                            }\r

    \                        ]\r

    \                    }\r

    \                }\r

    \            ]\r

    \        }\r

    \      \r

    \        \r

    \    ]\r

    }"
auth:
  type: bearer
  credentials:
    token: "{{sahara_local_token}}"
order: 1000
