This will update a category is given a category id

POST /v1/shop/category

This will update a category is given a category id, or will will create a new category and return an updated category list

application/json

Body

Product category request for category data transfer object

  • categories array[object] Required

    List of product categories to create or update

    Hide categories attributes Show categories attributes object
    • name string Required

      Product category name

    • id string

      product category id

Responses

  • 200 application/json

    Update a given set of categories

    Hide response attribute Show response attribute object
    • categories array[object] Required
      Hide categories attributes Show categories attributes object
      • id string Required
      • name string Required
  • 201 application/json

    Create (and maybe update) a given set of categories

    Hide response attribute Show response attribute object
    • categories array[object] Required
      Hide categories attributes Show categories attributes object
      • id string Required
      • name string Required
POST /v1/shop/category
curl \
 --request POST 'https://api-dev.classmanager.io/v1/shop/category' \
 --header "Content-Type: application/json" \
 --data '{"categories":[{"name":"Hip-Hop Wear","id":"pcat_01jq6nbd773fbtsfdd3y7fd13g"}]}'
Request examples
{
  "categories": [
    {
      "name": "Hip-Hop Wear",
      "id": "pcat_01jq6nbd773fbtsfdd3y7fd13g"
    }
  ]
}
Response examples (200)
{
  "categories": [
    {
      "id": "pcat_01jq6nbd7b8hvajm12rbycwazt",
      "name": "Ballroom Costumes"
    }
  ]
}
Response examples (201)
{
  "categories": [
    {
      "id": "pcat_01jq6nbd7b8hvajm12rbycwazt",
      "name": "Ballroom Costumes"
    }
  ]
}