> ## Documentation Index
> Fetch the complete documentation index at: https://help.aasaan.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Put multiple categories

> Create or Update multiple categories'



## OpenAPI

````yaml put /categories/
openapi: 3.0.0
info:
  title: AASAAN REST API
  version: 1.0.0
  description: >-
    REST API endpoints are organized by resource type. You’ll need to use
    different endpoints depending on your app’s requirements.
servers:
  - url: https://api.aasaan.shop/api/v1/stores
    description: Development server
security: []
tags: []
paths:
  /categories/:
    put:
      tags:
        - Category
      summary: Put multiple categories
      description: Create or Update multiple categories'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CategoryBodyWithId'
                type: object
      responses:
        '201':
          description: >-
            Categories created or updated in the category array, errors for
            those categories that couldn't be updated or created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    items:
                      $ref: '#/components/schemas/Category'
                      type: object
                  errors:
                    type: array
                    items:
                      type: string
                      example: Category with CategoryId - category-id-1 is missing name
        '403':
          description: Invalid Api Key
        '422':
          description: Data error
        '500':
          description: Internal Server Error
components:
  schemas:
    CategoryBodyWithId:
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: id
          example: ae7219
        name:
          type: string
          description: Name
          example: Shampoo
        slug:
          type: string
          description: Slug
          example: shampoo
        description:
          type: string
          description: Shampoos and conditioners
          example: Hair categories
        hide:
          type: boolean
          description: Hide a category
          example: false
        displayOrder:
          type: string
          description: Display order
          example: 0
        parentCategoryId:
          type: string
          description: Parent category id
          example: 6124bc492f3660f743776404
        image:
          type: object
          description: Category image
          properties:
            id:
              type: string
              description: Image identifier
              example: 0
            url:
              type: string
              description: Image URL
              example: https://images.aasaan.app/123412421
            type:
              type: string
              description: Mime Type
              example: image/png
    Category:
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the resource that was used to create this
            category
          example: 623d3455ec3c4b3548eb4a322
        name:
          type: string
          description: Name
          example: Shampoo
        slug:
          type: string
          description: Slug
          example: shampoo
        description:
          type: string
          description: Shampoos and conditioners
          example: Hair categories
        hide:
          type: boolean
          description: Hide a category
          example: false
        displayOrder:
          type: string
          description: Display order
          example: 0
        parentCategoryId:
          type: string
          description: Parent category id
          example: 6124bc492f3660f743776404
        image:
          type: object
          description: Category image
          properties:
            id:
              type: string
              description: Image identifier
              example: 0
            url:
              type: string
              description: Image URL
              example: https://images.aasaan.app/123412421
            type:
              type: string
              description: Mime Type
              example: image/png
        date_created:
          type: string
          description: Created date
          example: '2022-03-25T03:17:44.092Z'
        date_modified:
          type: string
          description: Modified date
          example: '2022-06-10T07:51:12.510Z'

````