Create Webhook

The Create Webhook API is used to register a webhook for specific events within Shoplazza. A webhook is a mechanism for sending event-based notifications to a specified URL in real-time.

This API is especially useful for:

  1. Receiving real-time notifications for specific events (e.g., order updates or app subscriptions).
  2. Automating workflows based on triggered events.
  3. Integrating Shoplazza events into external systems.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Body Parameters

ParamTypeRequiredDescriptionExample
addressstringYesWebhook notification URL."https://example.com/webhook"
topicstringYesEvent name (e.g., orders/cancelled, app/subscriptions_update)."orders/cancelled"

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
webhookobjectDetails of the registered webhook event.-
webhook.idstringWebhook ID."91d138d0-2a31-49da-a61d-506ada8c3743"
webhook.addressstringWebhook notification URL."https://example.com/webhook"
webhook.topicstringWebhook event name."orders/cancelled"
webhook.created_atstringTime when the webhook was created."2024-12-30T23:50:38Z"
webhook.updated_atstringLast update time of the webhook."2024-12-30T23:50:38Z"
webhook.formatstringFormat of the webhook response (e.g., json)."json"

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "file number error"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "page not found"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
404Not FoundThe charge Id is not found or empty."Record not found"
422Unprocessable EntityInvalid or empty Topic "Topic is not allowed, allowed topic are: app/expired,app/uninstalled,cart/create,cart/update,collections/create,collections/delete,collections/update,customers/create,customers/delete,customers/update,fulfillments/create,fulfillments/update,orders/cancelled,orders/create,orders/delete,orders/finished,orders/fulfilled,orders/paid,orders/partially_fulfilled,orders/partially_refunded,orders/refunded,orders/update,procurements/create,procurements/update,products/create,products/delete,products/publish,products/unpublish,products/update,shop/update,stores/subscribe,suppliers/create,suppliers/delete,suppliers/update"
topic is exist. "Topic already exists"
Invalid or empty address url"Address can't be blank",
"Address is invalid",

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!