Webhook API
The Webhook object represents an endpoint of an external system that should be invoked for specific events within the Marketplace Platform. The object contains the following attributes:
id
string
The webhook's unique identifier.
Example: WBH-5433-8787
href
string
The relative reference to the object within the API.
Example: /notifications/webhooks/WBH-5433-8787
description
string
A description of the webhook.
Example: Webhook for purchase order draft validation for Microsoft Office 365.
status
enum
The status of the webhook.
Possible values: Enabled
or Disabled
.
type
enum
Defines what for webhook is designed for.
Possible enum values:
ValidatePurchaseOrderDraft
ValidatePurchaseOrderQuerying
ValidateChangeOrderDraft
ValidateTerminateOrder
ValidateRequest
ValidateAccount
SelectOrderLines
objectType
enum
An object that triggers the webhook event.
Possible enum values: Order
,
Request
, or
Account
.
url
string
The webhook endpoint URL. Only https:// endpoints are allowed.
Example: https://some-api.vendor.com/order-validation
criteria
object
A set of key-value objects required in the webhook payload to trigger the webhook call.
Example:
{ "product.id": "PRD-6233-9657-3232" }
statistics
The statistical and debug information regarding webhook executions.
Example:
{
"total": 1234,
"successes": 1132,
"failures": 101,
"failuresSinceLastSuccess": 2
}
lastSuccess
The last successful call to webhook URL.
Example:
{
"success": true,
"callTime": "2024-12-12T11:11:11",
"responseTime": "2024-12-12T11:12:03",
"httpStatusCode": "200",
"reasonPhrase": "OK",
"headers": {
"Date": "Wed, 15 May 2024 10:16:56 GMT",
},
"error": null,
"response": { ... }
}
lastFailure
Last failed call to webhook URL.
Example:
{
"success": true,
"callTime": "2024-12-12T11:11:11",
"responseTime": "2024-12-12T11:12:03",
"status": "401",
"reasonPhrase": "Auth Error",
"response": "Unauthenticated",
"headers": {
"Date": "Wed, 15 May 2024 10:16:56 GMT",
},
"error": "JWT Token was invalid",
"response": null,
}
lastCall
Last call to webhook URL.
Example:
{
"success": true,
"callTime": "2024-12-12T11:11:11",
"responseTime": "2024-12-12T11:12:03",
"httpStatusCode": "200",
"reasonPhrase": "OK",
"headers": {
"Date": "Wed, 15 May 2024 10:16:56 GMT",
},
"error": null,
"response": { ... }
}
secret
string
The secret used for authorization in the third-party systems. It's returned only once in response to the Create Webhook endpoint.
Example: 3ct^6NoryQN22V
account
A reference to the Vendor Account object.
Example:
{
"id": "ACC-1234-1234",
"href": "/accounts/accounts/ACC-1234-1234",
"name": "Microsoft",
"icon": "/static/ACC-1234-1234/account.png"
}
audit
A reference to the Audit object.
Possible values: Created
, Updated
, Enabled
, Disabled
.
Example:
{
"created": { "at": "...", "by": { } },
"updated": { "at": "...", "by": { } },
"enabled": { "at": "...", "by": { } },
"disabled": { "at": "...", "by": { } }
}
Statistics
total
number
The total number of calls made from the Marketplace Platform to the external system represented by the Webhook object.
Example: 77
successes
number
The total number of successful calls made from the Marketplace Platform to an external system represented by the Webhook object.
Example: 70
failures
number
The total number of failed calls made from the Marketplace Platform to an external system represented by the Webhook object.
Example: 7
failuresSinceLastSuccess
number
The total number of failed calls since the last successful call made by the Marketplace Platform to an external system, represented by the Webhook object.
Example: 3
Call
total
number
The total number of calls made from the Marketplace Platform to the external system represented by the Webhook object.
Example: 77
successes
number
The total number of successful calls made from the Marketplace Platform to an external system represented by the Webhook object.
Example: 70
failures
number
The total number of failed calls made from the Marketplace Platform to an external system represented by the Webhook object.
Example: 7
failuresSinceLastSuccess
number
The total number of failed calls since the last successful call made by the Marketplace Platform to an external system, represented by the Webhook object.
Example: 3
Last updated
Was this helpful?