Webhooks
Get stats for a webhook
Stats for the webhook
GET /webhooks/{id}/stats HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
{
"successfulMessages": 100,
"failedMessages": 10
}
Get all webhooks for the current business
List of webhooks for the current business
GET /webhooks HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"url": "https://example.com/webhooks",
"description": {},
"events": [
"transaction.updated"
],
"isActive": true,
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T12:00:00.000Z"
}
]
Delete a webhook for the current business
The webhook has been successfully deleted
No content
The webhook with the given ID was not found
DELETE /webhooks/{id} HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
No content
Update a webhook for the current business
The URL where webhook events will be sent. Must be a valid URL with a TLD.
https://example.com/webhooks
Optional description for this webhook
Whether the webhook is active
true
The webhook has been successfully updated
The webhook with the given ID was not found
PATCH /webhooks/{id} HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 75
{
"url": "https://example.com/webhooks",
"description": "text",
"isActive": true
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"url": "https://example.com/webhooks",
"description": {},
"events": [
"transaction.updated"
],
"isActive": true,
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T12:00:00.000Z"
}
Get a webhook by id
Returns the webhook with the given ID
The webhook with the given ID was not found
GET /webhooks/{id} HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"url": "https://example.com/webhooks",
"description": {},
"events": [
"transaction.updated"
],
"isActive": true,
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T12:00:00.000Z"
}
Create a new webhook for the current business
The URL where webhook events will be sent. Must be a valid URL with a TLD.
https://example.com/webhooks
Optional description for this webhook
Whether the webhook is active
true
Example: true
The webhook has been successfully created.
POST /webhooks HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"url": "https://example.com/webhooks",
"description": "text",
"events": [
"transaction.updated"
],
"isActive": true
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"url": "https://example.com/webhooks",
"description": {},
"events": [
"transaction.updated"
],
"isActive": true,
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-01T12:00:00.000Z"
}
Get all supported webhook events
List of supported webhook events
GET /webhooks/events HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
{
"events": [
"transaction.updated"
]
}
Get all attempts for a webhook
List of attempts for a webhook
GET /webhooks/{id}/attempts HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
{
"url": "https://example.com/webhook/",
"response": "{}",
"responseStatusCode": 200,
"status": "SUCCESS",
"msgId": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2",
"id": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2",
"timestamp": "2019-08-24T14:15:22Z",
"msg": {
"eventType": "transaction.updated",
"payload": {},
"id": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2",
"timestamp": "2019-08-24T14:15:22Z"
}
}
Send example message to a webhook
The event type to send
transaction.updated
The message ID
POST /webhooks/{id}/send-example HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"eventType": "transaction.updated"
}
{
"messageId": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2"
}
Get the secret for a webhook endpoint
The secret for the webhook endpoint
GET /webhooks/{id}/secret HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
text
Last updated