---
title: "Update an asset"
url: "https://developers.vzconnect.com/apis/non-powered-assets-api-1/versions/b533035a-e30c-4262-8e48-4a8c49989686/operations/V1AssetsByAssetNumberPut"
---

> Full API specification: https://developers.vzconnect.com/apis/non-powered-assets-api-1/versions/b533035a-e30c-4262-8e48-4a8c49989686.md

# Update an asset

`PUT` `/ast/v1/assets/{assetNumber}`

Operation ID: `V1AssetsByAssetNumberPut`

Update the Asset, identified by assetNumber with the details of the DTO. The update is partial, any fields not specified or specified as null will not be updated. To change an asset's primary group, use PUT /v1/assets/{assetNumber}/primaryGroup/{primaryGroupId}. Sample requests: PUT /v1/assets/A10001 { "AssetNumber": "A76", "AssetName": "Flatbed - 76" } PUT /v1/assets/A10001 { "AssetNumber": null, "AssetName": null, "Make": null, "Model": null, "Year": null, "Notes": "Booked for major work, will be out-of-service for two weeks starting November 1st" } PUT /v1/assets/A10001 { "AssetName": "Refrigeration Unit 3", "Make": "Hino", "Year": 2020, } Sample responses: 204 404 { "Message": "The AssetNumber was not found A99999", } 400 { "Message": "The AssetName A10002 is already in use", }

## Path parameters

- `assetNumber` (string, required) - The AssetNumber that defines the Asset that will be updated. Should not be null or empty and should be no more than 96 characters long

## Request body

Content types: `application/xml`, `application/*+xml`, `application/json-patch+json`, `application/*+json`, `application/json`, `text/json`, `text/xml`

## Responses

- `204` - If the request was successful
- `400` - If the request was invalid. For example, the AssetNumber to be updated was already in use.
- `401` - If the authentication credentials were invalid
- `404` - If the assetNumber was not found
- `500` - If an unknown error occurred when processing the request

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Non-Powered Assets API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /ast/v1/assets/{assetNumber}:
    put:
      tags:
        - Non-Powered Assets API
      summary: Update an asset
      description: >-
        Update the Asset, identified by assetNumber with the details of the DTO.
        The update is partial, any fields not specified or specified as null
        will not be updated. To change an asset's primary group, use PUT
        /v1/assets/{assetNumber}/primaryGroup/{primaryGroupId}.


        Sample requests:
                    
            PUT /v1/assets/A10001
            {
                "AssetNumber": "A76",
                "AssetName": "Flatbed - 76"
            }
                    
            PUT /v1/assets/A10001
            {
                "AssetNumber": null,
                "AssetName": null,
                "Make": null,
                "Model": null,
                "Year": null,
                "Notes": "Booked for major work, will be out-of-service for two weeks starting November 1st"
            }
                    
            PUT /v1/assets/A10001
            {
                "AssetName": "Refrigeration Unit 3",
                "Make": "Hino",
                "Year": 2020,
            }

                    
        Sample responses:
                    
            204
                    
            404
            {
                "Message": "The AssetNumber was not found A99999",
            }
                    
            400
            {
                "Message": "The AssetName A10002 is already in use",
            }
      operationId: V1AssetsByAssetNumberPut
      parameters:
        - name: assetNumber
          in: path
          description: The AssetNumber that defines the Asset that will be updated. Should
            not be null or empty and should be no more than 96 characters long
          required: true
          schema:
            type: string
            description: The AssetNumber that defines the Asset that will be updated. Should
              not be null or empty and should be no more than 96 characters long
      requestBody:
        description: The DTO that specifies what Asset information should be updated. At
          least one field should not be null. The usual validity checks apply to
          the fields that are not null, for example, a new AssetNumber should
          not be empty and should be no more than 96 characters long.
        content:
          application/xml:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
          application/*+xml:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
          application/json-patch+json:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
          application/*+json:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
          application/json:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
          text/json:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
          text/xml:
            schema:
              $ref: "#/components/schemas/ExternalAssetUpdate"
      responses:
        "204":
          description: If the request was successful
        "400":
          description: If the request was invalid. For example, the AssetNumber to be
            updated was already in use.
        "401":
          description: If the authentication credentials were invalid
        "404":
          description: If the assetNumber was not found
        "500":
          description: If an unknown error occurred when processing the request
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/ast/v1/assets/[^/]+/?$
components:
  schemas:
    ExternalAssetUpdate:
      type: object
      properties:
        AssetNumber:
          maxLength: 96
          type: string
        AssetName:
          type: string
        Make:
          type: string
        Model:
          type: string
        Year:
          type: integer
          format: int32
        Notes:
          type: string
```
