# Update Asset

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/assets/update:
    post:
      summary: Update Asset
      deprecated: false
      description: ''
      tags:
        - empeo/Core HR/Asset
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: >-
            Bearer
            eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwN0I2RTQ3QTU1MzkxOTdDQ0Y2NzlDNTVEODFFNDQ1RTE2NUQ2QkVSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6InNIdHVSNlZUa1pmTTlubkZYWUhrUmVGbDFyNCJ9.eyJuYmYiOjE2OTE0MDQ1NzUsImV4cCI6MTY5MTQwODE3NSwiaXNzIjoiaHR0cHM6Ly9sb2dpbi5nb2ZpdmUuY28udGgiLCJhdWQiOlsiR09GSVZFLkFQSSIsIklNQy5BUEkiXSwiY2xpZW50X2lkIjoiRW1wZW9BdXRoZW4tT3BlbkFwaSIsInN1YiI6IjE5ZTRlZDVjLWJhNTktNDAzMi05OTUyLWYzYzQ3YWFlODUzOCIsImF1dGhfdGltZSI6MTY5MTQwNDU3NSwiaWRwIjoibG9jYWwiLCJDbGllbnRJZCI6IkVtcGVvQXV0aGVuLU9wZW5BcGkiLCJyb2xlIjoiIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiY2hhaXRoYXdhdC55YUBnbG9iYWwua29tYXRzdSIsInNpZCI6IjYzRkI4M0E5OUVGNkY3NUQ4OUFDQjc5MDIwRDc5MUI3IiwiaWF0IjoxNjkxNDA0NTc1LCJzY29wZSI6WyJHT0ZJVkUuQVBJIiwiSU1DLkFQSSIsIm9wZW5pZCIsInByb2ZpbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl19.VZzigCC7Znq9XGwbka1uXkKquWwuapah5GyhKZaiFFeaKW-yWYt76vodQt72RMmDQxA21MN8pYqbF2MkQlFAvP0yw9IyzpEzYsxs_0fCDWqSAQenmrJ_9o8pkX-Rc89MQvmQJBNOg0dFsYGm2W441KTK43JgP1LUIC-CPhELj3jAHNQqe6PF3j0xAl7D-fZYdbqQXI890gD0PAf8E3za4yPVsf31DV7ies3vwE8x74S5WD8sFD8R9bMC0iKmaZ_YHd4JWswF4iwiDTmifST7iKAdGizeYWXfYPC9EZD5d3GOnX_hRby2QDfuXtg1ec9esVunuYfklupTvabxiFWebw
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: ''
          required: false
          example: 20ed4158ed784b1da077647b263ccf6e
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                assetCategoryId:
                  type: integer
                serialNo:
                  type: string
                branchId:
                  type: integer
                cost:
                  type: number
                remark:
                  type: string
                tagNames:
                  type: string
                  description: Asset tag names, separated by comma ( , )
                hasWarranty:
                  type: boolean
                  description: default = false
                monthOfWarranty:
                  type: integer
                  description: require if HasWarranty is true
                datePurchase:
                  type: string
                  description: require if HasWarranty is true
                isCommon:
                  type: boolean
                  description: default = false
                employeeRefId:
                  type: string
                  description: Ref ID of the owner employee
                companyName:
                  type: string
                  description: Company name of the owner employee
                assetCodeRefId:
                  type: string
                  description: null or non-existent code  = add, existing code = edit
                newAssetCodeRefId:
                  type: string
                  description: New code value to edit asset code
              x-apidog-orders:
                - assetCodeRefId
                - newAssetCodeRefId
                - name
                - assetCategoryId
                - datePurchase
                - employeeRefId
                - companyName
                - serialNo
                - branchId
                - cost
                - remark
                - tagNames
                - hasWarranty
                - monthOfWarranty
                - isCommon
              required:
                - name
                - assetCategoryId
                - employeeRefId
                - companyName
                - datePurchase
            example:
              assetCodeRefId: Asset001
              newAssetCodeRefId: Asset002
              name: MacBook Air 13
              assetCategoryId: 23452
              companyName: Gofive
              employeeRefId: '8888'
              serialNo: EP3600
              branchId: 0
              cost: 4999
              remark: "MacBook Air 13: M1 chip 8C CPU/7C GPU/8GB/256GB - Gold-2020 MacBook Air\_พลังหนักๆ บนความบางเบา โน้ตบุ๊คที่บางและเบาที่สุดของเรา วันนี้พลิกโฉมใหม่หมดในทุกด้าน ด้วยชิพ Apple M1 ที่ทำให้มี CPU เร็วขึ้นสูงสุด 3.5 เท่า และ GPU เร็วขึ้นสูงสุด 5 เท่า รวมทั้ง Neural Engine ที่ล้ำหน้าที่สุดของเรา"
              tagNames: ไอที
              hasWarranty: true
              monthOfWarranty: 12
              datePurchase: '2024-08-12 14:35:42'
              isCommon: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                      result:
                        type: boolean
                    required:
                      - message
                      - result
                    x-apidog-orders:
                      - message
                      - result
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  message: Asset added successfully.
                  result: true
          headers: {}
          x-apidog-name: Success
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: empeo/Core HR/Asset
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-9071055-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
