Guide

Quote Sorter REST API

Hash-based quote payload routes under prc-api/v3. Source: includes/class-plugin.php.

Base path: /wp-json/prc-api/v3/

Auth

Both routes require edit_posts.

POST /block/quote-sorter/submit

Stores or updates quotes. Computes new_hash = md5( json_encode( quoteData ) ) and upserts via Database::add_or_update_quote.

Reference

Request body

Typed options, defaults, and constraints in one scannable reference.
2 fields
hash string required
Existing sorter hash, or empty string on first upload.
quoteData string required
JSON string of the quotes array.

Success: { hash, data }. Failure: quote-sorter-error.

GET /block/quote-sorter/retrieve

Loads quotes for a hash.

Reference

Query parameters

Typed options, defaults, and constraints in one scannable reference.
2 fields
hash string required
Sorter hash from submit.
limit number
Optional limit (integer).

Success: { hash, data }. Missing/invalid hash → quote-sorter-error.

Was this helpful?