Mirakl Marketplace APIs

Webhooks and Cloud Events

To facilitate seamless integration and enable real-time interaction capabilities, MMP provides robust HTTP Webhooks and Cloud Events features:

  • HTTP Webhooks: These allow MMP to trigger calls to a developer-defined HTTP endpoint in response to events occurring within the Mirakl platform.
  • Cloud Events: With Cloud Events, MMP can publish messages to a user-defined queue in major cloud services including AWS, GCP, and Azure. This service is ideal for developers looking to leverage cloud infrastructure for enhanced scalability and performance.

Integrating with HTTP Webhooks

Our HTTP Webhooks are designed to provide real-time event notifications to your applications, enabling you to react and adapt to changes and actions immediately. Due to the nature of these notifications, which can occur at a high frequency, it is crucial to manage these HTTP Webhooks efficiently to maintain the performance and reliability of your services. As a large volume of HTTP calls can be generated in a short period, especially during peak times, it is essential to ensure that your application scales and performs reliably under such loads. To do so, HTTP calls should be processed asynchronously. The recommendation is to store the content of the HTTP calls received to the endpoint directly in an event queue, and to respond with an HTTP 2xx code as soon as the event is stored in the queue. Then, another process can consume the queue at its own pace and process events.

A recommended architecture can be represented as follows:

image info

Timeouts

To maintain optimal performance and efficiency in our webhook integrations, we implement specific timeouts. These timeouts are crucial for ensuring that HTTP calls do not congest our system and your endpoints. The following timeout are implemented:

  • Connect Timeout – 1 Second: This timeout ensures that the connection to your endpoint is established within 1 second. It is crucial that your endpoint is reachable within this timeframe to start processing the webhook notification.
  • Read Timeout – 1 Second: Once the connection is established, your server must process the incoming call and respond within 1 second. This includes the time taken by your server to process the webhook data and send back an HTTP response with a status code in the 2xx range, indicating successful receipt and handling of the notification. Once again, process the HTTP call asynchronously will enable to comply with this timeout, even during peak time.

Integrating with Cloud Events

Cloud Events leverages event queues that are hosted in the cloud. Instead of interacting directly with an HTTP endpoint as with HTTP Webhooks, Mirakl sends messages to your designated event queue stored in the cloud.

The following diagram shows a typical setup:

image info

We currently support the following cloud-based event queues:

  • AWS SQS
  • GCP Pub/Sub
  • Azure ServiceBus

Your queue should be accessible over the Internet and permissions should be configured to allow access for Mirakl user.

For further details on setup and permissions, please refer to our documentation.

Languages
Servers
The URL of your server

https://your-service.mirakl.net/

webhooks

Webhooks