/services/webshop/v1/categories/update
Auth
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id |
integer | Yes | 42 |
|
category_title |
string
max: 255 |
Yes | Electronics |
|
category_url |
string
max: 500 |
Yes | electronics |
|
status |
integer|null
0, 1 |
No | 1 |
|
sort_number |
integer|null | No | 2 |
|
main_image |
string|null | No | /images/electronics.jpg |
|
templates |
integer|null | No | 1 |
|
layout |
string|null
max: 191 |
No | default |
|
short_description |
string|null | No | Browse our wide selection of electronics |
|
description |
string|null | No | <p>Discover the latest electronics at great prices.</p> |
|
meta_title |
string|null | No | Electronics - Best Deals Online |
|
meta_image |
string|null | No | /images/electronics-og.jpg |
|
meta_description |
string|null | No | Shop electronics at unbeatable prices. |
|
meta_keyword |
string|null | No | electronics, gadgets, tech |
|
canonical_url |
string|null | No | https://example.com/electronics |
|
no_index |
string|null
0, 1 |
No | 0 |
|
disable_category_page |
string|null
0, 1 |
No | 0 |
|
adwords_identifier |
number|null | No | 123456789 |
|
product_sort_preference |
string|null
sort_number_asc, sort_number_desc, created_at_asc, created_at_desc, price_asc, price_desc, title_asc, title_desc |
No | sort_number_asc |
|
sub_categories |
array|null | No | [] |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
details |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed |
| Field | Type | Description |
|---|---|---|
message |
string | Errors overview. |
errors |
object | A detailed description of each field that failed validation. |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
Retry-After |
integer | Seconds until the rate limit resets | 60 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
curl -X POST "https://api.wemasy.nl/api/services/webshop/v1/categories/update" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"id": 42,
"category_title": "Electronics",
"category_url": "electronics",
"status": 1,
"sort_number": 2,
"main_image": "/images/electronics.jpg",
"templates": 1,
"layout": "default",
"short_description": "Browse our wide selection of electronics",
"description": "Discover the latest electronics at great prices.
",
"meta_title": "Electronics - Best Deals Online",
"meta_image": "/images/electronics-og.jpg",
"meta_description": "Shop electronics at unbeatable prices.",
"meta_keyword": "electronics, gadgets, tech",
"canonical_url": "https://example.com/electronics",
"no_index": "0",
"disable_category_page": "0",
"adwords_identifier": 123456789,
"product_sort_preference": "sort_number_asc",
"sub_categories": []
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/categories/update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"id": 42,
"category_title": "Electronics",
"category_url": "electronics",
"status": 1,
"sort_number": 2,
"main_image": "/images/electronics.jpg",
"templates": 1,
"layout": "default",
"short_description": "Browse our wide selection of electronics",
"description": "Discover the latest electronics at great prices.
",
"meta_title": "Electronics - Best Deals Online",
"meta_image": "/images/electronics-og.jpg",
"meta_description": "Shop electronics at unbeatable prices.",
"meta_keyword": "electronics, gadgets, tech",
"canonical_url": "https://example.com/electronics",
"no_index": "0",
"disable_category_page": "0",
"adwords_identifier": 123456789,
"product_sort_preference": "sort_number_asc",
"sub_categories": []
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
->accept('application/json')
->post('https://api.wemasy.nl/api/services/webshop/v1/categories/update', {
"id": 42,
"category_title": "Electronics",
"category_url": "electronics",
"status": 1,
"sort_number": 2,
"main_image": "/images/electronics.jpg",
"templates": 1,
"layout": "default",
"short_description": "Browse our wide selection of electronics",
"description": "Discover the latest electronics at great prices.
",
"meta_title": "Electronics - Best Deals Online",
"meta_image": "/images/electronics-og.jpg",
"meta_description": "Shop electronics at unbeatable prices.",
"meta_keyword": "electronics, gadgets, tech",
"canonical_url": "https://example.com/electronics",
"no_index": "0",
"disable_category_page": "0",
"adwords_identifier": 123456789,
"product_sort_preference": "sort_number_asc",
"sub_categories": []
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"id": 42,
"category_title": "Electronics",
"category_url": "electronics",
"status": 1,
"sort_number": 2,
"main_image": "/images/electronics.jpg",
"templates": 1,
"layout": "default",
"short_description": "Browse our wide selection of electronics",
"description": "Discover the latest electronics at great prices.
",
"meta_title": "Electronics - Best Deals Online",
"meta_image": "/images/electronics-og.jpg",
"meta_description": "Shop electronics at unbeatable prices.",
"meta_keyword": "electronics, gadgets, tech",
"canonical_url": "https://example.com/electronics",
"no_index": "0",
"disable_category_page": "0",
"adwords_identifier": 123456789,
"product_sort_preference": "sort_number_asc",
"sub_categories": []
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/categories/update", headers=headers, json=data)
print(r.json())
{
"error": false,
"message": "string",
"data": "string"
}