This reference covers the REST endpoints commonly used with Directorist-powered sites. It is intentionally concise and developer-friendly.
General / WordPress Endpoints #
- GET
/wp-json/directorist/v1– Base API endpoint for Directorist (returns general plugin info)postman.com. - POST
/wp-json/wp/v2/media– Upload a media file (e.g., listing image) to WordPresspostman.com. - POST
/wp-json/wp/v2/posts– Create a new WordPress post (e.g., for blog content). Query parameters (title, content, status) are passed in the URLpostman.com.
User Management #
- GET
/wp-json/directorist/v1/users/– Retrieve a list of users. Supports filtering via query parameters (e.g.,email,page)postman.com. - POST
/wp-json/directorist/v1/users/{user_id}– Update a user’s details (e.g., email) by user IDpostman.com. - DELETE
/wp-json/directorist/v1/users/{user_id}?force=1– Delete a user by ID. Theforce=1parameter ensures permanent deletionpostman.com. - POST
/wp-json/directorist/v1/users/?email={email}&password={password}– Create a new user with given email and password (additional details can be provided via form data:username,first_name, etc.)postman.com. - POST
/wp-json/directorist/v1/users/{user_id}/favorites/?id={listing_id}– Add a listing to the user’s favorites (pass the listing ID asid)postman.com. - DELETE
/wp-json/directorist/v1/users/{user_id}/favorites/{listing_id}– Remove a listing (by listing ID) from the user’s favoritespostman.com.
Authentication / Account #
- POST
/wp-json/directorist/dev/register-user?email={email}&password={password}– Register (sign up) a new user accountpostman.com. - POST
/wp-json/directorist/v1/users/account/change-password?old_password={old}&new_password={new}&user_id={id}– Change a user’s password. Requires the old password, new password, and the user IDpostman.com. - POST
/wp-json/directorist/v1/users/account/reset-user-password?password={new}&pin={pin}&email={email}– Reset password using a PIN. Requires the new password, the reset PIN, and the user’s emailpostman.com. - POST
/wp-json/directorist/v1/users/account/verify-password-reset-pin?email={email}&pin={pin}– Verify a password reset PIN sent to the user’s emailpostman.com. - POST
/wp-json/jwt-auth/v1/token?username={email}&password={password}– Authenticate a user and obtain a JWT token (pass username/email and password)postman.com. - POST
/wp-json/jwt-auth/v1/token/validate– Validate an existing JWT token (token must be sent in the Authorization header)postman.com. - POST
/wp-json/directorist/v1/users/account/send-password-reset-pin?email={email}– Send a password reset PIN/link to the given email addresspostman.com. - POST
/wp-json/directorist/v1/users/account/get-password-reset-pin?email={email}– Retrieve or verify the password reset PIN for the given email (used internally by the app)postman.com.
Listings #
- GET
/wp-json/directorist/v1/listings– Retrieve listings, with many optional filters (e.g.,include,categories,locations,min_price,max_price,ratings,radius[...],expired,pending,author,status, etc.)postman.com. - POST
/wp-json/directorist/v1/listings?title={title}– Create or update a listing. Thetitle(and other listing fields) can be passed via query string or form datapostman.com. - GET
/wp-json/directorist/v1/listings?per_page=5&order=desc&orderby=date– Get the newest listings (example: limit 5, sorted by date descending)postman.com. - GET
/wp-json/directorist/v1/listings?featured=true&per_page=5&order=desc&orderby=date– Get featured listings (example: limit 5, sorted by date)postman.com. - GET
/wp-json/directorist/v1/listings/reviews/?listing={listing_id}– Get reviews for a specific listing by listing IDpostman.com.
Categories, Tags, and Locations (Terms) #
- GET
/wp-json/directorist/v1/listings/categories?hide_empty=true– List all listing categories (by default hide categories with no listings)postman.com. - GET
/wp-json/directorist/v1/listings/categories?per_page=1&hide_empty=true&orderby=count&order=desc&page=2– List popular categories (sorted by listing count)postman.com. - GET
/wp-json/directorist/v1/listings/locations?per_page=10&hide_empty=true&orderby=count&order=desc– List top locations (sorted by listing count, limited to 10)postman.com. - GET
/wp-json/directorist/v1/listings/tags– List all tags used in listingspostman.com. - GET
/wp-json/directorist/v1/listings/locations– List all locations used in listingspostman.com.
Firebase Notifications (Push) #
- POST
https://firestore.googleapis.com/v1/projects/{{firebase_project_name}}/databases/(default)/documents/notifications/user_{user_id}/notifications– Add a notification document to Firestore for user{user_id}. The request body is raw JSON with fields (e.g., title, body, data)postman.com. - GET
https://firestore.googleapis.com/v1/projects/{{firebase_project_name}}/databases/(default)/documents/notifications– Retrieve all notifications documents (for all users) from Firestorepostman.com. - POST
https://fcm.googleapis.com/fcm/send– Send a push notification to a specific device via Firebase Cloud Messaging (FCM). The request body is raw JSON specifying target device token (to) and notification data (title, body, etc.)postman.com.
Payment System (WooCommerce) #
(These endpoints use WooCommerce’s REST API v3, enabled when Directorist monetization is active.)
- GET
/wp-json/wc/v3/orders– Retrieve a list of WooCommerce orders (all orders in the store)postman.com. - GET
/wp-json/wc/v3/orders/{order_id}– Retrieve details of a single order by its IDpostman.com. - GET
/wp-json/wc/v3/refunds– Retrieve a list of refunds (new in WooCommerce API v3)postman.com. - GET
/wp-json/wc/v3/refunds/{refund_id}– Retrieve a single refund by its IDpostman.com. - POST
/wp-json/wc/v3/orders/{order_id}/refunds– Create a refund for the given order ID (pass refund details in request body)postman.com. - DELETE
/wp-json/wc/v3/orders/{order_id}/refunds/{refund_id}– Delete a specific refund by its ID for a given orderpostman.com.