Webhooks

Webhooks in Sleekshop allow you to automate and extend the functionality of your shop by triggering events on external services. Below are the details on how to create and update webhooks via the Sleekshop API.


POSTcreate_webhook

Create Webhook

This endpoint allows you to create a new webhook by specifying the event that triggers the webhook. Make sure to use only uppercase letters, numbers, and underscores in the webhook name.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the webhook you want to create.

  • Name
    event
    Type
    string
    Description

    The event you want to trigger the webhook. Valid events include:

    • ORDER_CREATE
    • ORDER_DELIVERY_CHANGE
    • SEND_MESSAGE_TO_USER
    • SEND_NEW_PASSWD_TO_USER
    • WEBHOOK_CONTENT_UPDATE
    • WEBHOOK_CATEGORY_UPDATE
    • ORDER_PAYMENT_CHANGE
  • Name
    licence_username
    Type
    string
    Description

    Your licence username.

  • Name
    licence_password
    Type
    string
    Description

    Your licence password.

  • Name
    licence_secret_key
    Type
    string
    Description

    Your licence secret key.

Request

POST
create_webhook
curl https://demo.sleekshop.net/srv/service/ \
    -d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
    -d licence_password='s9vmrbwT23B7bmjR4Vmz' \
    -d licence_secret_key='sdasdasdasdasd' \
    -d request='create_webhook' \
    -d name='MY_NEW_WEBHOOK' \
    -d event='ORDER_CREATE'

Response

{
    "object": "create_webhook",
    "status": "success"
}

Response Explanation

  • status: The status of the operation indicating whether the webhook was created successfully.

POSTupdate_webhook

Update Webhook

This endpoint allows you to update an existing webhook's settings, such as the URL and parameters. This can be useful when you need to change the target endpoint or modify the data sent to the webhook.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the webhook you want to update.

  • Name
    url
    Type
    string
    Description

    The URL you want to set for the webhook.

  • Name
    parameter
    Type
    string
    Description

    The parameter you want to set for the webhook.

  • Name
    licence_username
    Type
    string
    Description

    Your licence username.

  • Name
    licence_password
    Type
    string
    Description

    Your licence password.

  • Name
    licence_secret_key
    Type
    string
    Description

    Your licence secret key.

Request

POST
update_webhook
curl https://demo.sleekshop.net/srv/service/ \
    -d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
    -d licence_password='s9vmrbwT23B7bmjR4Vmz' \
    -d licence_secret_key='asddsaqweqwewqe' \
    -d request='update_webhook' \
    -d name='WEBHOOK_CONTENT_UPDATE' \
    -d url='https://www.sleekshop.io' \
    -d parameter='1'

Response

{
    "object": "update_webhook",
    "status": "success"
}

Response Explanation

  • status: The status of the operation indicating whether the webhook was updated successfully.

Was this page helpful?