Webhooks

Get webhook stats

get

Get stats for a webhook

Authorizations
Path parameters
idstringRequired
Responses
200
Stats for the webhook
application/json
get
GET /webhooks/{id}/stats HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
{
  "successfulMessages": 100,
  "failedMessages": 10
}

Get all webhooks

get

Get all webhooks for the current business

Authorizations
Responses
200
List of webhooks for the current business
application/json
get
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

delete

Delete a webhook for the current business

Authorizations
Path parameters
idstringRequired
Responses
204
The webhook has been successfully deleted
delete
DELETE /webhooks/{id} HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*

No content

Update a webhook

patch

Update a webhook for the current business

Authorizations
Path parameters
idstringRequired
Body
urlstring · url · max: 2048Required

The URL where webhook events will be sent. Must be a valid URL with a TLD.

Example: https://example.com/webhooks
descriptionstring · max: 1000Optional

Optional description for this webhook

isActivebooleanOptional

Whether the webhook is active

Example: true
Responses
200
The webhook has been successfully updated
application/json
patch
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

get

Get a webhook by id

Authorizations
Path parameters
idstringRequired
Responses
200
Returns the webhook with the given ID
application/json
get
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

post

Create a new webhook for the current business

Authorizations
Body
urlstring · url · max: 2048Required

The URL where webhook events will be sent. Must be a valid URL with a TLD.

Example: https://example.com/webhooks
descriptionstring · max: 1000Optional

Optional description for this webhook

isActivebooleanOptional

Whether the webhook is active

Default: trueExample: true
Responses
201
The webhook has been successfully created.
application/json
post
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

get

Get all supported webhook events

Authorizations
Responses
200
List of supported webhook events
application/json
get
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

get

Get all attempts for a webhook

Authorizations
Path parameters
idstringRequired
Responses
200
List of attempts for a webhook
application/json
get
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

post

Send example message to a webhook

Authorizations
Path parameters
idstringRequired
Body
eventTypestringRequired

The event type to send

Example: transaction.updated
Responses
201
The message ID
application/json
post
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 endpoint secret

get

Get the secret for a webhook endpoint

Authorizations
Path parameters
idstringRequired
Responses
200
The secret for the webhook endpoint
application/json
Responsestring
get
GET /webhooks/{id}/secret HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
text

Last updated