Budget
User Budget
These requests are not in the current release
Get Budget
GET
https://switch-api-staging.herokuapp.com/user/budget
This endpoint returns a user's budget
Headers
auth_token
string
The format for auth_token is Bearer token_string
Create Budget
POST
https://switch-api-staging.herokuapp.com/user/budget
this endpoint helps users create a budget
Headers
auth_token
string
Teh format for auth_token is Bearer token_string
Request Body
allocations_attributes
string
an array of objects that takes in name, category and amount_kobo
e.g [{
name: “me”,
category: “from the list of
budget categories
”, amount_kobo: “us”
},{
name: “me”,
category: “from the list of
budget categories
”, amount_kobo: “us”
}]
total_kobo
string
total budget amount
Update User Budget
PATCH
https://switch-api-staging.herokuapp.com/user/budget
This endpoint allows user update their budget
Headers
auth_token
string
The format for auth_token is Bearer token_string
Request Body
total_kobo
string
total budget amount
allocations
string
takes in an arrqay of objects that takes in name, category and amount_kobo
Update user Budget
PUT
https://switch-api-staging.herokuapp.com/user/budget
This endpoint updates a user's budget
Headers
auth_token
string
The format for auth_token is Bearer token_string
Request Body
allocations
string
takes in a array of objects that takes in name, category and amount_kobo
total_kobo
string
total budget amount
Delete Budget
DELETE
https://switch-api-staging.herokuapp.com/user/budget
This endpoint deletes a user's budget
Headers
auth_token
string
The format for auth_token is Bearer token_string
Last updated
Was this helpful?