# Extras

## Simulate a delivery action in test enviroment only.&#x20;

> Note that the actions need to be triggered in this order \
> 1\. ASSIGNED\
> 2\. PICKUP\
> 3\. PICKEDUP\
> 4\. DROPOFF\
> 5\. DROPEDOFF\
> 6\. ENDED<br>

```json
{"openapi":"3.0.0","info":{"title":"Swoove","version":"1.0.0"},"servers":[{"description":"Sandbox","url":"https://test.swooveapi.com"},{"description":"Production","url":"https://live.swooveapi.com"}],"paths":{"/delivery/simulate-action":{"post":{"tags":["Extras"],"summary":"Simulate a delivery action in test enviroment only. ","description":"Note that the actions need to be triggered in this order \n1. ASSIGNED\n2. PICKUP\n3. PICKEDUP\n4. DROPOFF\n5. DROPEDOFF\n6. ENDED\n","parameters":[{"name":"app_key","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Simulate Action For Deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"delivery_code":{"type":"string","default":"The delivery code from the delivery that you want to simulate the action for. The delivery should already be created for this to happen"},"simulate_status":{"type":"string","description":"- PENDING - The initial state of a delivery after creation - GROUPED - The delivery has been added to a group/trip  - AGENCY_ASSIGNED - The delivery has been assigned to an agency - ASSIGNED - The delivery has been assigned to a rider - ONHOLD - The delivery is on hold due to low funds or some other reason - PICKUP - The rider is on the way to pick up the items - PICKEDUP - The rider has picked up the items - DROPOFF - The rider is on the way to drop off the items - DROPEDOFF - The rider has dropped off the items - ENDED - The delivery is commpleted - CANCELLED - The delivery has been cancelled\n","enum":["ASSIGNED","PICKUP","PICKEDUP","DROPOFF","DROPEDOFF","ENDED"]},"secret_code":{"type":"string","description":"delivery secret code to be used in triggering ENDED status"}},"required":["delivery_code","simulate_status","secret_code"]}}}},"responses":{"200":{"description":"Success Responses On Delivery Simulation","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"message":{"type":"string","description":"Deliveries assigned to agent, trip created"},"responses":{"type":"string","default":null}}}]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiError400"},{"type":"object"}]}}}},"500":{"description":"Simulate acction failed"}}}}},"components":{"schemas":{"ApiResponse":{"type":"object","properties":{"success":{"type":"boolean","default":true,"description":"status of request true for success and false for failed request"},"code":{"type":"integer","format":"int32","default":200,"description":"code for reason for failure"},"message":{"type":"string","default":"Estimate completed"}}},"ApiError400":{"type":"object","properties":{"success":{"type":"boolean","default":false,"description":"status of request true for success and false for failed request"},"code":{"type":"integer","format":"int32","default":400,"description":"Data validation error code"},"message":{"type":"string","default":"A certain field was expected but was null or invalid"},"responses":{"type":"string","nullable":true,"default":null}}}}}}
```
