Subscribes to the event

POST /V1/eventing/eventSubscribe

Subscribes to the event.

Body

  • event object Required

    Interface for event data from webapi requests

    Hide event attributes Show event attributes object
    • name string Required

      Event name

    • parent string Required

      Event parent name

    • fields array[object] Required

      Interface for event field data from webapi requests

      Hide fields attributes Show fields attributes object
      • name string Required

        Event field name

      • converter string Required

        Event field converter

    • rules array[object] Required

      Interface for event rule data from webapi requests

      Hide rules attributes Show rules attributes object
      • field string Required

        Event rule field name

      • operator string Required

        Event rule operator

      • value string Required

        Event rule value

    • destination string Required

      Event destination

    • priority boolean Required

      Event priority

    • hipaa_audit_required boolean Required

      If event is required to be HIPAA audited

  • force boolean

Responses

  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

POST /V1/eventing/eventSubscribe
curl \
 -X POST https://magento2.winkelstraat.mac/rest/all/V1/eventing/eventSubscribe \
 -d '{"event":{"name":"string","parent":"string","fields":[{"name":"string","converter":"string"}],"rules":[{"field":"string","operator":"string","value":"string"}],"destination":"string","priority":true,"hipaa_audit_required":true},"force":true}'
Request examples
{
  "event": {
    "name": "string",
    "parent": "string",
    "fields": [
      {
        "name": "string",
        "converter": "string"
      }
    ],
    "rules": [
      {
        "field": "string",
        "operator": "string",
        "value": "string"
      }
    ],
    "destination": "string",
    "priority": true,
    "hipaa_audit_required": true
  },
  "force": true
}
Response examples (401)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}