Skip to content

REST API

Article feedback: 6 routes.

All under /wp-json/davo/v1. Every route has a description in the source.

  • GET4
  • POST1
  • DELETE2

/article-feedback/{id}

DELETEAccess check: require_admin

DELETE /article-feedback/{id} — remove a single feedback entry.

Handler: delete()

Parameters of DELETE /article-feedback/{id}
ParameterTypeRequiredDefault or allowed values
idinteger——
curl
curl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/article-feedback/{id}"

src/domains/article-feedback/routes.php:208

/article-feedback/analytics

GETAccess check: require_admin

GET /article-feedback/analytics — feedback analytics for a period.

Handler: get_analytics()

Parameters of GET /article-feedback/analytics
ParameterTypeRequiredDefault or allowed values
daysinteger——
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/article-feedback/analytics"

src/domains/article-feedback/routes.php:182

/article-feedback/list

GETAccess check: require_admin

GET /article-feedback/list — admin paginated list.

Handler: get_list()

Parameters of GET /article-feedback/list
ParameterTypeRequiredDefault or allowed values
post_idinteger——
vote_typestring——
has_commentboolean—false
pageinteger—1
per_pageinteger—20
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/article-feedback/list"

src/domains/article-feedback/routes.php:113

/article-feedback/post/{id}

GETPublic

GET /article-feedback/post/{id} — public aggregated summary.

Handler: get_summary()

Parameters of GET /article-feedback/post/{id}
ParameterTypeRequiredDefault or allowed values
idinteger——
curl
curl "https://example.com/wp-json/davo/v1/article-feedback/post/{id}"

src/domains/article-feedback/routes.php:90

/article-feedback/stats

GETAccess check: require_admin

GET /article-feedback/stats — aggregate totals for the admin header cards, optionally scoped to one article via post_id.

Handler: get_stats()

Parameters of GET /article-feedback/stats
ParameterTypeRequiredDefault or allowed values
post_idinteger——
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/article-feedback/stats"

src/domains/article-feedback/routes.php:158

/article-feedback/vote

POSTPublic

POST /article-feedback/vote — cast or update a vote.

Handler: cast_vote()

No parameters declared in the route registration.

curl
curl -X POST "https://example.com/wp-json/davo/v1/article-feedback/vote"

DELETEPublic

DELETE /article-feedback/vote — remove the caller's vote.

Handler: remove_vote()

Parameters of DELETE /article-feedback/vote
ParameterTypeRequiredDefault or allowed values
post_idintegerYes—
curl
curl -X DELETE "https://example.com/wp-json/davo/v1/article-feedback/vote"

src/domains/article-feedback/routes.php:58

Note. Generated from the plugin source. Parameters are the ones declared when the route is registered; a parameter marked “see source” uses a shared definition. Responses are not documented here. Authenticate as for any WordPress REST route, for example with an application password over HTTPS; the example paths use https://example.com.

See it on your own site.

Davo is a WordPress theme and plugin by Exorex.

  • Runs on your own WordPress
  • Guided setup wizard
  • AI is off until you switch it on
  • Read the licence on the marketplace first