You can provide a webhook URL where Radaro will send all events about status changes of your jobs.
Web hook URL can be specified in the merchant UI: Settings -> General -> API Settings.
To provide security during the data exchange, webhook requests have a verification token which can be used to confirm that the incoming request is actually coming from Radaro.
Radaro incorporates verification token directly into any event that Radaro sends out as JSON, and you will be able to check it before considering webhook valid.
You can find you verification token in the merchant UI, right below the input for the webhook URL (Settings -> General -> API Settings).
Status updates events are sent immediately after the status of any order was changed or when a new order has been created.
The format of the UPDATE event, which happens when some of the details about specific existing job have been changed, for example, status was changed, or driver was assigned, or manager changed the description, etc.
In that case, we mark it with "event_type": "updated"
and apart from sending the updated job info, we also provide a summary on the changed fields, i.e.
"new_values": {"status": "failed"},
"old_values": {"status": "not_assigned"},
That would mean that the job moved from Not Assigned status, to the Failed status for some reason.
Please Note
If you are using the “status” field from the webhook event to get any further information, you should keep in mind that there’s a case when Radaro can send two events with"status"
:"delivered"
– first event with this status will be sent to your webhook URL when driver sets job’s status to be Completed, and the second event – when customer leaves rating (job’s status remains Completed, but now the job has customer’s rating/comment). To distinguish events, it’s better to look at the“new_values”
field, where Radaro provides info on which job parameter was changed – status:
"new_values": {"status": "delivered"}
or customer has confirmed job completion by leaving a review:
"new_values": {"is_confirmed_by_customer": True}
Using this fields you may avoid, for example, the confusion on why two events with the same jobs statuses have different “updated_at” values.