Test webhook
POST
/merchants/{merchantCode}/webhooks/{webhookId}/test
const url = 'https://webhook.shopgate.io/v1/merchants/example/webhooks/example/test';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://webhook.shopgate.io/v1/merchants/example/webhooks/example/testTrigger example webhook event. The body property gets filled with the response body of the external service. The error property gets filled with the response body of the external service in case an error occured.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
webhookId
required
string
Responses
Section titled “Responses”Trigger successful
Media typeapplication/json
object
error
Webhook response error
object
body
Webhook response body
object
statusCode
Webhook response status code
number
Example
{ "error": { "test": true }, "body": { "test": true }, "statusCode": 200}Validation error
Media typeapplication/json
object
message
string
code
string
error
object
paramName
The parameter-field, that failed to validate, like “userId”
string
paramValue
The value, that was sent, like “xxx”
null | string | number | object | array
code
Machine readable error code
string
message
required
Human readable error code
string
results
object
errors
Array<object>
object
code
Machine readable error code
string
message
Human readable error code
string
description
string
path
Array<string>
warnings
Array<object>
object
code
Machine readable error code
string
message
Human readable error code
string
description
string
path
Array<string>
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "ENUM_MISMATCH", "description": "human readable error code" } ], "warnings": [ { "code": "ENUM_MISMATCH", "description": "human readable error code" } ] } }}Merchant or Event not found
Media typeapplication/json

