POST

/v1/events/webhooks

X-Violet-Token
X-Violet-App-Secret
X-Violet-App-Id
curl --request POST \
  --url https://sandbox-api.violet.io/v1/events/webhooks \
  --header 'Content-Type: application/json' \
  --data '{
  "event": "<event>",
  "remote_endpoint": "<remote_endpoint>"
}'
{
  "app_id": "integer",
  "date_created": "string",
  "date_last_modified": "string",
  "event": "ORDER_UPDATED",
  "id": "integer",
  "remote_endpoint": "string",
  "status": "INACTIVE"
}

Creates a new webhook for the desired event.

The remote endpoint must be HTTPS for Violet to post any events.

Headers

X-Violet-Token
string
X-Violet-App-Secret
string
X-Violet-App-Id
integer

Query Parameters

app_id
integer

Body

application/json
app_id
integer
date_created
string

Date of creation

date_last_modified
string

Date of last update

eventrequired
enum<string>

The event being triggered

Available options:
ORDER_UPDATED,
ORDER_SHIPPED,
ORDER_COMPLETED,
ORDER_CANCELLED,
ORDER_REFUNDED,
ORDER_RETURNED,
OFFER_CREATED,
OFFER_UPDATED,
OFFER_REMOVED
id
integer
remote_endpointrequired
string

Remote endpoint the webhook posts against.

status
enum<string>

Status of the webhook

Available options:
INACTIVE,
ACTIVE,
DISABLED

Response

200 - application/json
app_id
integer
date_created
string

Date of creation

date_last_modified
string

Date of last update

eventrequired
enum<string>

The event being triggered

Available options:
ORDER_UPDATED,
ORDER_SHIPPED,
ORDER_COMPLETED,
ORDER_CANCELLED,
ORDER_REFUNDED,
ORDER_RETURNED,
OFFER_CREATED,
OFFER_UPDATED,
OFFER_REMOVED
id
integer
remote_endpointrequired
string

Remote endpoint the webhook posts against.

status
enum<string>

Status of the webhook

Available options:
INACTIVE,
ACTIVE,
DISABLED