Inventory¶
Collection endpoints for browsing and bulk-managing a type's listings.
- Base URL:
/wp-json/dms/v1/ - All requests require a Bearer API key - see Authentication.
Endpoints¶
| Method | Path | Capability | Purpose |
|---|---|---|---|
| GET | inventory/{type_id} |
- | A page of listings for a type, with filter aggregates. |
| GET | search_all |
- | One page of listings per type, aggregates skipped for speed. |
| DELETE | clear_trash/{type_id} |
delete_inventory |
Permanently delete trashed listings for a type, in batches. |
GET /inventory/{type_id}¶
Returns a collection of listings for the type, plus filter aggregates in data:
term_counts- count of matching listings per term (for building filter UIs).min_max- min/max for numeric categories and price across the filtered set.
Accepts the standard pagination params plus filters:
| Param | Purpose |
|---|---|
s |
Keyword search. |
min_price / max_price |
Price range. |
orderby |
price, date, or a numeric category ID. |
order |
asc or desc (with orderby). |
dms_category_{id}=a,b |
Match a category against one or more comma-separated term values. |
min_category_{id} / max_category_{id} |
Numeric range on a category. |
curl "https://your-site.com/wp-json/dms/v1/inventory/4?page=2&per_page=10&orderby=price&order=asc" \
-H "Authorization: Bearer YOUR_KEY"
GET /search_all¶
Runs the same search across every type and returns a page of listings per type, keyed by type ID. Filter aggregates are skipped for performance. Accepts the pagination params.
curl "https://your-site.com/wp-json/dms/v1/search_all?s=toyota&per_page=5" \
-H "Authorization: Bearer YOUR_KEY"
DELETE /clear_trash/{type_id}¶
Capability: delete_inventory.
Permanently deletes trashed listings for the type, in batches. Accepts limit (default 50, max 200); returns deleted and remaining counts so you can loop until remaining is 0.
curl -X DELETE "https://your-site.com/wp-json/dms/v1/clear_trash/4?limit=100" \
-H "Authorization: Bearer YOUR_KEY"
See also¶
- Listings - read/write a single listing.
- Categories & Terms - the category IDs used in filters.