REST API and realtime integration
Advanced guide · about 30 minutes · Developer / integrator.
At a glance
Audience: Developer / integrator. Difficulty: advanced. Time: about 30 minutes.
Prerequisites
- WordPress REST familiarity
- Authenticated session for writes
Steps
1. Use the namespace
All routes live under /wp-json/logicanvas-auctions/v1/.
2. Authenticate writes
Send cookie auth plus a valid REST nonce for POST routes.
3. Update listings with PUT/PATCH
Authenticated holders and admins can update editable auctions with PUT or PATCH /auctions/{id}. Editable states are draft, rejected, pending_review, and scheduled. Include category_id and other allowlisted fields as needed.
4. Poll events by sequence
Live clients call GET /auctions/{id}/events incrementally. Recover from last confirmed sequence after reconnect.
5. Never trust push alone
If a push transport is configured, treat it as a wake signal only. Authoritative state always comes from WordPress.
REST routes
Namespace: logicanvas-auctions/v1 (full path /wp-json/logicanvas-auctions/v1).
| Methods | Path |
|---|---|
| GET, POST | /auctions |
| GET, PUT, PATCH | /auctions/\{id\} |
| GET | /auctions/\{id\}/state |
| GET, POST | /auctions/\{id\}/bids |
| GET | /auctions/\{id\}/events |
| POST | /auctions/\{id\}/watch |
| POST | /auctions/\{id\}/submit |
| POST | /auctions/\{id\}/approve |
| POST | /media |
| POST | /live/\{id\}/host |
| POST | /live/\{id\}/join |
| POST | /awards/\{id\}/checkout |
| GET | /products |
| GET | /products/\{id\} |
| POST | /holder/apply |
| GET | /me/dashboard |
| POST | /auctions/\{id\}/accept-bid |
| POST | /orders/\{id\} |
| GET, POST | /payouts |
| POST | /payouts/method |
| POST | /payouts/\{id\}/cancel |
| POST | /auctions/\{id\}/buy-now |
| POST | /auctions/\{id\}/relist |
Actions
wcap_auction_createdwcap_auction_approvedwcap_auction_startedwcap_before_bid_validationwcap_bid_acceptedwcap_bidder_outbidwcap_auction_extendedwcap_auction_closedwcap_award_createdwcap_winner_checkout_initializedwcap_order_linkedwcap_payment_completedwcap_payment_failedwcap_payment_deadline_expiredwcap_settlement_calculatedwcap_payout_status_changedwcap_notification_dispatchwcap_realtime_notifywcap_holder_approvedwcap_holder_rejectedwcap_loggedwcap_buy_now_completed
Filters
wcap_bid_incrementwcap_commission_amountwcap_public_bidder_display_namewcap_role_restricted_accesswcap_enqueue_frontend_assetswcap_user_can_access_wp_adminwcap_dashboard_url_for_userwcap_login_redirectwcap_allow_frontend_registrationwcap_max_image_byteswcap_image_uploads_per_hour
WP-CLI
wp logicanvas-auctions list [--state=<state>]
wp logicanvas-auctions close <id>
wp logicanvas-auctions overdue
wp logicanvas-auctions rebuild <id>
wp logicanvas-auctions schema
wp logicanvas-auctions diagnostics
wp logicanvas-auctions reschedule <id>
wp logicanvas-auctions migrate