Endpoint #
GET /wp-json/rtcl/v1/stores
Fetch a paginated list of stores with optional search and filtering.
Request Headers #
| Header | Required | Description |
|---|---|---|
Content-Type | ✅ Yes | application/json |
x-api-key | ✅ Yes | API key used for request authentication |
Query Parameters #
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
search | string | No | — | Limit results to stores matching this keyword in title or content. |
categories | array | No | — | Array of category IDs to filter stores. Example: [1,2] or single integer 1. |
per_page | integer | No | 20 | Maximum number of stores per page. Minimum: 1, Maximum: 100. |
page | integer | No | 1 | Current page number for pagination. Minimum: 1. |
order_by | string | No | — | Order results by a specific field (e.g., title, date). |
cURL Example Requests #
1. Simple Request (no filters) #
curl -X GET "https://yourwebsite.com/wp-json/rtcl/v1/stores" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
2. Request with Search, Categories, Pagination #
curl -X GET "https://yourwebsite.com/wp-json/rtcl/v1/stores?search=demo&categories[]=1&per_page=10&page=1&order_by=title" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Success Response #
{
"data": [
{
"id": 123,
"title": "Demo Store",
"logo": "https://via.placeholder.com/180x140.png?text=Logo",
"listings_count": 5,
"banner": "https://via.placeholder.com/1024x313.png?text=Banner",
"owner": {
"first_name": "John",
"last_name": "Doe",
"description": "Demo store owner description",
"id": 1,
"isAdmin": true,
"email": "demo@example.com",
"username": "demouser",
"phone": "+1234567890",
"whatsapp_number": "+1234567890",
"website": "https://example.com",
"locations": [
{
"city": "Demo City",
"country": "Demo Country"
}
],
"zipcode": "12345",
"address": "123 Demo Street",
"latitude": "23.8103",
"longitude": "90.4125",
"pp_thumb_url": "https://via.placeholder.com/80.png?text=Avatar",
"membership": {
"is_expired": false,
"expired_at": "2026-12-31 23:59:59",
"remaining_ads": "10",
"posted_ads": "2",
"promotions": {
"featured": {
"ads": 5,
"validate": 30
},
"_top": {
"ads": 3,
"validate": 20
},
"_bump_up": {
"ads": 2,
"validate": 15
}
},
"free_ads": 1
},
"store": true
}
}
],
"pagination": {
"total": 1,
"count": 1,
"per_page": 20,
"current_page": 1,
"total_pages": 1
}
}
Error Responses #
REST API Disabled #
{
"code": "DENIED_REST_API",
"message": "Denied api call",
"data": {
"status": 403
}
}
Invalid API Key / Token #
{
"code": "rtcl_rest_authentication_error",
"message": "Invalid API authentication credentials.",
"data": {
"status": 403
}
}