Fulfil Webhooks API

Webhook subscriptions for real-time ERP events.

OpenAPI Specification

fulfil-io-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Fulfil REST API (v2) Authentication Webhooks API
  description: 'Fulfil is a cloud ERP and operations platform for e-commerce, DTC, and wholesale merchants. Its REST API (v2) exposes every ERP resource through a single, uniform "model interface": each business object (sales orders, products, stock moves, parties, shipments, purchases, production, and thousands more) is a named model addressed at `/api/v2/model/{model.name}`, with generic CRUD, a `search_read` search, `count`, and the ability to call arbitrary model methods (actions), run reports, and drive wizards. Fulfil advertises 6,000+ endpoints across all models.

    The base URL is per-merchant: `https://{merchant_id}.fulfil.io/api/v2`. Authentication is either a personal access token sent in the `X-API-KEY` header (or as HTTP Basic) for private integrations, or OAuth 2.0 for public apps. Use `GET /api/v2/test` to verify credentials.

    Fulfil records are model-specific and dynamically typed, so request and response bodies below are represented as open JSON objects (a `Record` is an object with an integer `id` plus arbitrary model fields). This document models the generic interface plus concrete headline models; the same interface applies to any other Fulfil model by substituting its name.'
  version: '2.0'
  contact:
    name: Fulfil Developer Documentation
    url: https://developers.fulfil.io/
  license:
    name: Proprietary
    url: https://www.fulfil.io/
servers:
- url: https://{merchant_id}.fulfil.io/api/v2
  description: Fulfil merchant instance
  variables:
    merchant_id:
      default: mystore
      description: Your Fulfil merchant subdomain.
security:
- apiKeyAuth: []
- oauth2: []
tags:
- name: Webhooks
  description: Webhook subscriptions for real-time ERP events.
paths:
  /model/webhook.webhook:
    get:
      operationId: listWebhooks
      tags:
      - Webhooks
      summary: List webhook subscriptions
      description: Lists registered webhook subscriptions. Webhooks are Fulfil records like any other model, so they are managed through the same model interface.
      parameters:
      - $ref: '#/components/parameters/Filter'
      - $ref: '#/components/parameters/Fields'
      responses:
        '200':
          $ref: '#/components/responses/RecordList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook subscription
      description: Registers a new webhook subscription for a model/event. Fulfil delivers matching events as HTTP POSTs to the configured URL, signed with HMAC-SHA256. A Google Pub/Sub delivery option is available for high volume.
      requestBody:
        $ref: '#/components/requestBodies/RecordArray'
      responses:
        '201':
          $ref: '#/components/responses/RecordList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RecordList:
      description: A list of records.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Record'
  requestBodies:
    RecordArray:
      required: true
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Record'
  parameters:
    Filter:
      name: filter
      in: query
      required: false
      description: A Fulfil domain filter (JSON-encoded list of clauses).
      schema:
        type: string
    Fields:
      name: fields
      in: query
      required: false
      description: Comma-separated list of fields to return.
      schema:
        type: string
  schemas:
    Error:
      type: object
      properties:
        type:
          type: string
        message:
          type: string
        code:
          type: integer
    Record:
      type: object
      description: A Fulfil record. Fields vary by model; every persisted record has an integer id. Additional model-specific fields are permitted.
      properties:
        id:
          type: integer
      additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Personal access token for private integrations, sent in the X-API-KEY header. Fulfil also accepts the token via HTTP Basic authentication.
    oauth2:
      type: oauth2
      description: OAuth 2.0 authorization code flow for public apps.
      flows:
        authorizationCode:
          authorizationUrl: https://{merchant_id}.fulfil.io/oauth/authorize
          tokenUrl: https://{merchant_id}.fulfil.io/oauth/token
          scopes: {}