The Sandbox environment will allow you to test your integration before moving into production.
You can retrieve mock bookings and test:
- moving booking statuses by accepting/rejecting
- assign drivers
- send driver events
- verify your search webhook for errors
You will find all the information about the sandbox here.
To help all partners overcome problems while testing the sandbox, we created for you a
Dispatch API Sandbox Template postman collection. This will allow you to test from booking collection, to assignment, up to Search Webhook.
Please find it below:
{
"info": {
"_postman_id": "e379e8ff-696f-4365-b519-2298d02d3af1",
"name": "Dispatch API Sandbox Template",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "10143160"
},
"item": [
{
"name": "Auth",
"item": [
{
"name": "Authentication",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.collectionVariables.set(\"OAUTH_TOKEN\", pm.response.json().access_token)"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "username",
"value": "{{CLIENT_ID}}",
"type": "string"
},
{
"key": "password",
"value": "{{SECRET_KEY}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"type": "text"
}
],
"url": {
"raw": "{{AUTH_URL}}/oauth2/token?grant_type=client_credentials",
"host": [
"{{AUTH_URL}}"
],
"path": [
"oauth2",
"token"
],
"query": [
{
"key": "grant_type",
"value": "client_credentials"
}
]
}
},
"response": []
}
]
},
{
"name": "Booking Management",
"item": [
{
"name": "Get all bookings",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v1/bookings",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"bookings"
],
"query": [
{
"key": "pickUpDateFrom",
"value": "2020-03-29T00:20:00",
"disabled": true
},
{
"key": "pickUpDateTo",
"value": "2020-04-03T23:30:00",
"disabled": true
},
{
"key": "status",
"value": "NEW",
"disabled": true
},
{
"key": "size",
"value": "2",
"disabled": true
},
{
"key": "changed",
"value": "true",
"disabled": true
},
{
"key": "after",
"value": "",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "Get single booking",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v1/bookings/45428410/50650583",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"bookings",
"45428410",
"50650583"
]
}
},
"response": []
},
{
"name": "Accept or Reject Booking",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"state_hash\": \"b4bb12fb8663a5cceac36155b466d82bcab3c8d4c260217686603cef7435b78e\",\r\n \"supplierResponse\": \"REJECT\"\r\n}"
},
"url": {
"raw": "{{API_URL}}/v1/bookings/45428410/50650583/responses",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"bookings",
"45428410",
"50650583",
"responses"
],
"query": [
{
"key": "supplierId",
"value": "14",
"disabled": true
},
{
"key": "pickUpDateFrom",
"value": "2020-08-15T17:20:00",
"disabled": true
},
{
"key": "pickUpDateTo",
"value": "2020-08-15T17:30:00",
"disabled": true
},
{
"key": "status",
"value": "NEW",
"disabled": true
},
{
"key": "size",
"value": "5",
"disabled": true
},
{
"key": "changed",
"value": "true",
"disabled": true
},
{
"key": "after",
"value": "",
"disabled": true
}
]
}
},
"response": []
}
]
},
{
"name": "Meeting Points",
"item": [
{
"name": "Create Meeting Point",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"test\",\n \"latitude\": 2.00,\n \"longitude\": 2.00,\n \"buildingLevel\": \"2\",\n \"pickupType\": \"DESK\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{API_URL}}/v1/bookings/987654321/314159264/meetingPoints",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"bookings",
"987654321",
"314159264",
"meetingPoints"
]
}
},
"response": []
}
]
},
{
"name": "Driver Management",
"item": [
{
"name": "Create Driver",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"first_name\":\"Rideways\",\r\n \"last_name\": \"Testing\",\r\n \"telephone_number\": \"+447987654321\",\r\n \"supplier_location_ids\": [\"62\"]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{API_URL}}/v1/drivers",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"drivers"
]
}
},
"response": []
},
{
"name": "Get All Drivers",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v1/drivers",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"drivers"
]
}
},
"response": []
},
{
"name": "Get Driver",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v1/drivers/f0fb5cc0-67c9-4477-be03-4ef08115374c",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"drivers",
"f0fb5cc0-67c9-4477-be03-4ef08115374c"
]
}
},
"response": []
},
{
"name": "Update Driver",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n\"first_name\": \"KD\",\r\n\"last_name\": \"SETH\",\r\n\"supplier_location_ids\":[\r\n \"246\",\r\n \"249\",\r\n \"248\",\r\n \"245\",\r\n \"62\",\r\n \"61\",\r\n \"63\",\r\n \"66\",\r\n \"65\",\r\n \"64\",\r\n \"72\",\r\n \"68\",\r\n \"71\",\r\n \"67\",\r\n \"70\",\r\n \"69\",\r\n \"100\",\r\n \"73\",\r\n \"75\",\r\n \"76\",\r\n \"77\",\r\n \"90\",\r\n \"78\",\r\n \"79\",\r\n \"81\",\r\n \"83\",\r\n \"84\",\r\n \"80\",\r\n \"87\",\r\n \"88\",\r\n \"86\",\r\n \"89\",\r\n \"91\",\r\n \"96\",\r\n \"95\",\r\n \"92\",\r\n \"93\",\r\n \"94\",\r\n \"97\",\r\n \"99\",\r\n \"98\",\r\n \"104\",\r\n \"102\",\r\n \"103\",\r\n \"107\",\r\n \"105\",\r\n \"247\",\r\n \"106\",\r\n \"209\",\r\n \"108\",\r\n \"110\",\r\n \"109\",\r\n \"111\",\r\n \"112\",\r\n \"113\",\r\n \"114\",\r\n \"115\",\r\n \"116\",\r\n \"244\",\r\n \"268\",\r\n \"118\",\r\n \"266\",\r\n \"119\",\r\n \"126\",\r\n \"82\",\r\n \"101\",\r\n \"117\",\r\n \"74\",\r\n \"122\",\r\n \"120\",\r\n \"121\",\r\n \"123\",\r\n \"60\",\r\n \"85\",\r\n \"124\",\r\n \"125\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{API_URL}}/v1/drivers/f0fb5cc0-67c9-4477-be03-4ef08115374c",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"drivers",
"f0fb5cc0-67c9-4477-be03-4ef08115374c"
]
}
},
"response": []
},
{
"name": "Delete Driver",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v1/drivers/f0fb5cc0-67c9-4477-be03-4ef08115374c",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"drivers",
"f0fb5cc0-67c9-4477-be03-4ef08115374c"
]
}
},
"response": []
},
{
"name": "Resend Activation Link",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"url": {
"raw": "{{API_URL}}/v1/drivers/f731f7b9-cd94-4fe4-bf39-fbf573358578/activation",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"drivers",
"f731f7b9-cd94-4fe4-bf39-fbf573358578",
"activation"
]
}
},
"response": []
},
{
"name": "Get Supplier Locations",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v1/locations",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"locations"
]
}
},
"response": []
}
]
},
{
"name": "Driver Events",
"item": [
{
"name": "Assign Driver - Deprecated",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json;charset=UTF-8"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \r\n \"state_hash\":\"1f3691da116af2419effad17de0e6b375be4a024facf9a0c932849740f1d5527\",\r\n \"driver_id\": \"28847398-7761-49f1-8628-7ec255e1c154\"\r\n}"
},
"url": {
"raw": "{{API_URL}}/v1/bookings/32300926/31584637/driver",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"bookings",
"32300926",
"31584637",
"driver"
],
"query": [
{
"key": "supplierId",
"value": "14",
"disabled": true
},
{
"key": "pickUpDateFrom",
"value": "2020-08-15T17:20:00",
"disabled": true
},
{
"key": "pickUpDateTo",
"value": "2020-08-15T17:30:00",
"disabled": true
},
{
"key": "status",
"value": "NEW",
"disabled": true
},
{
"key": "size",
"value": "5",
"disabled": true
},
{
"key": "changed",
"value": "true",
"disabled": true
},
{
"key": "after",
"value": "",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "V2 Assign Driver and Vehicle",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"stateHash\": \"1278666cea06a8fee6b77ecd27df4a64c3b3420856fb32cd15e42105d110ff2e\",\n \"driver\": \n {\n \"firstName\": \"Neil\",\n \"lastName\": \"Tarbuck\",\n \"telephoneNumber\":\"+447987654321\",\n \"photoURL\": \"example.com\"\n },\n \"vehicle\": {\n \"make\": \"Mercedes\",\n \"model\": \"A-Class\",\n \"registration\": \"RG19 CAR\",\n \"colour\": \"Silver\"\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{API_URL}}/v2/bookings/34383095/assignDriver",
"host": [
"{{API_URL}}"
],
"path": [
"v2",
"bookings",
"34383095",
"assignDriver"
]
}
},
"response": []
},
{
"name": "Send Driver Event",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"event_type\": \"DRIVER_DEPARTED_TO_PICKUP\",\r\n \"latitude\": -125.56,\r\n \"longitude\": -125.56,\r\n \"occurred_at\": \"2020-11-17T12:05:01Z\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{API_URL}}/v1/bookings/32300926/31584637/driver/events",
"host": [
"{{API_URL}}"
],
"path": [
"v1",
"bookings",
"32300926",
"31584637",
"driver",
"events"
]
}
},
"response": []
}
]
},
{
"name": "Webhooks",
"item": [
{
"name": "API Rates Webhook Validation",
"request": {
"method": "POST",
"header": [
{
"key": "Oauth-Client-Id",
"value": "{{WEBHOOK_CLIENT_ID}}",
"type": "text"
},
{
"key": "Oauth-Client-Secret",
"value": "{{WEBHOOK_CLIENT_SECRET}}",
"type": "text"
},
{
"key": "Supplier-URL",
"value": "{{WEBHOOK_URL}}",
"type": "text"
}
],
"url": {
"raw": "{{API_URL}}/v2/searchResults",
"host": [
"{{API_URL}}"
],
"path": [
"v2",
"searchResults"
]
}
},
"response": []
}
]
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{OAUTH_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "OAUTH_TOKEN",
"value": "",
"type": "string"
},
{
"key": "SECRET_KEY",
"value": ""
},
{
"key": "CLIENT_ID",
"value": ""
},
{
"key": "AUTH_URL",
"value": ""
},
{
"key": "API_URL",
"value": ""
},
{
"key": "WEBHOOK_CLIENT_ID",
"value": ""
},
{
"key": "WEBHOOK_CLIENT_SECRET",
"value": ""
},
{
"key": "WEBHOOK_URL",
"value": ""
}
]
}