List webhooks
Returns a list of your webook endpoints.
GET
/webhook/list.json
Returns a list of your webook endpoints.
GET
/webhook/list.json
$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->get('/webhook/list.json');
[
{
"type": 1,
"url": "http://my.application.tld/notify.php",
"name": "OnOrderPaid",
"id": "57d8240316f46aa43a0d18fe"
},
...
]
GET
/webhook/webhook.json?id={id}
id required (StoredenId) | Unique id of your webhook |
$storeden = new Storeden\Storeden($config);
$webhook_entity = $storeden->get('/webhook/webhook.json?id=5ac.....12');
{
"type": 1,
"url": "http:\/\/my.application.tld\/notify.php",
"name": "OnOrderPaid",
"id": "57d8240316f46aa43a0d18fe"
}
GET
/webhook/search.json?name={name}
name required (string) | Your webhook name |
$storeden = new Storeden\Storeden($config);
$webhook_entity = $storeden->get('/webhook/search.json?name=MyCustomWebhook');
{
"type": 1,
"url": "http:\/\/my.application.tld\/notify.php",
"name": "OnOrderPaid",
"id": "57d8240316f46aa43a0d18fe"
}
POST
/webhook/webhook.json
url required (string) | A valid endpoint url |
type required (int) | Webhook Type
|
name required (string) | Your webhook name |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['url'] = 'https://dummy.domain/webhook/endpoint';
$payload['type'] = 0;
$payload['name'] = 'MyCustomWebhook';
$webhook_operation = $storeden->post('/webhook/webhook.json', $payload);
{
"ok": 1,
"err": null,
}
DELETE
/webhook/webhook.json
id required (StoredenId) | Unique id of your webhook |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['id'] = '5ac......123';
$webhook_operation = $storeden->delete('/webhook/webhook.json', $payload);
{
"ok": 1,
"err": null,
}