{"_id":"5741d5ce71cca10e00621014","category":{"_id":"5741d5ab28f5fb0e0063ed36","__v":0,"project":"543005c87d487022005b3fa8","version":"543005c87d487022005b3fab","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-22T15:52:11.255Z","from_sync":false,"order":9999,"slug":"web-hooks","title":"Web Hooks"},"version":{"_id":"543005c87d487022005b3fab","__v":6,"project":"543005c87d487022005b3fa8","createdAt":"2014-10-04T14:35:52.362Z","releaseDate":"2014-10-04T14:35:52.362Z","categories":["543005c87d487022005b3fac","54345156edce04080040964e","543ee0c055bb1008000955b6","54c82a78ab706219009e0656","57390d0e1f4b740e00b06cb2","5741d5ab28f5fb0e0063ed36"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"543005c87d487022005b3fa8","user":"543005a67d487022005b3fa7","__v":6,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-22T15:52:46.736Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"When you specify a WebHook URL with any created booking by setting a URL in the \"webhook\" variable you will receive the following responses via GET on status changes:\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Variable\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"type\",\n    \"0-1\": \"This is the type of message being sent. Seek Types below for a breakdown of different types.\",\n    \"1-0\": \"message\",\n    \"1-1\": \"This is a full text description of the type, this may contain ETA's, staff name, driver information, etc. This is variable and not standardized and should only be used to supplement a public front panel.\",\n    \"2-0\": \"date\",\n    \"2-1\": \"This is a UNIX timestamp of when this action took place. Webhooks may be up to 60 seconds delayed depending on network conditions.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Types\"\n}\n[/block]\nBelow are the different types you may receive and their descriptions.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Type\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"JOBSTARTED\",\n    \"0-1\": \"This means that the driver has accepted this job and is now on the way.\",\n    \"1-0\": \"QUEUED\",\n    \"1-1\": \"This means that the job is now queued for an available driver.\",\n    \"2-0\": \"APPROACHING\",\n    \"2-1\": \"This means that the driver is now approaching the customers pickup location. This can also be considered the same as the \\\"Waiting at Pickup\\\" marker used by other systems.\",\n    \"3-0\": \"PICKEDUP\",\n    \"3-1\": \"This means that the driver has picked up the passenger, or as known in other systems, the \\\"Passenger-On-Board\\\" notice.\",\n    \"4-0\": \"COMPLETED\",\n    \"4-1\": \"This means that the journey has been completed successfully.\",\n    \"6-0\": \"DELAY\",\n    \"6-1\": \"This is notice that there is a delay in picking up the customer. The message will contain the amount of time and a reason for the delay.\",\n    \"7-0\": \"MODIFIED\",\n    \"7-1\": \"This means the job has been modified by the fleet, the message will contain information about what has been modified, however we recommend calling the \\\"check_live_bookings\\\" API to get live data.\",\n    \"8-0\": \"REFUSED\",\n    \"8-1\": \"As you provided a WebHook during your API booking, the fleet will have the option to refuse the booking. This should be treated as a cancellation with the fleet only, if you hold a booking yourself, this should remain intact and refer it to either another fleet or continue to manage it yourself.\",\n    \"5-0\": \"CANCELLED\",\n    \"5-1\": \"This means that the ride has been cancelled by the fleet, the message will contain the reason for the cancellation. You should consider the booking cancelled within your system also.\",\n    \"9-0\": \"CONFIRMED\",\n    \"9-1\": \"If the booking requires confirmation, this message will store on the fleets system that the remote fleet has confirmed and accepted this booking.\"\n  },\n  \"cols\": 2,\n  \"rows\": 10\n}\n[/block]","excerpt":"This contains all the information and data sent back to your server via a GET HTTP request on certain action changes.","slug":"booking-web-hooks","type":"basic","title":"Booking Web Hooks"}

Booking Web Hooks

This contains all the information and data sent back to your server via a GET HTTP request on certain action changes.

When you specify a WebHook URL with any created booking by setting a URL in the "webhook" variable you will receive the following responses via GET on status changes: [block:parameters] { "data": { "h-0": "Variable", "h-1": "Description", "0-0": "type", "0-1": "This is the type of message being sent. Seek Types below for a breakdown of different types.", "1-0": "message", "1-1": "This is a full text description of the type, this may contain ETA's, staff name, driver information, etc. This is variable and not standardized and should only be used to supplement a public front panel.", "2-0": "date", "2-1": "This is a UNIX timestamp of when this action took place. Webhooks may be up to 60 seconds delayed depending on network conditions." }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Types" } [/block] Below are the different types you may receive and their descriptions. [block:parameters] { "data": { "h-0": "Type", "h-1": "Description", "0-0": "JOBSTARTED", "0-1": "This means that the driver has accepted this job and is now on the way.", "1-0": "QUEUED", "1-1": "This means that the job is now queued for an available driver.", "2-0": "APPROACHING", "2-1": "This means that the driver is now approaching the customers pickup location. This can also be considered the same as the \"Waiting at Pickup\" marker used by other systems.", "3-0": "PICKEDUP", "3-1": "This means that the driver has picked up the passenger, or as known in other systems, the \"Passenger-On-Board\" notice.", "4-0": "COMPLETED", "4-1": "This means that the journey has been completed successfully.", "6-0": "DELAY", "6-1": "This is notice that there is a delay in picking up the customer. The message will contain the amount of time and a reason for the delay.", "7-0": "MODIFIED", "7-1": "This means the job has been modified by the fleet, the message will contain information about what has been modified, however we recommend calling the \"check_live_bookings\" API to get live data.", "8-0": "REFUSED", "8-1": "As you provided a WebHook during your API booking, the fleet will have the option to refuse the booking. This should be treated as a cancellation with the fleet only, if you hold a booking yourself, this should remain intact and refer it to either another fleet or continue to manage it yourself.", "5-0": "CANCELLED", "5-1": "This means that the ride has been cancelled by the fleet, the message will contain the reason for the cancellation. You should consider the booking cancelled within your system also.", "9-0": "CONFIRMED", "9-1": "If the booking requires confirmation, this message will store on the fleets system that the remote fleet has confirmed and accepted this booking." }, "cols": 2, "rows": 10 } [/block]