Spree Commerce Webhook Events API

The Webhook Events API from Spree Commerce — 1 operation(s) for webhook events.

OpenAPI Specification

spree-webhook-events-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Admin Account / Address Webhook Events API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: "Spree Admin API v3 - Administrative API for managing products, orders, and store settings.\n\n## Authentication\n\nThe Admin API requires a secret API key passed in the `x-spree-api-key` header.\nSecret API keys can be generated in the Spree admin dashboard.\n\n## Response Format\n\nAll responses are JSON. List endpoints return paginated responses with `data` and `meta` keys.\nSingle resource endpoints return a flat JSON object.\n\n## Resource IDs\n\nEvery resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,\n`variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,\nrequest bodies, and Ransack filters all accept them directly.\n\n## Error Handling\n\nErrors return a consistent format:\n```json\n{\n  \"error\": {\n    \"code\": \"validation_error\",\n    \"message\": \"Validation failed\",\n    \"details\": { \"name\": [\"can't be blank\"] }\n  }\n}\n```\n"
  version: v3
servers:
- url: http://{defaultHost}
  variables:
    defaultHost:
      default: localhost:3000
tags:
- name: Webhook Events
paths:
  /api/v2/platform/webhooks/events:
    get:
      summary: Return a list of Webhook Events
      tags:
      - Webhook Events
      security:
      - bearer_auth: []
      description: Returns a list of Webhook Events
      operationId: webhook-events-list
      parameters:
      - name: page
        in: query
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        example: 50
        schema:
          type: integer
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: subscriber
        schema:
          type: string
      - name: filter[name_eq]
        in: query
        description: ''
        example: order.canceled
        schema:
          type: string
      - name: filter[request_errors_cont]
        in: query
        description: ''
        example: google
        schema:
          type: string
      - name: filter[response_code_eq]
        in: query
        description: ''
        example: '200'
        schema:
          type: string
      - name: filter[success_eq]
        in: query
        description: ''
        example: 'true'
        schema:
          type: string
      - name: filter[url_cont]
        in: query
        description: ''
        example: mysite
        schema:
          type: string
      responses:
        '200':
          description: Records returned
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                    - id: '1'
                      type: event
                      attributes:
                        execution_time: 14933
                        name: order.canceled
                        request_errors: ''
                        response_code: '200'
                        success: true
                        url: https://www.url1.com/
                        created_at: '2022-11-08T19:35:58.544Z'
                        updated_at: '2022-11-08T19:35:58.544Z'
                      relationships:
                        subscriber:
                          data:
                            id: '1'
                            type: subscriber
                    - id: '2'
                      type: event
                      attributes:
                        execution_time: 64917
                        name: order.canceled
                        request_errors: ''
                        response_code: '200'
                        success: true
                        url: https://www.url2.com/
                        created_at: '2022-11-08T19:35:58.547Z'
                        updated_at: '2022-11-08T19:35:58.547Z'
                      relationships:
                        subscriber:
                          data:
                            id: '2'
                            type: subscriber
                    meta:
                      count: 2
                      total_count: 2
                      total_pages: 1
                    links:
                      self: http://www.example.com/api/v2/platform/webhooks/events?page=1&per_page=&include=&filter[name_eq]=&filter[request_errors_cont]=&filter[response_code_eq]=&filter[success_eq]=&filter[url_cont]=
                      next: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
                      prev: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
                      last: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
                      first: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
              schema:
                $ref: '#/components/schemas/resources_list'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    error:
      type: object
      properties:
        error:
          type: string
      required:
      - error
      x-internal: false
    resources_list:
      type: object
      properties:
        data:
          type: array
          items:
            allOf:
            - $ref: '#/components/schemas/resource_properties'
        meta:
          type: object
          properties:
            count:
              type: integer
            total_count:
              type: integer
            total_pages:
              type: integer
          required:
          - count
          - total_count
          - total_pages
        links:
          type: object
          properties:
            self:
              type: string
            next:
              type: string
            prev:
              type: string
            last:
              type: string
            first:
              type: string
          required:
          - self
          - next
          - prev
          - last
          - first
      required:
      - data
      - meta
      - links
      x-internal: false
    resource_properties:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
        relationships:
          type: object
      required:
      - id
      - type
      - attributes
      x-internal: false
  securitySchemes:
    api_key:
      type: apiKey
      name: x-spree-api-key
      in: header
      description: Secret API key for admin access
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for admin user authentication
x-tagGroups:
- name: Authentication
  tags:
  - Authentication
- name: Products & Catalog
  tags:
  - Products
  - Variants
  - Option Types
  - Custom Fields
  - Channels
- name: Pricing
  tags:
  - Pricing
  - Markets
- name: Orders & Fulfillment
  tags:
  - Orders
  - Payments
  - Fulfillments
  - Refunds
- name: Customers
  tags:
  - Customers
  - Customer Groups
- name: Promotions & Gift Cards
  tags:
  - Promotions
  - Gift Cards
- name: Data
  tags:
  - Exports
- name: Configuration
  tags:
  - Settings
  - Stock Locations
  - Payment Methods
  - Staff
  - API Keys
  - Allowed Origins
  - Webhooks