Structure
JSON
{ "name": "", "description": "", "hooks": [ { "type": "order_created", "method": "", "endpoint": "" }, { "type": "order_updated", "method": "", "endpoint": "" } ], "authentication": { "grant_type": "", "endpoint": "", "credentials": {}, "header_format": "", "header_value_format": "" } }
Example
JSON
{ "name": "My Test Webhook", "description": "Webhook for testing", "hooks": [ { "type": "event_created", "method": "POST", "endpoint": "https://requestb.in/123" }, { "type": "event_removed", "method": "POST", "endpoint": "https://requestb.in/123" }, { "type": "event_updated", "method": "POST", "endpoint": "https://requestb.in/123" }, { "type": "order_created", "method": "POST", "endpoint": "https://requestb.in/123" }, { "type": "order_removed", "method": "POST", "endpoint": "https://requestb.in/123" }, { "type": "order_updated", "method": "POST", "endpoint": "https://requestb.in/123" }, { "type": "order_cancelled", "method": "POST", "endpoint": "https://requestb.in/123" } ], "authentication": { "grant_type": "client_credentials", "endpoint": "https://requestb.in/123", "credentials": { "client_id":"doo", "client_secret":"super-strong-pawwsord" }, "header_format": "Authorization", "header_value_format": "Bearer %ACCESS_TOKEN%" } }