# Create Category

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/managers/store/categories/add:
    post:
      summary: Create Category
      deprecated: false
      description: |-
        Use this endpoint to add a new store category.

        <Accordion title="🔑Scopes" defaultOpen>
            
          `products.read` - Products Read
         
        </Accordion>
      tags:
        - Default module/Apps/Merchant APIs/Products/Product Categories
        - Product Categories
      parameters:
        - name: Authorization
          in: header
          description: >-
            The Authorization token is a unique key given to the third-party
            application (Partner) by Zid. It is used to authenticate the API
            requests made by the Partner application. The token verifies the
            partner's identity and ensures they have permission to access Zid's
            API but does not provide any specific user or store information. It
            should be included in the header of API requests when the partner
            application needs to access Zid's API.
          required: true
          example: '{{Autherization}}'
          schema:
            type: string
        - name: X-Manager-Token
          in: header
          description: >-
            This token is used to authenticate and access information related to
            the store. It is obtained through an OAuth mechanism and is required
            to perform operations on the store's data. The `X-Manager-Token`
            should be included in the header of API requests that require
            store-related information.
          required: false
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Preferred language for the response. Defaults to `en` if not
            specified.
          required: false
          example: en
          schema:
            type: string
            enum:
              - en
              - ar
            examples:
              - en
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name[ar]:
                  type: string
                  example: hello hello
                name[en]:
                  type: string
                  example: hello hello
                description[ar]:
                  type: string
                  example: hello hello
                description[en]:
                  type: string
                  example: hello hello
              required:
                - name[ar]
                - name[en]
                - description[ar]
                - description[en]
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  category:
                    $ref: '#/components/schemas/DefaultCategorySerializer'
                  message: &ref_0
                    $ref: '#/components/schemas/ResponseEnvelopMessage'
                required:
                  - status
                  - category
                  - message
                x-apidog-orders:
                  - status
                  - category
                  - message
                x-apidog-ignore-properties: []
              example:
                status: object
                category:
                  id: 1482383
                  name: test121212124
                  uuid: 6d439dd1-6411-444d-babf-5fdb946fd90d
                  slug: test121212124
                  SEO_category_title: test121212124
                  SEO_category_description: test121212124
                  i18n_SEO_category_title:
                    ar: test121212124
                    en: test121212124
                  i18n_SEO_category_description:
                    ar: test121212124
                    en: test121212124
                  names:
                    en: test121212124
                    ar: test121212124
                  description:
                    en: test121212124
                    ar: test121212124
                  url: https://osama.zid.store/categories/1482383/test121212124
                  image: null
                  image_full_size: null
                  img_alt_text: ''
                  i18n_img_alt_text:
                    ar: null
                  cover_image: null
                  image_full: null
                  products_count: 0
                  sub_categories: []
                  parent_id: null
                  flat_name: test121212124
                  is_published: true
                  metafields:
                    - id: 2cf0cf26-d468-452a-9492-2fe5970c3cd8
                      name:
                        ar: لون
                        en: Color
                      slug: Color-1
                      data_type: text
                      display_order: 3
                      structure_definition: null
                      value: null
                    - id: 6579510a-0ce0-4f83-b53f-e3abe9c0f0d5
                      name:
                        ar: null
                        en: g gg
                      slug: g-gg
                      data_type: text
                      display_order: 2
                      structure_definition: null
                      value: null
                    - id: ff173ea4-429c-40f0-a6a0-8e29e655ea83
                      name:
                        ar: null
                        en: date
                      slug: date
                      data_type: date
                      display_order: 1
                      structure_definition: null
                      value: null
                message:
                  type: object
                  code: null
                  name: null
                  description: null
          headers: {}
          x-apidog-name: OK
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Response returned when the request cannot be authenticated
                  because the required credentials are missing, invalid, or
                  expired.
                properties:
                  status:
                    type: string
                    description: Indicates the overall status of the API response.
                    examples:
                      - error
                  message:
                    type: object
                    description: >-
                      Contains structured details explaining why the request
                      could not be authenticated.
                    properties:
                      type:
                        type: string
                        description: Indicates the category of the response message.
                        examples:
                          - error
                      code:
                        type: string
                        description: >-
                          A machine-readable code identifying the authentication
                          error. Returns null when no specific code is
                          available.
                        examples:
                          - UNAUTHORIZED
                        nullable: true
                      name:
                        type: string
                        description: >-
                          A short, human-readable title describing the
                          authentication error. Returns null when no title is
                          available.
                        examples:
                          - Unauthorized
                        nullable: true
                      description:
                        type: string
                        description: >-
                          A human-readable explanation of why the request could
                          not be authenticated. Returns null when no detailed
                          explanation is available.
                        examples:
                          - >-
                            Authentication credentials are missing, invalid, or
                            expired.
                        nullable: true
                    required:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-orders:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                examples:
                  - status: error
                    message:
                      type: error
                      code: UNAUTHORIZED
                      name: Unauthorized
                      description: >-
                        Authentication credentials are missing, invalid, or
                        expired.
                x-apidog-ignore-properties: []
              examples:
                '2':
                  summary: Example 1
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_MISSING
                      name: Sorry
                      description: Please login first.
                '3':
                  summary: Example 2
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Login session expired. Please login again.
                '4':
                  summary: Example 3
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Invalid authentication
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the error.
                  message: *ref_0
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                x-apidog-ignore-properties: []
              example:
                status: error
                message:
                  type: error
                  code: MSG_HIDDEN
                  name: Error
                  description: Internal Server Error
          headers: {}
          x-apidog-name: Internal Server error
      security: []
      x-apidog-folder: Default module/Apps/Merchant APIs/Products/Product Categories
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-9148593-run
components:
  schemas:
    ResponseEnvelopMessage:
      type: object
      properties:
        type:
          type: string
          description: Type of response message returned by the API.
          examples:
            - success
        code:
          type: string
          description: Response code returned by the API, if available.
          examples:
            - MSG_POPUP_OK
          nullable: true
        name:
          type: string
          description: Name or title of the response message, if available.
          examples:
            - Coupons
          nullable: true
        description:
          type: string
          description: Detailed description of the response message, if available.
          examples:
            - Coupons created successfully
          nullable: true
      required:
        - type
        - code
        - name
        - description
      description: Additional response metadata.
      x-apidog-orders:
        - type
        - code
        - name
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    DefaultCategorySerializer:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        uuid:
          type: string
        slug:
          type: string
        SEO_category_title:
          type: string
        SEO_category_description:
          type: string
        i18n_SEO_category_title:
          type: object
          properties:
            ar:
              type: string
            en:
              type: string
          required:
            - ar
            - en
          x-apidog-orders:
            - ar
            - en
          x-apidog-ignore-properties: []
        i18n_SEO_category_description:
          type: object
          properties:
            ar:
              type: string
            en:
              type: string
          required:
            - ar
            - en
          x-apidog-orders:
            - ar
            - en
          x-apidog-ignore-properties: []
        names:
          type: object
          properties:
            en:
              type: string
            ar:
              type: string
          required:
            - en
            - ar
          x-apidog-orders:
            - en
            - ar
          x-apidog-ignore-properties: []
        description:
          type: object
          properties:
            en:
              type: string
            ar:
              type: string
          required:
            - en
            - ar
          x-apidog-orders:
            - en
            - ar
          x-apidog-ignore-properties: []
        url:
          type: string
        image:
          type: string
          nullable: true
        image_full_size:
          type: string
          nullable: true
        img_alt_text:
          type: string
        i18n_img_alt_text:
          type: object
          properties:
            ar:
              type: string
              nullable: true
          required:
            - ar
          x-apidog-orders:
            - ar
          x-apidog-ignore-properties: []
        cover_image:
          type: string
          nullable: true
        image_full:
          type: string
          nullable: true
        products_count:
          type: integer
        sub_categories:
          type: array
          items:
            type: string
        parent_id:
          type: string
          nullable: true
        flat_name:
          type: string
        is_published:
          type: boolean
        metafields:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: object
                properties:
                  ar:
                    type: string
                    nullable: true
                  en:
                    type: string
                required:
                  - ar
                  - en
                x-apidog-orders:
                  - ar
                  - en
                x-apidog-ignore-properties: []
              slug:
                type: string
              data_type:
                type: string
              display_order:
                type: integer
              structure_definition:
                type: string
                nullable: true
              value:
                type: string
                nullable: true
            required:
              - id
              - name
              - slug
              - data_type
              - display_order
              - structure_definition
              - value
            x-apidog-orders:
              - id
              - name
              - slug
              - data_type
              - display_order
              - structure_definition
              - value
            x-apidog-ignore-properties: []
      required:
        - id
        - name
        - uuid
        - slug
        - SEO_category_title
        - SEO_category_description
        - i18n_SEO_category_title
        - i18n_SEO_category_description
        - names
        - description
        - url
        - image
        - image_full_size
        - img_alt_text
        - i18n_img_alt_text
        - cover_image
        - image_full
        - products_count
        - sub_categories
        - parent_id
        - flat_name
        - is_published
        - metafields
      x-apidog-orders:
        - id
        - name
        - uuid
        - slug
        - SEO_category_title
        - SEO_category_description
        - i18n_SEO_category_title
        - i18n_SEO_category_description
        - names
        - description
        - url
        - image
        - image_full_size
        - img_alt_text
        - i18n_img_alt_text
        - cover_image
        - image_full
        - products_count
        - sub_categories
        - parent_id
        - flat_name
        - is_published
        - metafields
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.zid.sa/
    description: Prod Env
security: []

```
