McMain icon

McMain

Interact with McMain API

Asset → Update

AI-generated

Summary

Update an existing asset by ID with selectable fields.

Inputs

  • id (required) — The unique identifier of the asset to update.
  • updateFields — A collection of key‑value pairs specifying which asset properties to update (e.g., description, installationDate, price).
  • requestOptions — Optional request settings such as batching, timeout, proxy, and SSL verification.

Output shape

the updated asset object

Returns the full asset record after update; missing or invalid id results in an error response.

Examples

Example 1: Update asset description and price

Set id to '123', add description 'New desc' and price 49.99 in updateFields; leave requestOptions default.

Example 2: Batch update multiple fields

Configure batching with batchSize 100 and batchInterval 0; update fields including vendorId and locationId.

Example 3: Update with SSL verification disabled

Enable allowUnauthorizedCerts, set proxy to 'http://proxy:3128', and update expirationDate.

Discussion