> ## Documentation Index
> Fetch the complete documentation index at: https://developer.jtl-software.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Category Tree

> Update Channel Category tree.




## OpenAPI

````yaml /openapi/scx/channel.json put /v1/channel/categories
openapi: 3.0.2
info:
  title: JTL-Channel API
  version: 1.0.0
  x-logo:
    url: https://scx-sandbox.ui.jtl-software.com/docs/scx.png
  description: >
    JTL-Channel API is a REST-based API that helps a Channel Integrator to
    connect Marketplace with the JTL-Wawi 

    ERP System.


    # Key Features


    With the JTL-Channel API, you can:

      * Describe connected Marketplace Data Structure by providing Category and Attribute Data
      * Manage Product and Offer Listings
      * Manage Orders 
      * Handle the Post Order Process

    # Development Guide


    There is a detailed development guide available at
    [developer.jtl-software.com](https://developer.jtl-software.com/products/marketplaces/scx-channel-api/change_log).
servers:
  - url: https://scx-sbx.api.jtl-software.com
    description: Sandbox
  - url: https://scx.api.jtl-software.com
    description: Production
security: []
tags:
  - name: Seller
    description: |
      Seller Management
  - name: Channel
    description: Meta channel routes
  - name: Notification
    description: Channel notifications
  - name: Supported Prices
    description: Price type management
  - name: Meta
    description: meta
  - name: Attributes
    description: Channel attributes
  - name: Categories
    description: Channel categories
  - name: Order
    description: Orders
  - name: Return
    description: Order returns
  - name: Events
    description: SCX events
  - name: Offer
    description: Channel offers
  - name: Report
    description: SCX reports
  - name: Ticket
    description: Channel tickets
  - name: Stock Updates
    description: Stock update operations
paths:
  /v1/channel/categories:
    put:
      tags:
        - Categories
      summary: Update Category Tree
      description: |
        Update Channel Category tree.
      operationId: CreateChannelCategoryTree
      parameters:
        - $ref: '#/components/parameters/ContentEncodingGzip'
      requestBody:
        $ref: '#/components/requestBodies/ChannelCategories'
      responses:
        '201':
          $ref: '#/components/responses/CategoryTreeCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - ChannelAuth: []
components:
  parameters:
    ContentEncodingGzip:
      in: header
      name: Content-Encoding
      description: >
        Use the Content-Encoding: gzip when sending JSON requestBody as
        compressed payload. This is recommended when

        creating huge category trees. There is a limit of 32 MB on this route.
      schema:
        type: string
        enum:
          - gzip
      required: false
  requestBodies:
    ChannelCategories:
      description: >-
        Full marketplace category tree to be published for use in seller
        listings.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ChannelCategoryTree'
  responses:
    CategoryTreeCreated:
      description: Category Tree created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CategoryTreeVersion'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseList'
          example:
            errorList:
              - code: VAL100
                message: Required field sellerId not found
                severity: error
                hint: Check the field `sellerId` — it must be a non-empty string.
    AccessForbidden:
      description: Access forbidden, invalid or unknown Token was used.
    ServerError:
      description: Unexpected Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseList'
          example:
            errorList:
              - code: GEN500
                message: Internal Server Error
                severity: error
                hint: null
  schemas:
    ChannelCategoryTree:
      description: >-
        Full category tree published by the channel, structured as a list of
        root categories with nested children.
      type: object
      properties:
        categoryList:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Category'
    CategoryTreeVersion:
      description: >-
        Version identifier returned after publishing or updating the channel
        category tree.
      type: object
      properties:
        categoryTreeVersion:
          type: string
          example: 1559721549-ajifn
    ErrorResponseList:
      type: object
      properties:
        errorList:
          nullable: true
          type: array
          example:
            - code: GEN700
              message: Seller SELLER_4711 does not exist on channel kaufland.
              severity: error
              hint: i9n-order22
          items:
            title: Error
            type: object
            properties:
              code:
                type: string
                example: GEN700
              message:
                type: string
                example: Seller SELLER_4711 does not exist on channel kaufland.
              severity:
                type: string
                enum:
                  - error
                  - warning
                  - info
                default: error
              hint:
                type: string
                nullable: true
                example: i9n-order22
    Category:
      type: object
      required:
        - categoryId
        - displayName
        - isLeaf
      properties:
        categoryId:
          description: Channel category Id.
          type: string
          minLength: 1
          maxLength: 512
          example: '4711'
        displayName:
          description: Category display name.
          type: string
          example: Beer
          minLength: 1
          maxLength: 250
        listingAllowed:
          description: Mark a categoryId as leaf. Only leaf categories can list offers.
          type: boolean
          default: true
        parentCategoryId:
          description: >-
            Parent category Id. If category is 0 the current category is
            considered as root category.
          type: string
          minLength: 1
          maxLength: 512
          example: '2343'
  securitySchemes:
    ChannelAuth:
      description: >
        As a Channel Integrator you will receive a API Refresh Token. With such
        a Refresh Token you

        need to request an Access Token with a limited Lifetime (see POST
        /v1/auth). This Access Token

        must be provided as a Bearer Token in the Authorization Header with
        every request.
      type: http
      scheme: bearer
      bearerFormat: JWT

````