Update webhook
POST
/merchants/{merchantCode}/webhooks/{webhookId}
const url = 'https://webhook.shopgate.io/v1/merchants/example/webhooks/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","endpoint":"example","active":true,"events":[{"code":"example"}]}'};
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 \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "endpoint": "example", "active": true, "events": [ { "code": "example" } ] }'Update webhook
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
webhookId
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
name
string
endpoint
string
active
boolean
events
Array<object>
object
code
required
string
Examplegenerated
{ "name": "example", "endpoint": "example", "active": true, "events": [ { "code": "example" } ]}Responses
Section titled “Responses”Update successful
Media typeapplication/json
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 Webhook not found
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "NotFound", "message": "Merchant not found"}Sync event already in use
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "Conflict", "message": "Sync event already in use"}
