Returns the pending route for the authenticated driver, including all stops, products, collections, and OSD data.
Endpoint: GET /api/route
Authentication: Required — headers: employee_id, api_token
Stop types:
delivery — standard customer stopbackhaul — second-to-last stop on the routewarehouse — stop ID 999, the return-to-home-base stopProduct / collection fields:
name — item name from PDITMNAM. May differ from description (PDPRDESC).required — from PDREQCOL. Whether the collection entry is mandatory.count_in_totes — whether this item counts toward the total return totes (true for RMA, RECLAMATION, SERVICE totes).Customer contact fields:
contact.email — customer contact email (PDCUSEML).contact.contact_email — GSC broker/manager contact email (CONTEMAIL).Example response:
{
"success": true,
"message": "Pending route found for driver.",
"data": {
"id": "17140",
"facility": "011",
"name": "ROUTE NAME",
"week_end": "20251031",
"last_updated": "2025-10-31T12:00:00.000Z",
"drivers": [
{ "id": "T0048", "name": "DRIVER NAME", "type": "driver" }
],
"stops": [
{
"id": 258,
"type": "delivery",
"updates": {
"status": "P",
"followup": false,
"delivered_by_driver_id": null,
"store_emp_id": null,
"store_emp_name": null,
"driver_comments": null,
"signature_id": null,
"overage_items": [],
"osd_emails": []
},
"osd_emails": [],
"customer": {
"id": "CUSTID",
"name": "STORE NAME",
"verify_returns": false,
"contact": { "phone": "5551234567", "email": "store@example.com", "contact_email": "gsc-contact@example.com",
"salesrep": { "id": "SR01", "name": "REP NAME", "phone": "5559876543" } },
"location": {
"address": ["123 Main St"], "city": "ANYTOWN", "state": "IL", "zip": "60601",
"coordinates": { "latitude": "41.8781", "longitude": "-87.6298" }
}
},
"invoices": [{ "id": "0806591", "date": "2025-10-31" }],
"products": [],
"collections": [
{
"id": "9010", "name": "PLASTIC TOTE", "description": "RECLAMATION TOTES",
"required": true, "count_in_totes": true,
"container_type": "PLASTIC TOTE", "section": "COLLECTIONS",
"quantity": 2, "action": { "type": "collect" }
}
]
}
]
}
}
Result:
...
Returns a list of employee IDs currently assigned to active (non-completed) routes.
Endpoint: GET /api/route/drivers
Authentication: None
Result:
...