Elmatajer · API docs
Categories

Create a category

Adds a category. Send multipart/form-data to include an image.

POSThttps://elmatajer.com/api/v1/vendor/categories
Permission: products.write

Request body

NameTypeRequiredDescription
namestringYesCategory name.
name_enstringNoEnglish name.
imagefileNojpg, png or webp, up to 4 MB.

Request

curl -X POST "https://elmatajer.com/api/v1/vendor/categories" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"ملابس","name_en":"Clothing"}'

Response 200

{
    "status": "ok",
    "data": {
        "id": 91,
        "name": "ملابس",
        "name_en": "Clothing",
        "slug": "clothing",
        "image": null,
        "is_available": true,
        "product_count": 0
    }
}