Base URL

https://api.venuerun.com/merchants/:merchantId/webhooks

Webhooks

Webhooks allows external services to be notified when certain events happen in VenueRun.

This doc was generated by our interal API tester at:

November 11, 2024 at 2:00:27 AM

Endpoints

GET /merchants/:merchantId/webhooks
GET /merchants/:merchantId/webhooks/:webhookId
POST /merchants/:merchantId/products
POST /merchants/:merchantId/webhooks/:webhookId
DELETE /merchants/:merchantId/webhooks/:webhookId

The Webhook Object

Properties

  • Name
    id
    Type
    string read-only
    Description
    The id of the webhook
  • Name
    title
    Type
    string
    Description
    The title of the webhook
  • Name
    url
    Type
    string
    Description
    Endpoint that will receive the webhook
  • Name
    events
    Type
    array
    Description
    Array of events that will trigger the webhook
  • Name
    Event type
    Type
    string
    Description
    Event that will trigger the webhook
  • Name
    active
    Type
    boolean
    Description
    Is the webhook active
  • Name
    createdAt
    Type
    string read-only
    Description
    The date the customer was created
  • Name
    updatedAt
    Type
    string read-only
    Description
    The date the customer was updated
  • Name
    testMode
    Type
    string read-only
    Description
    Is the webhook in test mode

The Webhook Object

{
  "active": true,
  "createdAt": 1731312024,
  "events": [
    "order.created",
    "webhook.created"
  ],
  "id": "umkXZlCW4bpSc4F1Z650",
  "testMode": true,
  "title": "Postman Webhook",
  "updatedAt": 1731312024,
  "url": "https://api.example.com/listener",
  "bearerToken": "UeYTY2K34RQB3qFnjXXgYLbM5TC2SATEV3YghNO/wM9T+yTiPk8ZsZLE4uVEmeWrI3LqdkY5mrp9bxdSs7Lw2ay+JXzAwtA/tceKSACZQglRJlW29RbPHuRM1iRvD2ViNk7UxxEf42qaHYr+D5iT4yFR13IQlG+UHP7wLp3qO9wrGrRrQQg9BbnhXfzmFnq+cvZROEshjHqIAom48hgHtw4sm4eSm9gKeeC5vd5YQkM09cx85r9ksmF4EXMucD4jquq6IixNqH9OyF+cUJ+SWk0WaJ4m4fxLdJawBa7QrAX8PuNbwlQ24q8aRWlztxawxsH8Jo8Sm+ntrXdpIOQaAg=="
}

POST/merchants/:merchantId/webhooks

Create a Webhook

This endpoint allows you to create a Webhook

Required attributes

  • Name
    title
    Type
    string
    Description
    The title of the webhook
  • Name
    url
    Type
    string
    Description
    Endpoint that will receive the webhook

Optional attributes

  • Name
    id
    Type
    string read-only
    Description
    The id of the webhook
  • Name
    events
    Type
    array
    Description
    Array of events that will trigger the webhook
  • Name
    Event type
    Type
    string
    Description
    Event that will trigger the webhook
  • Name
    active
    Type
    boolean
    Description
    Is the webhook active
  • Name
    createdAt
    Type
    string read-only
    Description
    The date the customer was created
  • Name
    updatedAt
    Type
    string read-only
    Description
    The date the customer was updated
  • Name
    testMode
    Type
    string read-only
    Description
    Is the webhook in test mode

Request

POST
/merchants/:merchantsId/webhooks
const webhook = await VenueRun.webhooks.create({
  title: "Testing Webhook",
  url: "https://api.example.com/webhook",
  active: true,
  events: ["order.created", "webhook.created"]
});

POST/merchants/:merchantId/webhooks/:webhookId

Update a webhook

This endpoint allows you to update a Webhook

Required parameters

  • Name
    id
    Type
    string
    Description

    id of the webhooks

Optional attributes

  • Name
    id
    Type
    string read-only
    Description
    The id of the webhook
  • Name
    events
    Type
    array
    Description
    Array of events that will trigger the webhook
  • Name
    Event type
    Type
    string
    Description
    Event that will trigger the webhook
  • Name
    active
    Type
    boolean
    Description
    Is the webhook active
  • Name
    createdAt
    Type
    string read-only
    Description
    The date the customer was created
  • Name
    updatedAt
    Type
    string read-only
    Description
    The date the customer was updated
  • Name
    testMode
    Type
    string read-only
    Description
    Is the webhook in test mode

Request

POST
/merchants/:merchantsId/webhooks/webhookId
await VenueRun.webhooks.update(webhookId, {
  title: "Postman Webhook",
  url: "https://api.example.com/listener"
});

Response

{
  "active": true,
  "createdAt": 1731312024,
  "events": [
    "order.created",
    "webhook.created"
  ],
  "id": "umkXZlCW4bpSc4F1Z650",
  "testMode": true,
  "title": "Postman Webhook",
  "updatedAt": 1731312024,
  "url": "https://api.example.com/listener"
}

GET/merchants/:merchantId/webhooks/:webhookId

Retrive a Webhook

This endpoint allows you to retrieve a Webhook

Required parameters

  • Name
    id
    Type
    string
    Description

    id of the Webhook

Request

GET
/merchants/:merchantsId/webhooks/:webhookId
const product = await VenueRun.webhooks.retrieve(product.id);

Response

{
  "active": true,
  "createdAt": 1731312024,
  "events": [
    "order.created",
    "webhook.created"
  ],
  "id": "umkXZlCW4bpSc4F1Z650",
  "testMode": true,
  "title": "Postman Webhook",
  "updatedAt": 1731312024,
  "url": "https://api.example.com/listener",
  "bearerToken": "UeYTY2K34RQB3qFnjXXgYLbM5TC2SATEV3YghNO/wM9T+yTiPk8ZsZLE4uVEmeWrI3LqdkY5mrp9bxdSs7Lw2ay+JXzAwtA/tceKSACZQglRJlW29RbPHuRM1iRvD2ViNk7UxxEf42qaHYr+D5iT4yFR13IQlG+UHP7wLp3qO9wrGrRrQQg9BbnhXfzmFnq+cvZROEshjHqIAom48hgHtw4sm4eSm9gKeeC5vd5YQkM09cx85r9ksmF4EXMucD4jquq6IixNqH9OyF+cUJ+SWk0WaJ4m4fxLdJawBa7QrAX8PuNbwlQ24q8aRWlztxawxsH8Jo8Sm+ntrXdpIOQaAg=="
}

DELETE/merchants/:merchantId/webhooks/:webhookId

Delete a webhook

This endpoint allows you to delete a Webhook

Required parameters

  • Name
    id
    Type
    string
    Description

    id of the product

Request

POST
/merchants/:merchantsId/webhooks/:webhookId
await VenueRun.webhooks.delete(webhookId);

Response

{
  "id": "umkXZlCW4bpSc4F1Z650",
  "object": {
    "active": true,
    "createdAt": 1731312024,
    "events": [
      "order.created",
      "webhook.created"
    ],
    "id": "umkXZlCW4bpSc4F1Z650",
    "testMode": true,
    "title": "Postman Webhook",
    "updatedAt": 1731312024,
    "url": "https://api.example.com/listener"
  },
  "message": "Webhook deleted",
  "deleted": true
}

GET/merchants/:merchantId/webhooks

Get all Webhooks

This endpoint allows you to list all Webhooks

Request

POST
/merchants/:merchantsId/webhooks
await VenueRun.webhooks.list()

Was this page helpful?