Endpoint #
POST /wp-json/rtcl/v1/my/store/logo
Description #
Uploads or replaces the store logo for the authenticated user.
Authentication & Permission #
This endpoint requires: #
- REST API enabled in RTCL settings
- Valid authentication headers
- API Key
- Bearer JWT Token
- User must be:
- Logged in
Required Headers #
| Header | Required | Description |
|---|---|---|
Content-Type | ✅ | multipart/form-data |
X-API-KEY | ✅ | REST API key |
Authorization | ✅ | Bearer <access_token> |
Required Parameters #
| Field | Type | Required | Description |
|---|---|---|---|
logo | file | ✅ Yes | Store logo image file |
cURL Example #
curl -X POST "https://example.com/wp-json/rtcl/v1/my/store/logo" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "logo=@/path/to/logo.png"
Successful Response (200) #
Response Body
"https://example.com/wp-content/uploads/classified-listing/2025/08/store-logo-180x140.jpg"
✔ Returns logo image URL (string only)
Error Responses #
User not logged in #
Status: 403
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "You are not logged in."
}
Logo file missing #
Status: 400
{
"status": "error",
"error": "BADREQUEST",
"code": "400",
"error_message": "Logo file field is required."
}
Invalid upload (file error) #
Status: 400
{
"status": "error",
"error": "BADREQUEST",
"code": "400",
"error_message": "File type is not permitted."
}
(Message depends on wp_handle_upload() error)
Attachment insert error #
Status: 400
{
"status": "error",
"error": "BADREQUEST",
"code": "400",
"error_message": "Could not insert attachment."
}
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
}
}
Missing Authorization Header #
{
"status": "error",
"error": "MISSING_AUTHORIZATION_HEADER",
"code": "401",
"error_message": "Authorization header not received. Either authorization header was not sent or it was removed by your server due to security reasons."
}
Invalid Authorization Token Type #
{
"status": "error",
"error": "INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE",
"code": "401",
"error_message": "Authorization header must be type of Bearer Token."
}
Invalid JWT Format (Segment Fault) #
{
"status": "error",
"error": "SEGMENT_FAULT",
"code": "401",
"error_message": "Incorrect JWT Format."
}
Invalid JWT Signature #
{
"status": "error",
"error": "INVALID_TOKEN",
"code": "401",
"error_message": "JWT signature verification failed."
}