Endpoint #
GET /wp-json/rtcl/v1/store/listings
Description #
Retrieve all listings associated with a specific store.
Request Headers #
| Header | Required | Description |
|---|---|---|
Content-Type | ✅ Yes | application/json |
x-api-key | ✅ Yes | API key used for request authentication |
Request Parameters #
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store_id | integer | ✅ Yes | — | The ID of the store whose listings are to be retrieved. |
| per_page | integer | No | 20 | Maximum number of items per page. Minimum: 1, Maximum: 100. |
| page | integer | No | 1 | Current page of the collection. Minimum: 1. |
| order_by | string | No | — | Field to order results by. Example: date, title. |
cURL Example #
curl -X GET "https://yourwebsite.com/wp-json/rtcl/v1/store/listings?store_id=123&per_page=10&page=1" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json"
Success Response #
{
"data": [
{
"listing_id": 101,
"author_id": 1,
"author": {
"first_name": "John",
"last_name": "Doe",
"description": "Demo user description",
"id": 1,
"isAdmin": true,
"email": "demo@example.com",
"username": "demo_user",
"phone": "0123456789",
"whatsapp_number": "0123456789",
"website": "https://example.com",
"locations": [],
"zipcode": "12345",
"address": "Demo Address",
"latitude": "",
"longitude": "",
"pp_thumb_url": "https://via.placeholder.com/80",
"membership": {
"is_expired": false,
"expired_at": "2026-12-31 23:59:59",
"remaining_ads": "10",
"posted_ads": "5",
"promotions": {
"featured": {
"ads": 5,
"validate": 10
},
"_top": {
"ads": 3,
"validate": 5
},
"_bump_up": {
"ads": 2,
"validate": 5
}
},
"free_ads": 2
},
"store": true
},
"title": "Demo Listing Title",
"pricing_type": "price",
"raw_price": "100",
"raw_max_price": "",
"price": "100",
"max_price": "0",
"price_type": "fixed",
"price_units": [],
"price_unit": "",
"categories": [
{
"term_id": 1,
"name": "Demo Category",
"slug": "demo-category",
"term_group": 0,
"term_taxonomy_id": 1,
"taxonomy": "rtcl_category",
"description": "Demo category description",
"parent": 0,
"count": 5,
"filter": "raw"
}
],
"tags": false,
"ad_type": "sell",
"status": "publish",
"images": [
"https://via.placeholder.com/600x400"
],
"date_created": {
"date": "2026-01-01 10:00:00.000000",
"timezone_type": 1,
"timezone": "+00:00"
},
"created_at": "2026-01-01 10:00:00",
"view_count": 5,
"promotions": [],
"badges": [
"is-sell"
],
"contact": {
"locations": [],
"latitude": "",
"longitude": "",
"hide_map": false,
"zipcode": "12345",
"address": "Demo Address",
"phone": "0123456789",
"whatsapp_number": "0123456789",
"email": "demo@example.com",
"website": "https://example.com",
"geo_address": ""
},
"store": {
"id": 201,
"title": "Demo Store",
"slug": "demo-store",
"slogan": "Your Demo Slogan",
"email": "store@example.com",
"phone": "0123456789",
"whatsapp": "0123456789",
"website": "https://example-store.com",
"address": "Demo Store Address",
"description": "Demo store description",
"logo_url": "https://via.placeholder.com/180x140",
"banner_url": "https://via.placeholder.com/1024x300"
}
}
],
"pagination": {
"total": 1,
"count": 1,
"per_page": 20,
"current_page": 1,
"total_pages": 1
}
}
Error Responses #
{
"status": "error",
"error": "BADREQUEST",
"code": 400,
"error_message": "Store not found."
}
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
}
}