# Driver, vehicle and tracking

> Transfer company track · Core · Certification test case

Proves your system assigns a driver and a vehicle to a journey and, if you use your own system instead of the Transferz Driver App, reports the driver's progress and position until the journey is completed.

## How it is verified

- **Webhook acknowledged**: Transferz delivered the event and your endpoint answered with success.
- **Request observed**: Your own system sent the expected call to staging for this case's journey or booking, with the required fields, and got a success response.

## Instructions

1. This section starts once Direct assignment has passed. It uses the same hub and address, with the journey in the opposite direction.
2. The portal creates a new test journey and assigns it directly to your transfer company. Answer the event with a 2xx response.
3. Right after that, the portal moves the pickup time to now, so the journey can be driven and completed during the test. Answer the pickup time change event with a 2xx response; there is nothing else to do.
4. Assign a driver, then a vehicle, to that journey from your system. The portal shows the journey ID and waits for your calls; there is no time limit.
5. Transferz then moves the journey to PLANNED. Answer the status event with a 2xx response.
6. Tell the portal whether your drivers use the Transferz Driver App. If they do, the section is done.
7. Otherwise, from your system: set the journey to DRIVER_UNDERWAY, send at least 3 different driver positions, answer the DRIVER_ARRIVED status event (Transferz sets this status), set the journey to JOURNEY_IN_PROGRESS and complete the journey. Send the driver's latitude and longitude with every status update and with completing the journey.
8. Each event step waits up to 5 minutes for a 2xx answer; a 2xx to an event Transferz delivers late still counts.
9. Calls made with Try it in the portal don't count.

## Pass criteria

- Your endpoint answers journeyFleetAssignedEvent, journeyExecutionDetailsUpdatedEvent and the PLANNED status event with 2xx, each within 5 minutes (a 2xx to an event Transferz delivers late still counts)
- Successful assign-driver and assign-vehicle calls for the test journey from your system
- With your own system: DRIVER_UNDERWAY, at least 3 different driver positions, the DRIVER_ARRIVED status event answered with 2xx within 5 minutes, JOURNEY_IN_PROGRESS and completing the journey, every status update and the completion with a valid position

## Links

- Guide: [Assign driver and vehicle](https://developers.transferz.com/guides/transfer-companies/assign-driver-and-vehicle)
- Endpoint: [PUT Assign to driver](https://developers.transferz.com/reference/transfer-companies/assign-driver) (`PUT /journeys/{id}/assign-driver`)
- Endpoint: [PUT Assign vehicle](https://developers.transferz.com/reference/transfer-companies/assign-vehicle) (`PUT /journeys/{id}/assign-vehicle`)
- Endpoint: [PUT Update status to 'driver underway'](https://developers.transferz.com/reference/transfer-companies/set-driver-underway) (`PUT /journeys/{id}/status/driver-underway`)
- Endpoint: [PUT Update driver position](https://developers.transferz.com/reference/transfer-companies/update-driver-position) (`PUT /journeys/{id}/driver-position`)
- Endpoint: [PUT Update status to 'in progress'](https://developers.transferz.com/reference/transfer-companies/set-journey-in-progress) (`PUT /journeys/{id}/status/in-progress`)
- Endpoint: [PUT Complete journey](https://developers.transferz.com/reference/transfer-companies/complete-journey) (`PUT /journeys/{id}/complete`)

Running this case needs sign-in to the developer portal. Calls from the portal's Try it console do not count.
