Docs

Docs / Webhooks

For Data Feed and FFL Checkout stores
Endpoint · Set the webhook URL

PUT/webhook

Set the URL your store's changes are sent to as they happen. The first time, the answer carries the signing secret, shown once.

Needs Webhook: Read and writeBase URL https://backend.fflmonkey.com/api/v1Counts 1 toward 120 a minute

Fields

Needs Webhook: Read and write, which a key of a Data Feed or an FFL Checkout store can hold. A Data Feed store's webhook is sent its products, prices, rules, restrictions, distributors and in-house inventory; an FFL Checkout store's, its FFL orders. Both are sent the licence's and the subscription's changes.

FieldTypeRule
urlrequiredstringAn https:// address, at most 255 characters, without a user name or password. Its host must resolve, and only to public internet addresses: never localhost, a private network or a reserved address.
  • One webhook URL per store. Your store's changes are sent there as they happen, so you do not have to poll GET /changes. Which changes, and what each delivery carries: Webhooks.
  • The first time it answers 201, with the webhook and its secret, which signs every delivery. The secret is shown once. Store it with your receiver. If you lose it, DELETE /webhook and set the URL again for a new one.
  • After that it answers 200: the URL changes, and the secret stays the one you hold.
  • Give the final address. Deliveries do not follow redirects, so a URL that answers 3xx fails.
  • A PUT resumes a paused webhook whose paused_reason is delivery_health, once you have fixed the endpoint, and clears its failures. Changes made while it was paused were not queued for it: read GET /changes from your last cursor to catch up.
  • A key with this permission decides where all of your store's changes go, whatever else it may do. Give it only to a system you trust with them.

If the Data Feed plugin is connected

A store whose FFL Monkey Data Feed plugin is connected already has its webhook: the plugin set it up, and it already receives every change. A PUT then answers 409 webhook_managed_by_plugin. If a store connects the plugin after setting a URL here, the plugin takes that webhook over.

Returns

  • 201Created: the store had no webhook. data is the webhook, as GET /webhook answers it, plus its secret, shown this once.
  • 200Changed: the webhook was set with the API before. No secret.
  • 409webhook_managed_by_plugin: the store's plugin manages its webhook.
  • 422validation_failed: the URL broke a rule. errors.url says which.

This endpoint can also answer 401 invalid_api_key, 403 license_not_active, 403 product_not_included, 403 insufficient_scope and 429 rate_limited.

Example

FFL Monkey API, version 1. Questions: Support in your FFL Monkey account, or [email protected].