Asset Bulk Action

Changed on

Performs a bulk operation on assets. You must scope the action with at least one of asset_uid, filter, or filter_rules — if none are provided, the action applies to every asset in your company, including destructive actions like delete_assets.

post/assets/bulk_action

Request

  • Base URL
    https://dc-region.zuperpro.com/api
  • URL
    https://dc-region.zuperpro.com/api/assets/bulk_action
  • Auth
    API key in header x-api-key

Request body

action'update_field' | 'update_status' | 'send_qr_codes' | 'delete_assets' | 'activate' | 'deactivate' required

Note: activate and deactivate are both handled by the same underlying logic. The actual effect is driven entirely by action_options.is_active (boolean) — sending action: "activate" with action_options.is_active: false will deactivate the matched assets.

action_optionsobject required

Options object whose required fields depend on action:

update_field: either a custom_field object (label and value required, plus optional type, read_only, hide_to_fe, hide_field, group_uid, group_name), or any of the direct asset fields purchase_date, purchase_price, residual_price, warranty_expiry_date, useful_life, owned_by_customer, parent_asset, asset_code, asset_category, asset_product, asset_inspection_form. update_status: asset_status (required, one of READY_TO_INSTALL, INSTALLED, UNDER_SERVICE, REMOVED, OBSOLETE, ONLINE, OFFLINE, NEED_REPAIR) and optional remove_from_customer (boolean). send_qr_codes / delete_assets: no fields required. activate / deactivate: is_active (required boolean) — this, not the action string, determines whether assets are activated or deactivated.

asset_uidstring[]

Array of asset UIDs to target. Note the field name is singular (asset_uid) even though it holds a list — asset_uids is not recognized and will be silently ignored, causing the action to fall back to matching all assets. Optional if filter or filter_rules is provided instead.

filterobject

Simple filter object as an alternative to asset_uid. Supports fields such as is_active, keyword, customer, asset_category, asset_status, owned_by_customer, warranty_from_date/warranty_to_date, placed_in_service_from/placed_in_service_to, property, organization, serial_no, custom_field, created_at.

filter_rulesobject[]

Advanced rule-engine filter, used as an alternative to asset_uid/filter. Each entry is a condition object (e.g. {"field": "asset_uid", "operator": "IN", "value": ["..."]}). When present and non-empty, this takes precedence and the request is evaluated via the rule engine.

filter_rule_operator'AND' | 'OR'

How multiple filter_rules entries are combined. Defaults to AND.

Response

200

type'success' required
titlestring required

Varies by action performed — e.g. "Deleted Assets Successfully" for delete_assets, "Assets Status updated successfully" for update_status, "Activated Assets Successfully"/"Deactivated Assets Successfully" for activate/deactivate.

messagestring required

Typically identical to title for the given action.

Changes

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new activate enum value to the request property

    • info

      added the new deactivate enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status