POST /mock/:moveId
caution
This endpoint is only available in the test environment and will return an error if used in production.
Execute a named mock test sequence for the move id passed in the url.
Example Request
POST /v1/mock/23795
{
"sequence": "new-to-successful",
"interval": 3000
}
Body Params
Field | Type | Required? | Description |
---|---|---|---|
sequence | String | Required* | Choose from one of the named sequences listed below to execute changes to the move id specified on the endpoint URL. |
interval | Number | Optional | If you would like to simulate the process of changes happening to the move over a period of time then add an interval of milliseconds between each step in the sequence. If nothing is specified a default interval of 1000 ms (1 sec) will be used. |
accessorialCode | String | Optional | If the named sequence is add-charge , this parameter is required. It needs to be one of our accessorialCodes |
amount | Number | Optional | If the named sequence is add-charge , this defines the amount for the accessorial to add to the move. |
Mock Sequences
Sequence | Description |
---|---|
new-to-successful | Progress a move from new status all the way up through move.delivery.successful changing each status one at a time with the specified interval delayed between each change. Times of each state change will be updated using common durations added to the planned pickup time of the move. Sample vehicle photos will be added to the move to simulate the driver completing the inspection steps on the move. This sequence will emit webhook events for any subscribed event types that get triggered. |
new-to-delivery-started | Progress a move from dispatched status to delivery started with photos captured during the pickup phase. This is a good one to use if you want to simulate making a cancelation request while in the middle of a move. |
pending-to-partial | Change the cancel status of a move to move.cancel.partial state. This is intended to be used with a move id that is already in a move.cancel.pending state by first calling the /cancelation endpoint. This sequence will emit events for any subscribed event types that get triggered. |
pending-to-failed | Change the cancel status of a move to move.cancel.failed state. This is intended to be used with a move id that is already in a move.cancel.pending state by first calling the /cancelation endpoint. A failed cancelation request would come from a move that has already proceeded beyond th epoint that we can cancel it (already picked up the vehicle for instance). Use this sequence along with the new-to-delivery-started sequence for instance. This sequence will emit events for any subscribed event types that get triggered. |
pending-to-success | Change the cancel status of a move to move.cancel.successful state. This is intended to be used with a move id that is already in a move.cancel.pending state by first calling the /cancelation endpoint. To simulate a real world scenario, leave the move is dispatched status, then call the cancelation endpoint, then call this sequence to simulate our dispatcher approving the cancelation request because hte vehicle has not yet been picked up. This sequence will emit events for any subscribed event types that get triggered. |
return-ready | Trigger the system to emit the move.return.ready webhook by simulating the assignment and then scanning of a hangtag in the dealership. First an example hangtag's status is changed to assign the move id specified in the URL, while setting the status of the hangtag to assigned . Next the hangtag's status is changed to scanned to simulate a dealer scanning the hangtag. Finally the status of the hangtag is changed back to unassigned available to be used on the next mock test. It's important to note that this sequence will not actually change the status of the move id specified in the URL. It will only change the status of a sample hangtag. It depends upon a single test hangtag thus calling this multiple times in parallel will produce unexpected results. |
class-three-charge | Triggers the same sequence as new-to-successful , with the only change being that a weight over 11,000 lbs is added to the move as part of the pickup inspection. This will cause the system to flag the move as being in the "class 3" weight category. Moves with a class 3 weight are charged a higher rate, due to the higher insurance cost of moving class 3 vehicles. |
delay-charge | Triggers the same sequence as new-to-successful , then adds a delay charge. Delay charges are added when customer-caused delays of a significant duration occur and our drivers need to be conpensated for the extra time. |
fuel-stop-charge | Triggers the same sequence as new-to-successful , but halfway through, a fuel charge accessorial is added to simulate a driver stopping for gas. |
partial-cancel-charge | Change the cancel status of a move to move.cancel.partial state. This is intended to be used with a move id that is already in a move.cancel.pending state by first calling the /cancelation endpoint. After the move is canceled, a partial charge will be charged to the move, which covers the cost of completing part of the move |
roadside-tow-charge | This sequence simulates a move where the vehicle breaks down and needs both roadside assistance and a tow. In this scenario, the breakdown is determined to be the responsiblity of the customer, and the roadside and tow charges are added to the cost of the move. |
surge-ride-charge | This sequence completes a move, and then adds an additional charge for "surge" pricing. Surge charges are added only when a rideshare parter charges one to HopDrive. |
add-charge | Adds a custom charge to a move. Useful for testing adhoc charges between delivery-successful and settled. |
settle-move | Manually settles a move, a move is automatically settled 7 days after pickup time. |
reset | Resets all status change times on the move, deletes all photos, then set the status back to move.dispatched . Deletes any charges added to the move. |
Example Response
The mock sequence is executed in a batch job that can run for up to 15 minutes.
200 /v1/mock/23795
{
"batch_id": "c30e4af0-34a7-11ed-ab2a-f55c1a72f61e",
"input": {
"moveId": 13289,
"options": {
"interval": 3000,
"sequence": "new-to-successful"
}
},
"trigger_type": "mock"
}