-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Liu Xiaoyu edited this page Nov 14, 2020
·
21 revisions
BACKEND API routes
req.body should contain a CareTaker
interface
response contains CareTakerSpecializesDetails
response contains CareTakerDetails[]
req.query = {
"start_date": "2020-11-06",
"end_date": "2020-11-10",
"pet_category": "dog"
}
response contains SpecializesDetails[]
Update of bid identified by <ct_email, pet_owner, pet_name, start_date> for lifecycle
sample req.body
{
"bid_status": {"confirmed", "closed", "reviewed"}
"rating" : 4.2
"feedback" : "The service was okay."
}
Deletion of bid identified by <ct_email, pet_owner, pet_name, start_date>
Creation of bid identified by <ct_email, pet_owner, pet_name, start_date>
sample req.body
{
"ct_email": "[email protected]",
"pet_owner": "[email protected]",
"pet_name": 'Crab',
"pet_category": 'dog'
"ct_price": 69.69,
"start_date": "2020-10-10",
"end_date": "2020-10-12",
"is_cash": true,
"credit_card": ,
"transport_method": {'pickup', 'deliver', 'pcs'},
}
For owner to view all bids he has made for any caretaker
sample response
Array of
{
"ct_email": "[email protected]",
"pet_name": 'Crab',
"pet_category": 'dog',
"ct_status": {1,2},
"ct_price": 69.69,
"ct_rating": 4.2,
"start_date": "2020-10-10",
"end_date": "2020-10-12",
"is_cash": true,
"transport_method": {'pickup', 'deliver', 'pcs'}
}
For caretaker to view all bids made for him/her
sample response
Array of
{
"pet_owner": "[email protected]",
"pet_name": 'Crab',
"pet_category": 'dog',
"ct_price": 69.69,
"start_date": "2020-10-10",
"end_date": "2020-10-12",
"is_cash": true,
"transport_method": 'pickup',
"owner_fullname": "jan",
"owner_address": "bla",
"owner_phone": 81000000,
"owner_avatar_link": ""
}