Endpoint #
PUT /wp-json/rtcl/v1/my/store
Description #
Update logged-in user’s store details.
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 | ✅ | application/json |
X-API-KEY | ✅ | REST API key |
Authorization | ✅ | Bearer <access_token> |
cURL Example Request #
curl -X PUT "https://example.com/wp-json/rtcl/v1/my/store" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"title": "Tech World Store Updated",
"description": "We sell premium electronics and gadgets.",
"email": "support@techworld.com",
"phone": "+44 7788 556677",
"address": "221B Baker Street, London",
"website": "https://techworld.com",
"slogan": "Best gadgets at best price",
"social_media": {
"facebook": "https://facebook.com/techworld",
"instagram": "https://instagram.com/techworld"
},
"oh_type": "selected",
"oh_hours": {
"mon": "9:00-18:00",
"tue": "9:00-18:00",
"wed": "9:00-18:00"
}
}'
Request Parameters #
Required (Always) #
| Parameter | Type | Description |
|---|---|---|
title | string | Store name |
description | string | Store description |
Required (Only if creating store) #
| Parameter | Type | Description |
|---|---|---|
slug | string | Unique store slug |
⚠️ Required only when the user does not already have a store
Optional Parameters #
| Parameter | Type | Description |
|---|---|---|
email | string | Store email |
phone | string | Store phone |
address | string | Store address |
website | string (URL) | Store website |
slogan | string | Store slogan |
social_media | object | Social media URLs |
oh_type | string | selected or always |
oh_hours | object | Opening hours |
Parameter Formats #
social_media #
{
"facebook": "https://facebook.com/store",
"instagram": "https://instagram.com/store"
}
oh_type #
Allowed values:
selected
always
Invalid values default to selected.
oh_hours #
{
"mon": "9:00-18:00",
"tue": "9:00-18:00",
"wed": "9:00-18:00",
"thu": "9:00-18:00",
"fri": "9:00-18:00"
}
Success Response (200) #
{
"id": 101,
"title": "Demo Tech Store",
"logo": "https://example.com/uploads/store/demo-logo.jpg",
"listings_count": 5,
"banner": "https://example.com/uploads/store/demo-banner.jpg",
"owner": {
"id": 10,
"first_name": "Alex",
"last_name": "Johnson",
"email": "alex.johnson@example.com",
"username": "alexjohnson",
"isAdmin": false,
"phone": "+1 555 234 6789",
"website": "https://alexjohnson.dev",
"pp_thumb_url": "https://example.com/avatar/default.png",
"membership": {
"is_expired": false,
"expired_at": "2026-12-31 23:59:59",
"remaining_ads": 25,
"posted_ads": 7,
"promotions": {
"featured": {
"ads": 10,
"validate": 30
},
"top": {
"ads": 5,
"validate": 15
}
},
"free_ads": 2
},
"store": true
},
"slug": "demo-tech-store",
"description": "Demo Tech Store is a sample store created for testing and documentation purposes.",
"slogan": "Technology Made Simple",
"email": "support@demotechstore.com",
"address": "221B Baker Street, London",
"phone": "+44 7700 900123",
"owner_id": 10,
"website": "https://demotechstore.com",
"created_at": "2025-01-01 10:00:00",
"created_at_gmt": "2025-01-01 04:00:00",
"opening_hours": {
"type": "selected",
"hours": {
"mon": "09:00-18:00",
"tue": "09:00-18:00",
"wed": "09:00-18:00",
"thu": "09:00-18:00",
"fri": "09:00-17:00"
}
},
"social": {
"facebook": "https://facebook.com/demotechstore",
"instagram": "https://instagram.com/demotechstore",
"twitter": "https://twitter.com/demotech"
},
"review": {
"total": 18,
"average": "4.7"
},
"config": {
"banner": {
"width": 1230,
"height": 313,
"crop": "yes"
},
"logo": {
"width": 180,
"height": 140,
"crop": "yes"
}
}
}
Error Responses #
Not Logged In (403) #
{
"status": "error",
"error": "FORBIDDEN",
"code": "403",
"error_message": "You are not logged in."
}
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."
}