mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-07-25 08:24:00 +02:00
title
| title |
|---|
| Balance Update |
Balance Update Endpoint
The balance update endpoint updates a balance and returns the updated balance resource.
For example, the /api/balance/1?usage=10.00 endpoint will update the balance usage attribute and return the updated balance resource.
URL
PUT|PATCH /api/balance/{id}
Authentication
Required Permission: update balance
Roles with Permission: Admin
Parameters
| Name | Required | Rules |
|---|---|---|
| date | No | date_format:Y-m-d |
| service | No | EnumValue {Other, DigitalOcean, AWS, Hover, WalkerServers} |
| frequency | No | EnumValue {Once, Annually, Biannually, Quarterly, Monthly} |
| usage | No | regex:/^-?\d+(.\d{1,2})?$/ |
| month_to_date_balance | No | regex:/^-?\d+(.\d{1,2})?$/ |
Response
{
balance: {
id: id,
date: "date",
service: "service",
frequency: "frequency",
usage: usage,
month_to_date_balance: month_to_date_balance,
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}