GET /api/v1/contracts/grouped.GET /api/v1/partner/contracts/grouped: data.in_process and data.completed,{ date, contracts[] } (same list fields as the partner app, plus partner_status andhas_pending_extension_request on each row).start_date ascending (override with sort_by / sort_order). Use q to searchdescription, tool_brand, and tool_type. Each row includes step, payment_status (latest payment),partner.city from the partner's saved locations when present.curl --location '/api/v1/contracts?status=undefined&step=undefined&q=undefined&sort_by=undefined&sort_order=undefined&page=undefined&per_page=undefined' \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"in_process": [
{
"date": "2019-08-24",
"contracts": [
{
"id": 0,
"reference_code": "NKT-00000042",
"status": "draft",
"display_status": "draft",
"step": "schedule",
"kind": "installation",
"contract_escalation_stage": "partner",
"escalation_deadline_at": "2019-08-24T14:15:22.123Z",
"contract_escalation_countdown_active": true,
"partner_status": "assigned",
"partner": {
"id": 0,
"full_name": "string",
"picture": "http://example.com",
"ratings_summary": {
"overall_average": 0,
"total_reviews": 0
},
"city": "string"
},
"institution": {
"id": 0,
"name": "string",
"address": "string",
"city": "string",
"province": "string"
},
"sub_service": {
"id": 0,
"name": "string"
},
"contract_start_date": "2019-08-24",
"contract_start_time": "09:30",
"contract_end_date": "2019-08-24",
"contract_end_time": "17:00",
"schedule_start_date": "2019-08-24",
"schedule_start_time": "09:30",
"schedule_end_date": "2019-08-24",
"schedule_end_time": "17:00",
"approaching_scheduled_start": true,
"seconds_until_scheduled_start": 0,
"review": {
"overall_rate": 0
},
"total_amount": {
"value": 0,
"currency": "string",
"discount_amount": 0
},
"has_pending_extension_request": true,
"payment_deadline_at": "2019-08-24T14:15:22.123Z",
"payment_status": "unpaid",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
}
]
}
],
"completed": [
{
"date": "2019-08-24",
"contracts": [
{
"id": 0,
"reference_code": "NKT-00000042",
"status": "draft",
"display_status": "draft",
"step": "schedule",
"kind": "installation",
"contract_escalation_stage": "partner",
"escalation_deadline_at": "2019-08-24T14:15:22.123Z",
"contract_escalation_countdown_active": true,
"partner_status": "assigned",
"partner": {
"id": 0,
"full_name": "string",
"picture": "http://example.com",
"ratings_summary": {
"overall_average": 0,
"total_reviews": 0
},
"city": "string"
},
"institution": {
"id": 0,
"name": "string",
"address": "string",
"city": "string",
"province": "string"
},
"sub_service": {
"id": 0,
"name": "string"
},
"contract_start_date": "2019-08-24",
"contract_start_time": "09:30",
"contract_end_date": "2019-08-24",
"contract_end_time": "17:00",
"schedule_start_date": "2019-08-24",
"schedule_start_time": "09:30",
"schedule_end_date": "2019-08-24",
"schedule_end_time": "17:00",
"approaching_scheduled_start": true,
"seconds_until_scheduled_start": 0,
"review": {
"overall_rate": 0
},
"total_amount": {
"value": 0,
"currency": "string",
"discount_amount": 0
},
"has_pending_extension_request": true,
"payment_deadline_at": "2019-08-24T14:15:22.123Z",
"payment_status": "unpaid",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
}
]
}
]
},
"meta": {
"page": 1,
"per_page": 20,
"total_count": 100,
"total_pages": 5,
"prev_page": null,
"next_page": 2
}
}