Flavonto Forms documentation, version 1.0.0

Developers

REST API

The public routes the visitor runtime uses, the payment webhooks, and the admin routes.

All routes are under /wp-json/flvf/v1/.

Public routes

These are used by the visitor runtime. They are public by design and protected by signed form tokens, rate limits and the same checks as submissions without JavaScript.

Method and route Purpose
POST forms/{id}/submit Send a form (multipart or form encoded, the same fields as the HTML form). Returns ok, and either entry, reference, message, redirect or errors by field id
GET forms/{id}/token A fresh form token for pages served from a cache
GET forms/{id}/captcha A new image or sum challenge
GET forms/{id}/options Options of a field whose choices come from posts, terms or users (for dependent dropdowns)
POST forms/{id}/drafts Save and continue later: stores encrypted answers and returns the resume link (visitors resume by opening it; the page reads ?flvf_resume=)
POST forms/{id}/drafts/{token} Email the resume link to the visitor
DELETE forms/{id}/drafts/{token} Delete a saved draft
POST uploads Upload one file for a field before sending; returns an upload id
DELETE uploads/{uuid} Remove an upload the same visitor added
GET entries/{uuid}/status Payment state of an entry while the visitor waits on the return page
POST payments/stripe/webhook Stripe events, verified with the Stripe-Signature header
POST payments/paypal/webhook PayPal events, verified with PayPal's verify-webhook-signature API
GET embed/forms Form titles for the block's form picker (needs the edit_posts capability)

Sending entries from your own code is best done by rendering the form; if you post to the submit route directly, include a token from the token route and a unique _flvf_sid per submission.

Answers use the same names as the HTML form: flvf[<field id>], with parts as flvf[<field id>][<part>] (for example [first] and [last] of a name, [line1] and [country] of an address). A telephone field with the country list takes [country] and [number]; a number sent as plain text is read in the field's default country, or kept as typed when the field has none.

Admin routes

Routes under /wp-json/flvf/v1/admin/ serve the dashboard screens: forms, drafts, publishing, revisions, entries, labels, notes, exports, settings, credentials, diagnostics, jobs, the log, imports, permissions and the licence. They need a logged in user with the matching Flavonto Forms capability, and WordPress's REST nonce (X-WP-Nonce) as for any cookie authenticated request. They are documented here so you know what exists; they may change between versions, so prefer the PHP hooks for integrations.

The full list of routes in this version is generated from the plugin:

MethodsRoute
GET/
GET/embed/forms
POST/forms/(?P<id>\d+)/submit
GET/forms/(?P<id>\d+)/token
GET/forms/(?P<id>\d+)/captcha
GET/forms/(?P<id>\d+)/options
POST/forms/(?P<id>\d+)/drafts
DELETE, POST/forms/(?P<id>\d+)/drafts/(?P<token>[A-Za-z0-9_-]{32,64})
POST/uploads
DELETE/uploads/(?P<uuid>[a-f0-9]{32})
GET/entries/(?P<uuid>[a-f0-9]{32})/status
POST/payments/stripe/webhook
POST/payments/paypal/webhook
GET/admin/meta
GET, POST/admin/forms
GET, PATCH, DELETE/admin/forms/(?P<id>\d+)
PUT/admin/forms/(?P<id>\d+)/draft
POST/admin/forms/(?P<id>\d+)/publish
POST, DELETE/admin/forms/(?P<id>\d+)/lock
GET/admin/forms/(?P<id>\d+)/revisions
GET/admin/forms/(?P<id>\d+)/revisions/(?P<rid>\d+)
POST/admin/forms/(?P<id>\d+)/revisions/(?P<rid>\d+)/restore
POST/admin/forms/(?P<id>\d+)/duplicate
GET/admin/forms/(?P<id>\d+)/export
POST/admin/forms/import
GET/admin/import/quform
POST/admin/import/quform/(?P<qid>\d+)
POST/admin/import/undo/(?P<iid>[a-z0-9]+)
POST/admin/forms/(?P<id>\d+)/entries-import/read
POST/admin/forms/(?P<id>\d+)/entries-import
POST/admin/render
POST/admin/check
POST/admin/logic-test
POST/admin/formula-check
GET/admin/templates
GET/admin/templates/(?P<tid>[a-z0-9-]+)/preview
POST/admin/signed-link
POST/admin/notification-preview
GET, POST/admin/parts
GET, PUT, DELETE/admin/parts/(?P<pid>\d+)
POST/admin/parts/(?P<pid>\d+)/republish
GET/admin/forms/(?P<id>\d+)/integration-results
POST/admin/integration-sample
GET/admin/entries
GET, PATCH/admin/entries/(?P<id>\d+)
PUT/admin/entries/(?P<id>\d+)/values
GET/admin/entries/(?P<id>\d+)/form
POST/admin/entries/(?P<id>\d+)/notes
DELETE/admin/entries/(?P<id>\d+)/notes/(?P<nid>\d+)
POST/admin/entries/(?P<id>\d+)/resend
POST/admin/entries/(?P<id>\d+)/pass
POST/admin/entries/(?P<id>\d+)/jobs/(?P<jid>\d+)/retry
POST/admin/entries/(?P<id>\d+)/integrations/(?P<iid>i_[a-z0-9]+)/rerun
POST/admin/entries/(?P<id>\d+)/payment/refresh
POST/admin/entries/bulk
GET, POST/admin/labels
PATCH, DELETE/admin/labels/(?P<lid>\d+)
GET/admin/forms/(?P<id>\d+)/columns
POST/admin/exports
GET/admin/exports/(?P<uuid>[a-f0-9]{32})
GET/admin/exports/(?P<uuid>[a-f0-9]{32})/download
GET, POST/admin/settings
POST/admin/secrets
POST/admin/test-email
GET/admin/diagnostics
POST/admin/diagnostics/storage
POST/admin/keys/rotate
GET/admin/jobs
POST/admin/jobs/(?P<jid>\d+)/retry
POST/admin/jobs/(?P<jid>\d+)/cancel
POST/admin/jobs/run
GET/admin/log
POST/admin/integrations/(?P<type>[a-z_]+)/test
POST/admin/integrations/(?P<type>[a-z_]+)/choices
POST, DELETE/admin/settings/reset
GET, POST/admin/permissions
GET/admin/licence
POST/admin/licence/activate
POST/admin/licence/deactivate
POST/admin/licence/check