---
title: "Get asset by code"
method: GET
path: "/assets/v1/assets:GetAssetByCode"
tags: ["Assets"]
---

# Get asset by code

`GET /assets/v1/assets:GetAssetByCode`

## Query parameters

- `code` string, required

## Response `200`

A successful response.

- S12AssetsV1GetAssetByCodeResponse — Result returned from `GetAssetByCode`
  - `asset` S12AssetsV1Asset — Asset entity.
    - `id` string, required — The unique identifier of an asset. This ID is system-generated.
    - `code` string — The user-defined unique identifier of an asset. This ID is user-generated.
    - `type` S12AssetsV1AssetType — Asset type entity.
      - `name` string — Name of the type.
      - `type_id` string — The global unique identifier of the type.
      - `type` 'TYPE_CATEGORY_UNSPECIFIED' | 'TYPE_CATEGORY_PREDEFINED' | 'TYPE_CATEGORY_CUSTOM' — Category of Type. - TYPE_CATEGORY_UNSPECIFIED: Type Category Unspecified. - TYPE_CATEGORY_PREDEFINED: Predefined Type defined by system. - TYPE_CATEGORY_CUSTOM: Custom type defined by organisation.
    - `fields` S12AssetsV1AssetField[] — The associated fields of an asset contained in an array. Each asset's fields are based on its asset type. Please make sure the asset fields you use associated with the specified asset type. You can retrieve the associated fields using the list type and field association endpoint.
      - `name` string — The name of an asset field.
      - `string_value` string — The string value of an asset field. This attribute is only used for asset fields using the FIELD_VALUE_TYPE_STRING type.
      - `money_value` S12CommonMoney — Represents an amount of money with its currency type.
        - `currency_code` string — The 3-letter currency code defined in ISO 4217.
        - `units` string, int64 — The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
        - `nanos` integer — Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example £-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
      - `timestamp_value` string, date-time — The timestamp value of an asset field. This attribute is only used for asset fields using the FIELD_VALUE_TYPE_TIMESTAMP type.
      - `field_id` string — The unique identifier of an asset field. This ID is system-generated.
    - `media` S12CommonMedia[] — All the media directly uploaded to an asset.
      - `id` string
      - `token` string
      - `filename` string — full file name, including file extension
      - `media_type` 'MEDIA_TYPE_IMAGE' | 'MEDIA_TYPE_VIDEO' | 'MEDIA_TYPE_PDF' | 'MEDIA_TYPE_DOCX' | 'MEDIA_TYPE_XLSX' | 'MEDIA_TYPE_PPTX' | 'MEDIA_TYPE_CSV' — - MEDIA_TYPE_IMAGE: An image file (GIF, JPG, PNG, WEBP). - MEDIA_TYPE_VIDEO: A video file (MP4, MOV). - MEDIA_TYPE_PDF: A PDF document. - MEDIA_TYPE_DOCX: A Microsoft Word document (DOCX, DOC). - MEDIA_TYPE_XLSX: A Microsoft Excel spreadsheet (XLSX, XLS). - MEDIA_TYPE_PPTX: A Microsoft PowerPoint presentation (PPTX, PPT). - MEDIA_TYPE_CSV: A CSV file.
    - `created_at` string, date-time — The date created timestamp of an asset.
    - `modified_at` string, date-time — The date last modified timetstamp of an asset.
    - `site` S12AssetsV1AssetSite — Describes the values of a site that's assigned to an asset.
      - `id` string — The unique identifier of a site. This ID is system-generated.
      - `name` string — The name of a site.
    - `profile_image` S12CommonMedia
      - `id` string
      - `token` string
      - `filename` string — full file name, including file extension
      - `media_type` 'MEDIA_TYPE_IMAGE' | 'MEDIA_TYPE_VIDEO' | 'MEDIA_TYPE_PDF' | 'MEDIA_TYPE_DOCX' | 'MEDIA_TYPE_XLSX' | 'MEDIA_TYPE_PPTX' | 'MEDIA_TYPE_CSV' — - MEDIA_TYPE_IMAGE: An image file (GIF, JPG, PNG, WEBP). - MEDIA_TYPE_VIDEO: A video file (MP4, MOV). - MEDIA_TYPE_PDF: A PDF document. - MEDIA_TYPE_DOCX: A Microsoft Word document (DOCX, DOC). - MEDIA_TYPE_XLSX: A Microsoft Excel spreadsheet (XLSX, XLS). - MEDIA_TYPE_PPTX: A Microsoft PowerPoint presentation (PPTX, PPT). - MEDIA_TYPE_CSV: A CSV file.
    - `state` 'ASSET_STATE_UNSPECIFIED' | 'ASSET_STATE_ACTIVE' | 'ASSET_STATE_ARCHIVED' — Describes the state of an asset. Either active or archived. - ASSET_STATE_UNSPECIFIED: Indicates that an asset state is unspecified. - ASSET_STATE_ACTIVE: Indicates that an asset is active. - ASSET_STATE_ARCHIVED: Indicates that an asset is archived.
    - `inspected_at` string, date-time — The date last modified inspection of an asset.
    - `sourced_from_external_system` boolean — @deprecated. Use GetAsset API to get the sourced_from_external_system Indicates if an asset is sourced from an external system.
    - `statuses` S12AssetsV1AssetStatus[] — The status assigned to the asset. Although this is a repeated field, only one entry is currently supported. Each entry must belong to the status group associated with the asset type.
      - `status_option_id` string — ID of the assigned status option.
      - `name` string — Name of the status option.
      - `status_group_id` string — ID of the status group the option belongs to.
      - `color` 'STATUS_BADGE_COLOR_ACCENT' | 'STATUS_BADGE_COLOR_INFO' | 'STATUS_BADGE_COLOR_NEGATIVE' | 'STATUS_BADGE_COLOR_POSITIVE' | 'STATUS_BADGE_COLOR_WARNING' | 'STATUS_BADGE_COLOR_SURFACE' — StatusBadgeColor defines the semantic color palette for status badges. - STATUS_BADGE_COLOR_ACCENT: Color is accent - STATUS_BADGE_COLOR_INFO: Color is info - STATUS_BADGE_COLOR_NEGATIVE: Color is negative - STATUS_BADGE_COLOR_POSITIVE: Color is positive - STATUS_BADGE_COLOR_WARNING: Color is warning - STATUS_BADGE_COLOR_SURFACE: Color is surface
      - `status_group_name` string — Name of the status group the option belongs to.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/safetyculture/apis/safetyculture-api.md) · [All operations](https://skmtc.net/safetyculture/apis/safetyculture-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safetyculture/safetyculture-api/revisions/5be91df61ded/schema)
