# Update Preset

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/attributes/{Attribute-Id}/presets/{Preset-Id}/:
    patch:
      summary: Update Preset
      deprecated: false
      description: >-
        Use this endpoint to update an existing attribute preset by specifying
        both the preset ID and the attribute ID. The request allows you to
        update the preset values in different languages.


        <Accordion title="🔑Scopes" defaultOpen>
            
          `products.read_write` - Products Read & Write
         
        </Accordion>
      tags:
        - Default module/Apps/Merchant APIs/Products/Product Attribute Presets
        - Product Attribute Presets
      parameters:
        - name: Attribute-Id
          in: path
          description: The unique identifier for the attribute to which the preset belongs.
          required: true
          example: cfb5bd3f-bbc5-4439-a171-b2d70e1c0293
          schema:
            type: string
            examples:
              - '1'
        - name: Preset-Id
          in: path
          description: The unique identifier for the preset to be updated.
          required: true
          example: 4469e2f3-20b5-438b-893d-a22e61d55b7b
          schema:
            type: string
            examples:
              - 794e96c3-227e-4abc-9521-725d147f1e61
        - 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: true
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Store-Id
          in: header
          description: >-
            The unique numeric identifier of the store under which the API
            request is being performed.
          required: true
          example: '{{StoreId}}'
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: object
                  properties:
                    ar:
                      type: string
                      description: The updated attribute preset value in Arabic.
                      examples:
                        - الحجم
                    en:
                      type: string
                      description: The updated attribute preset value in English.
                      examples:
                        - Size
                  x-apidog-orders:
                    - ar
                    - en
                  description: >-
                    An object containing the updated localized values for the
                    attribute preset in both Arabic and English.
                  x-apidog-ignore-properties: []
              x-apidog-orders:
                - value
              x-apidog-ignore-properties: []
            example:
              value:
                ar: Size Size
                en: Size Size
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributePresetObject'
              example:
                id: 4469e2f3-20b5-438b-893d-a22e61d55b7b
                slug: color-6
                name: ''
                value: Size Size
                type: default
                type_value: null
                display_order: null
                attribute_image_id: null
                attribute_id: cfb5bd3f-bbc5-4439-a171-b2d70e1c0293
          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: '#/components/schemas/ResponseEnvelopMessage'
                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 Attribute Presets
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-9148563-run
components:
  schemas:
    AttributePresetObject:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        value:
          type: string
        type:
          type: string
        type_value:
          type: string
          nullable: true
        display_order:
          type: integer
          nullable: true
        attribute_image_id:
          type: string
          nullable: true
        attribute_id:
          type: string
      required:
        - id
        - slug
        - name
        - value
        - type
        - type_value
        - display_order
        - attribute_image_id
        - attribute_id
      x-apidog-orders:
        - id
        - slug
        - name
        - value
        - type
        - type_value
        - display_order
        - attribute_image_id
        - attribute_id
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    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: ''
  securitySchemes: {}
servers:
  - url: https://api.zid.sa/
    description: Prod Env
security: []

```
