Endpoint #
POST /wp-json/rtcl/v1/listing/form
Description #
Create a new classified listing.
Request Headers #
Required
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer access token |
| X-WP-Nonce | string | WordPress REST API nonce |
| Content-Type | string | multipart/form-data |
| Accept | string | application/json |
Request Type #
multipart/form-data
Request Body Parameters #
Basic Listing Fields #
| Field | Type | Required | Description |
|---|---|---|---|
title | string | ✅ Yes | Listing title |
description | string | ✅ Yes | Listing description |
category_id | integer | ✅ Yes | Category ID |
listing_type | string | ❌ No | sell / buy |
listing_id | integer | ❌ No | Required for update |
agree | boolean | ❌ Conditional | Required if T&C enabled |
Pricing Fields #
| Field | Type | Required | Description |
|---|---|---|---|
pricing_type | string | ❌ No | price / range |
price | number | ❌ No | Listing price |
max_price | number | ❌ No | Required for range pricing |
price_type | string | ❌ No | fixed / negotiable |
price_unit | string | ❌ No | Price unit |
Location & Contact #
| Field | Type | Required | Description |
|---|---|---|---|
locations[] | integer[] | ❌ No | Location term IDs |
zipcode | string | ❌ No | Zip code |
address | string | ❌ No | Address |
latitude | string | ❌ No | Latitude |
longitude | string | ❌ No | Longitude |
phone | string | ❌ No | Phone number |
whatsapp_number | string | ❌ No | |
email | string | ❌ No | Contact email |
website | string | ❌ No | Website |
hide_map | boolean | ❌ No | Hide map |
Gallery Upload #
| Field | Type | Required | Description |
|---|---|---|---|
gallery[] | file[] | ❌ No | Listing images |
gallery_delete[] | integer[] | ❌ No | Delete image IDs |
gallery_sort[] | array | ❌ No | Image order |
Custom Fields #
| Field | Type | Required |
|---|---|---|
custom_fields[_field_ID] | mixed | ❌ No |
Success Response #
HTTP Status #
200 OK
Success Response Body (FULL) #
{
"listing_id": 401,
"author_id": 1,
"author": {
"first_name": "",
"last_name": "",
"description": "",
"id": 1,
"isAdmin": true,
"email": "your@gmail.com",
"username": "john",
"phone": "",
"whatsapp_number": "",
"website": "",
"locations": [],
"zipcode": "",
"address": "",
"latitude": "",
"longitude": "",
"pp_thumb_url": "https://thumbnail.com",
"membership": {
"is_expired": false,
"expired_at": "2026-02-25 08:58:04",
"remaining_ads": "59",
"posted_ads": "1",
"promotions": {
"featured": {
"ads": 20,
"validate": 20
},
"_top": {
"ads": 20,
"validate": 30
},
"_bump_up": {
"ads": 30,
"validate": 30
}
},
"free_ads": 0
},
"store": true
},
"title": "Listing",
"pricing_type": "price",
"raw_price": "100",
"raw_max_price": "",
"price": "100",
"max_price": "0",
"price_type": "fixed",
"price_units": [],
"price_unit": "",
"categories": [
{
"term_id": 2,
"name": "Apartments",
"slug": "apartments",
"term_group": 0,
"term_taxonomy_id": 2,
"taxonomy": "rtcl_category",
"description": "",
"parent": 0,
"count": 0,
"filter": "raw"
}
],
"tags": false,
"ad_type": "sell",
"status": "pending",
"images": [],
"date_created": {
"date": "2026-01-26 08:58:15.000000",
"timezone_type": 1,
"timezone": "+00:00"
},
"created_at": "2026-01-26 08:58:15",
"view_count": 0,
"promotions": [],
"badges": [
"is-new",
"is-sell",
"new"
],
"contact": {
"locations": [],
"latitude": "",
"longitude": "",
"hide_map": false,
"zipcode": "3457",
"address": "london",
"phone": "+99388345",
"whatsapp_number": "+99388345",
"email": "contact@gmail.com",
"website": "https://www.whatsapp.com",
"geo_address": ""
},
"store": {
"id": 386,
"title": "Store",
"slug": "",
"slogan": "Your Slogan",
"email": "store@gmail.com",
"phone": "+28278384",
"whatsapp": "+28278384",
"website": "https://www.yourwebsite.com/",
"address": "London",
"description": "Description",
"logo_url": "",
"banner_url": ""
},
"url": "",
"description": "",
"is_favourite": false,
"video_urls": [],
"fb_custom_fields": [],
"form_data": null,
"related": [],
"review": {
"rating": {
"average": "0",
"count": 0
}
}
}
❌ Error Responses (ALL) #
Missing Authorization #
Status: 401 Unauthorized
{
"status": "error",
"error": "MISSING_AUTHORIZATION_HEADER",
"code": "401",
"error_message": "Authorization header not received."
}
Invalid JWT Token #
Status: 401 Unauthorized
{
"status": "error",
"error": "INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE",
"code": "401",
"error_message": "Authorization header must be type of Bearer Token."
}
API Disabled #
Status: 403 Forbidden
{
"code": "DENIED_REST_API",
"message": "Denied api call",
"data": {
"status": 403
}
}
Not Logged In #
Status: 403 Forbidden
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "You are not logged in."
}
Category Missing #
Status: 403 Forbidden
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "Category not selected."
}
No Permission to Edit #
Status: 403 Forbidden
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "You are not allow to edit this ad."
}
Please Select Ad Type and Category #
Status: 403 Forbidden
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "Please select ad type and category"
}
Terms Not Accepted #
Status: 403 Forbidden
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "Please agree with the terms and conditions."
}
Invalid File Type / Upload Error #
Status: 400 Bad Request
{
"status": "error",
"error": "UPLOAD_FAILED",
"code": "400",
"error_message": "File upload failed."
}
Notes #
- Images require
multipart/form-data - Status depends on admin settings
- JWT required for all POST actions