Light Mode
Create Category
POST
/categoriesLast modified: 3 days ago
This endpoint allows you to create a new category and return the category ID and its details.
Request
Body Params application/json
No schema defined
Example
{
"name": "طعام قطط",
"status": "hidden",
"image": "https://salla-dev.s3.eu-central-1.amazonaws.com/Mvyk/dBmLWHOfKm3tRfQ3Txqs3l96SjI6jdbf6rCsYYQu.jpg",
"metadata_title": "Dress",
"metadata_description": "Amazing Dress",
"metadata_url": "https://dress.com",
"show_in": {
"app": true
},
"translations": {
"en": {
"name": "cat food",
"metadata_title": "cat food",
"metadata_description": "welcome",
"metadata_url": "cat-food"
}
}
}
Request samples
Responses
Created(201)
Error Validation(422)
HTTP Code: 201
Content Type : JSONapplication/json
Data Schema
No schema defined
Example
{
"status": 201,
"success": true,
"data": {
"id": 707972603,
"name": "Dress 101",
"urls": {
"customer": "https://shtara.com/profile",
"admin": "https://shtara.com/profiles"
},
"sort_order": 0,
"items": [],
"parent_id": 516861512,
"status": "hidden",
"metadata": {
"title": "Dress",
"description": "Amazing Dress",
"url": "https://dress.com"
}
}
}
Last modified: 3 days ago