api for spends