W3Block Docs
  • 🚀Start here
    • Welcome to the Docs
    • Integrated Blockchains
  • 👨‍💻Dev Docs
    • API
      • Getting Started
      • Authentication
      • Commerce API services
        • Company Administration
          • Companies (Admin)
          • Assets (Admin)
          • Tags (Admin)
          • Products (Admin)
            • Order Rules (Admin)
          • Orders (Admin)
          • Faq (Admin)
          • Webhooks (Admin)
        • Products
        • Orders
        • Webhooks
        • Faq
        • Globals
      • Key API Services
        • Authentication
        • Companies
        • Tokens
          • Contracts
            • External Contacts
            • Royalty Eligible
          • Categories
            • Subcategories
          • Token Collections
            • Token Editions
          • Metadata
        • Blockchain
        • Cloudinary
        • Integration
          • Ecommerce
            • Associate Tokens
            • Hooks
        • Users
        • Vouchers
  • 📘Knowledge Base
    • First Steps
    • FAQ
    • Glossary
Powered by GitBook
On this page
  1. Dev Docs
  2. API
  3. Commerce API services
  4. Company Administration

Webhooks (Admin)

PreviousFaq (Admin)NextProducts

Last updated 2 years ago

To start receiving commerce service webhooks in your application, you must first create some webhook configuration inside your company.

Basically, that configurations defines what is the endpoint that commerce service should call when some event happens and it defines also the signature key that the endpoint should use to validate the request.

To understand how to verify webhook signatures and what are the available webhook events, please visit .

Webhook Configuration Model (Example)
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdAt": "2022-11-04T13:36:47.665Z",
  "updatedAt": "2022-11-04T13:36:47.665Z",
  "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "company": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "createdAt": "2022-11-04T13:36:47.665Z",
    "updatedAt": "2022-11-04T13:36:47.665Z",
    "name": "string"
  },
  "webhookUrl": "https://mydomain.hook.me",
  "signatureKey": "string",
  "maxRetries": 5,
  "disabled": false
}

Service Methods

Creates a new Webhook Configuration inside a company

The signature key could not be changed and is automatically generated. Each configuration has it owns signature key. To be safe, you must ensure that your endpoint will accept request only from our service by checking the signature.

Rest API reference:

Lists all webhook configurations from some company

Rest API reference:

Gets some webhook configuration of a company by ID

Rest API reference:

Updates some company webhook configuration

Rest API reference:

Enables some disabled company webhook configuration

Rest API reference:

Disabled some enabled company webhook configuration

Rest API reference:

Lists all events sent by some webhook configuration

With that sent webhook event entity, you can also know the result of the request and the last result that your configured endpoint returned to the commerce service.

Rest API reference:

Gets some webhook event sent by some webhook configuration by ID

Rest API reference:

👨‍💻
  • Service Methods
  • Creates a new Webhook Configuration inside a company
  • POST/admin/companies/{companyId}/webhooks-configurations
  • Lists all webhook configurations from some company
  • GET/admin/companies/{companyId}/webhooks-configurations
  • Gets some webhook configuration of a company by ID
  • GET/admin/companies/{companyId}/webhooks-configurations/{configurationId}
  • Updates some company webhook configuration
  • PATCH/admin/companies/{companyId}/webhooks-configurations/{configurationId}
  • Enables some disabled company webhook configuration
  • PATCH/admin/companies/{companyId}/webhooks-configurations/{configurationId}/enable
  • Disabled some enabled company webhook configuration
  • PATCH/admin/companies/{companyId}/webhooks-configurations/{configurationId}/disable
  • Lists all events sent by some webhook configuration
  • GET/admin/companies/{companyId}/webhooks-configurations/{configurationId}/webhooks
  • Gets some webhook event sent by some webhook configuration by ID
  • GET/admin/companies/{companyId}/webhooks-configurations/{configurationId}/webhooks/{webhookId}
Webhooks Page
get

Lists all company webhooks configurations

Authorizations
Path parameters
companyIdstringRequired
Query parameters
pagenumberOptionalDefault: 1
limitnumberOptionalDefault: 10
searchstringOptional
sortBystringOptional
orderBystring · enumOptionalPossible values:
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
get
get

Gets some company webhooks configuration

Authorizations
Path parameters
companyIdstringRequired
configurationIdstringRequired
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
get
patch

Enables some company webhooks configuration

Authorizations
Path parameters
companyIdstringRequired
configurationIdstringRequired
Responses
204Success
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
patch

No content

patch

Disables some company webhooks configuration

Authorizations
Path parameters
companyIdstringRequired
configurationIdstringRequired
Responses
204Success
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
patch

No content

get

Lists all webhooks sent using some webhooks configuration of company

Authorizations
Path parameters
companyIdstringRequired
configurationIdstringRequired
Query parameters
pagenumberOptionalDefault: 1
limitnumberOptionalDefault: 10
searchstringOptional
sortBystringOptional
orderBystring · enumOptionalPossible values:
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
get
get

Gets some company webhooks configuration sent webhook

Authorizations
Path parameters
companyIdstringRequired
configurationIdstringRequired
webhookIdstringRequired
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
get
post

Creates a new company webhooks configuration

