PUT
/
categories
/
curl --request PUT \
  --url https://api.aasaan.shop/api/v1/stores/categories/ \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "description": "Hair categories",
    "displayOrder": "<string>",
    "hide": true,
    "id": "ae7219",
    "image": {
      "id": "<string>",
      "type": "image/png",
      "url": "https://images.aasaan.app/123412421"
    },
    "name": "Shampoo",
    "parentCategoryId": "6124bc492f3660f743776404",
    "slug": "shampoo"
  }
]'
{
  "categories": [
    {
      "date_created": "2022-03-25T03:17:44.092Z",
      "date_modified": "2022-06-10T07:51:12.510Z",
      "description": "Hair categories",
      "displayOrder": "<string>",
      "hide": true,
      "id": "623d3455ec3c4b3548eb4a322",
      "image": {
        "id": "<string>",
        "type": "image/png",
        "url": "https://images.aasaan.app/123412421"
      },
      "name": "Shampoo",
      "parentCategoryId": "6124bc492f3660f743776404",
      "slug": "shampoo"
    }
  ],
  "errors": "Category with CategoryId - category-id-1 is missing name"
}

Body

application/json · object[]
description
string

Shampoos and conditioners

displayOrder
string

Display order

hide
boolean

Hide a category

id
string
required

id

image
object

Category image

name
string
required

Name

parentCategoryId
string

Parent category id

slug
string

Slug

Response

201 - application/json
categories
object[]
errors
string[]