v1

latestOpenAPI 3.0.42026-07-14475158859.0 KB
DonationAccounting

add expense + regenerate donations page (Auth policies: ganjoor:donations)

post/api/donations/expense

Request body

idinteger

Id

expenseDatestring date-time

date

amountnumber double

amount

unitstring nullable

unit

descriptionstring nullable

description

Response

OK

idinteger

id - null for POST api -

recordDatestring date-time

record date

amountnumber double

donation amount (0 for old imported records)

unitstring nullable

"تومان" is good, Amount Unit, if you send another Unit it would be consumed with EXPENSES of the same Unit, if it send EMPTY it wotld not be consumed!

donorNamestring nullable

donor name

dateStringstring nullable

null for POST api - date: (donation dates have been collected in different formats, so instead of keeping their dates in a DateTime field I ought to use a string field)

amountStringstring nullable

null for POST api -amount string (avoiding to parse different formats of old html text)

remainingnumber double

null for POST api -remaining (it could be ignored later when our data has been normalized enough and be calculated using related data)

expenditureDescstring nullable

null for POST api -expenditure desc

importedRecordboolean

null for POST api - record is imported from old HTML text of donation page