Authorizations
Path parameters
companyIdstringRequired
Body
webhookUrlstringRequiredExample: https://w3block.io/webhooks/test
maxRetriesnumberOptionalDefault: 5Example: 5
Responses
201Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
post
POST /admin/companies/{companyId}/webhooks-configurations HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "webhookUrl": "https://w3block.io/webhooks/test",
  "maxRetries": 5
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-06-01T12:28:00.708Z",
  "updatedAt": "2025-06-01T12:28:00.708Z",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "company": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-06-01T12:28:00.708Z",
    "updatedAt": "2025-06-01T12:28:00.708Z",
    "name": "text"
  },
  "webhookUrl": "https://mydomain.hook.me",
  "signatureKey": "text",
  "maxRetries": 5,
  "disabled": false
}
GET /admin/companies/{companyId}/webhooks-configurations HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2025-06-01T12:28:00.708Z",
      "updatedAt": "2025-06-01T12:28:00.708Z",
      "companyId": "123e4567-e89b-12d3-a456-426614174000",
      "company": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "createdAt": "2025-06-01T12:28:00.708Z",
        "updatedAt": "2025-06-01T12:28:00.708Z",
        "name": "text"
      },
      "webhookUrl": "https://mydomain.hook.me",
      "signatureKey": "text",
      "maxRetries": 5,
      "disabled": false
    }
  ],
  "meta": {
    "itemCount": 1,
    "totalItems": 1,
    "itemsPerPage": 1,
    "totalPages": 1,
    "currentPage": 1
  },
  "links": {
    "first": "http://example.com?page=1",
    "prev": "http://example.com?page=1",
    "next": "http://example.com?page=2",
    "last": "http://example.com?page=3"
  }
}
GET /admin/companies/{companyId}/webhooks-configurations/{configurationId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-06-01T12:28:00.708Z",
  "updatedAt": "2025-06-01T12:28:00.708Z",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "company": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-06-01T12:28:00.708Z",
    "updatedAt": "2025-06-01T12:28:00.708Z",
    "name": "text"
  },
  "webhookUrl": "https://mydomain.hook.me",
  "signatureKey": "text",
  "maxRetries": 5,
  "disabled": false
}
patch

Updates some company webhooks configuration

Authorizations
Path parameters
companyIdstringRequired
configurationIdstringRequired
Body
webhookUrlstringRequiredExample: https://w3block.io/webhooks/test
maxRetriesnumberOptionalDefault: 5Example: 5
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
patch
PATCH /admin/companies/{companyId}/webhooks-configurations/{configurationId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "webhookUrl": "https://w3block.io/webhooks/test",
  "maxRetries": 5
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-06-01T12:28:00.708Z",
  "updatedAt": "2025-06-01T12:28:00.708Z",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "company": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-06-01T12:28:00.708Z",
    "updatedAt": "2025-06-01T12:28:00.708Z",
    "name": "text"
  },
  "webhookUrl": "https://mydomain.hook.me",
  "signatureKey": "text",
  "maxRetries": 5,
  "disabled": false
}
PATCH /admin/companies/{companyId}/webhooks-configurations/{configurationId}/enable HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
PATCH /admin/companies/{companyId}/webhooks-configurations/{configurationId}/disable HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
GET /admin/companies/{companyId}/webhooks-configurations/{configurationId}/webhooks HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2025-06-01T12:28:00.708Z",
      "updatedAt": "2025-06-01T12:28:00.708Z",
      "companyId": "123e4567-e89b-12d3-a456-426614174000",
      "company": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "createdAt": "2025-06-01T12:28:00.708Z",
        "updatedAt": "2025-06-01T12:28:00.708Z",
        "name": "text"
      },
      "configurationId": "123e4567-e89b-12d3-a456-426614174000",
      "configuration": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "createdAt": "2025-06-01T12:28:00.708Z",
        "updatedAt": "2025-06-01T12:28:00.708Z",
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "company": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "createdAt": "2025-06-01T12:28:00.708Z",
          "updatedAt": "2025-06-01T12:28:00.708Z",
          "name": "text"
        },
        "webhookUrl": "https://mydomain.hook.me",
        "signatureKey": "text",
        "maxRetries": 5,
        "disabled": false
      },
      "status": "concluded",
      "errors": 0,
      "data": false,
      "lastResult": null,
      "usePatch": false,
      "updateWithSystemHeaders": false,
      "addCreatedAtToBody": false
    }
  ],
  "meta": {
    "itemCount": 1,
    "totalItems": 1,
    "itemsPerPage": 1,
    "totalPages": 1,
    "currentPage": 1
  },
  "links": {
    "first": "http://example.com?page=1",
    "prev": "http://example.com?page=1",
    "next": "http://example.com?page=2",
    "last": "http://example.com?page=3"
  }
}
GET /admin/companies/{companyId}/webhooks-configurations/{configurationId}/webhooks/{webhookId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-06-01T12:28:00.708Z",
  "updatedAt": "2025-06-01T12:28:00.708Z",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "company": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-06-01T12:28:00.708Z",
    "updatedAt": "2025-06-01T12:28:00.708Z",
    "name": "text"
  },
  "configurationId": "123e4567-e89b-12d3-a456-426614174000",
  "configuration": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-06-01T12:28:00.708Z",
    "updatedAt": "2025-06-01T12:28:00.708Z",
    "companyId": "123e4567-e89b-12d3-a456-426614174000",
    "company": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2025-06-01T12:28:00.708Z",
      "updatedAt": "2025-06-01T12:28:00.708Z",
      "name": "text"
    },
    "webhookUrl": "https://mydomain.hook.me",
    "signatureKey": "text",
    "maxRetries": 5,
    "disabled": false
  },
  "status": "concluded",
  "errors": 0,
  "data": false,
  "lastResult": null,
  "usePatch": false,
  "updateWithSystemHeaders": false,
  "addCreatedAtToBody": false
}