Hi, I am trying to make my own route for an incoming web hook.
The route itself works, but the sender says it is a 404 Error and I have difficulties to update my side, if I am not logged in. The idea is to update a tracking field for shipped parcels.
[ 'routes' => function(){ return [
[
'pattern' => 'webhook',
'action' => function(){
$page = site()->page('orders')->children()->listed()->search('224229339','parcel_id');
$obj = new req;
$data = $obj->data();
page($page)->update([
'tracking' => json_encode($data)
], 'en');
$return = (object)[
"action" => "integration_connected",
"timestamp" => time()
];
$body = json_encode( $return );
return Response::json(
$body,
200);
}
]
];}]
The id is later coming from the web hook, this is just for testing purposes.
Any help is appreciated, the web hook endpoint is new for me.
Thanks in advance