Fourthwall Webhooks API

The Webhooks API from Fourthwall — 3 operation(s) for webhooks.

OpenAPI Specification

fourthwall-webhooks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Fourthwall Collections Webhooks API
  description: 'Representative OpenAPI description of Fourthwall''s public creator commerce APIs. Fourthwall exposes two HTTP surfaces: a public Storefront API (authenticated with a storefront token) for building headless shops, and a Platform / Open API (authenticated with a shop API key via HTTP Basic Auth, or OAuth 2.0 for multi-shop apps) for managing orders, products, collections, promotions, gifting, memberships, and webhooks. This document is a faithful, representative subset for cataloging; consult https://docs.fourthwall.com for the complete, authoritative reference.'
  termsOfService: https://fourthwall.com/terms-of-service
  contact:
    name: Fourthwall
    url: https://fourthwall.com
  version: v1
servers:
- url: https://storefront-api.fourthwall.com
  description: Storefront API (public storefront token)
- url: https://api.fourthwall.com
  description: Platform / Open API (shop API key or OAuth)
tags:
- name: Webhooks
paths:
  /open-api/v1.0/webhooks:
    get:
      operationId: getWebhooks
      tags:
      - Webhooks
      summary: Get webhooks
      security:
      - basicAuth: []
      - oauth:
        - webhook_read
      responses:
        '200':
          description: A list of webhook configurations.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebhookConfiguration'
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook
      security:
      - basicAuth: []
      - oauth:
        - webhook_write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConfigurationCreateRequest'
      responses:
        '200':
          description: The created webhook configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfiguration'
  /open-api/v1.0/webhooks/{webhookConfigurationId}:
    get:
      operationId: getWebhook
      tags:
      - Webhooks
      summary: Get a webhook
      security:
      - basicAuth: []
      - oauth:
        - webhook_read
      parameters:
      - name: webhookConfigurationId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The webhook configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfiguration'
    put:
      operationId: updateWebhook
      tags:
      - Webhooks
      summary: Update a webhook
      security:
      - basicAuth: []
      - oauth:
        - webhook_write
      parameters:
      - name: webhookConfigurationId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConfigurationCreateRequest'
      responses:
        '200':
          description: The updated webhook configuration.
    delete:
      operationId: deleteWebhook
      tags:
      - Webhooks
      summary: Delete a webhook
      security:
      - basicAuth: []
      - oauth:
        - webhook_write
      parameters:
      - name: webhookConfigurationId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
  /open-api/v1.0/webhook-events:
    get:
      operationId: getWebhookEvents
      tags:
      - Webhooks
      summary: Get webhook events
      security:
      - basicAuth: []
      - oauth:
        - webhook_read
      responses:
        '200':
          description: A list of delivered webhook events.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebhookEvent'
components:
  schemas:
    WebhookEvent:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/WebhookEventType'
        payload:
          type: object
    WebhookEventType:
      type: string
      enum:
      - ORDER_PLACED
      - ORDER_UPDATED
      - GIFT_PURCHASE
      - PRODUCT_CREATED
      - PRODUCT_UPDATED
      - DONATION
      - SUBSCRIPTION_PURCHASED
      - SUBSCRIPTION_EXPIRED
      - SUBSCRIPTION_CHANGED
      - NEWSLETTER_SUBSCRIBED
      - THANK_YOU_SENT
      - GIFT_DRAW_STARTED
      - GIFT_DRAW_ENDED
      - PROMOTION_CREATED
      - PROMOTION_UPDATED
      - PROMOTION_STATUS_CHANGED
      - PLATFORM_APP_DISCONNECTED
      - MEMBERSHIP_POST_UPSERTED
      - MEMBERSHIP_SERIES_UPSERTED
      - MEMBERSHIP_SERIES_DELETED
      - MEMBERSHIP_TAG_CREATED
      - MEMBERSHIP_TAG_UPDATED
      - MEMBERSHIP_TAG_DELETED
      - MEMBERSHIP_TIER_UPSERTED
      - MEMBERSHIP_TIER_DELETED
      - COLLECTION_UPDATED
      - CART_ABANDONED_1H
      - CART_ABANDONED_24H
      - CART_ABANDONED_72H
    WebhookConfiguration:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        allowedTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
    WebhookConfigurationCreateRequest:
      type: object
      required:
      - url
      - allowedTypes
      properties:
        url:
          type: string
        allowedTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
  securitySchemes:
    storefrontToken:
      type: apiKey
      in: query
      name: storefront_token
      description: Public storefront token obtained from Settings > For Developers, passed as the storefront_token query parameter on Storefront API requests.
    basicAuth:
      type: http
      scheme: basic
      description: Shop API key used with HTTP Basic Authentication against the Platform (Open) API.
    oauth:
      type: oauth2
      description: OAuth 2.0 for multi-shop platform apps.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.fourthwall.com/auth/realms/Fourthwall/protocol/openid-connect/auth
          tokenUrl: https://api.fourthwall.com/open-api/v1.0/platform/token
          scopes:
            order_read: Read orders
            order_write: Write orders and fulfillments
            offer_read: Read products, collections, and gifting
            offer_write: Write products, collections, and gifting
            promotions_read: Read promotions
            promotions_write: Write promotions
            giveaway_read: Read giveaways
            giveaway_write: Write giveaways
            memberships_read: Read memberships
            memberships_write: Write memberships
            webhook_read: Read webhooks
            webhook_write: Write webhooks
            donation_read: Read donations
            shop_read: Read shop information