Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) New Fee for a month
- localhost:3000/api/fees/new
- Body:-
- {
- "parent_group": "jxdmgt5i",
- "date": "01-2015"
- }
- Resp:-
- {
- "fee_collected_status": [
- {
- "_id": "5d6b795e3d37ef3aeaaa8486",
- "student_id": "5d13c24108383c00171e25ac",
- "submitted": false,
- "meta_data": "",
- "plan": "",
- "amount": ""
- },
- {
- "_id": "5d6b795e3d37ef3aeaaa8485",
- "student_id": "5d148988330c7a0017cb17ff",
- "submitted": false,
- "meta_data": "",
- "plan": "",
- "amount": ""
- }
- ],
- "_id": "5d6b795e3d37ef3aeaaa8484",
- "parent_group": "jxdmgt5i",
- "date": "01-2015",
- "__v": 0
- }
- 2) Fees Status
- localhost:3000/api/fees/status
- Body:-
- {
- "parent_group": "jxdmgt5i",
- "date": "01-2015"
- }
- If exists?
- Response code 200
- {
- "fee_collected_status": [
- {
- "_id": "5d6b795e3d37ef3aeaaa8486",
- "student_id": "5d13c24108383c00171e25ac",
- "submitted": false,
- "meta_data": "",
- "plan": "",
- "amount": ""
- },
- {
- "_id": "5d6b795e3d37ef3aeaaa8485",
- "student_id": "5d148988330c7a0017cb17ff",
- "submitted": false,
- "meta_data": "",
- "plan": "",
- "amount": ""
- }
- ],
- "_id": "5d6b795e3d37ef3aeaaa8484",
- "parent_group": "jxdmgt5i",
- "date": "01-2015",
- "__v": 0,
- "status_code": 200
- }
- If that record doesnt exist
- Response Code 404
- {
- "_id": "random_123",
- "parent_group": "jxdmgt5i",
- "date": "01-2045",
- "fee_collected_status": [],
- "status_code": 404
- }
- 3) Pay fees
- Body:-
- {
- "parent_group": "jxdmgt5i",
- "date": "01-2015",
- "student_id": "5d13c24108383c00171e25ac",
- "amount": "1212" . HARCODE AMUNT AS OF NOW
- }
- Resp:-
- {
- "fee_collected_status": [
- {
- "_id": "5d6b795e3d37ef3aeaaa8486",
- "student_id": "5d13c24108383c00171e25ac",
- "submitted": true,
- "meta_data": "",
- "plan": "monthly",
- "amount": "1212"
- },
- {
- "_id": "5d6b795e3d37ef3aeaaa8485",
- "student_id": "5d148988330c7a0017cb17ff",
- "submitted": false,
- "meta_data": "",
- "plan": "",
- "amount": ""
- }
- ],
- "_id": "5d6b795e3d37ef3aeaaa8484",
- "parent_group": "jxdmgt5i",
- "date": "01-2015",
- "__v": 0
- }
- 4) Custom Pay
- API:- localhost:3000/api/fees/custom-pay
- Body
- {
- "parent_group": "jxdmgt5i",
- "date1": "01-2015", //Starting Date
- "date2": "08-2015", //Ending Date
- "student_id": "5d13c24108383c00171e25ac",
- "date" : "01-2015", //Jis Window se custom pay kr rha
- "amount": "12212" //Rupees in string, Dont allow to press . (Paise me entry na ho)
- }
- Response:-
- This is the fee sheet of the month he is currently is
- {
- "fee_collected_status": [
- {
- "_id": "5d6b795e3d37ef3aeaaa8486",
- "student_id": "5d13c24108383c00171e25ac",
- "submitted": true,
- "meta_data": "From 01-2015 to 08-2015",
- "plan": "custom",
- "amount": "12212"
- },
- {
- "_id": "5d6b795e3d37ef3aeaaa8485",
- "student_id": "5d148988330c7a0017cb17ff",
- "submitted": false,
- "meta_data": "",
- "plan": "",
- "amount": ""
- }
- ],
- "_id": "5d6b795e3d37ef3aeaaa8484",
- "parent_group": "jxdmgt5i",
- "date": "01-2015",
- "__v": 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement