> ## Documentation Index
> Fetch the complete documentation index at: https://docs.merchkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an image

> Full detail, same shape as the list rows. `label` is the workspace's primary-attribute value (render `label ?? id`); `attributes` is sparse — a missing key means unset or not-applicable (read `attributes[key] ?? null`). Narrow the returned keys with `fields=<key>,<key>`.

Scope: `read:images`.



## OpenAPI

````yaml https://www.merchkit.com/api/v1/openapi get /images/{id}
openapi: 3.1.0
info:
  title: Merchkit API
  version: 1.0.0
  description: >-
    Operate your Merchkit PIM programmatically. Products, images, vendors,
    categories, and data sources are all "entities" in one uniform shape: system
    fields (`id`, `type`, `label`, `parent_id`, timestamps) at the top level and
    every customer-defined key — scalars AND references — in a sparse
    `attributes` map. References read as labeled stubs `{id, type, label}` and
    write as bare UUIDs or `{id}` objects ("write what you read"). UUIDs are the
    only path identifiers; find by your own key with a filter (`GET
    /products?filter[sku]=ARIA-DT-72`) or write by it with `POST
    /{resource}/upsert` and `/batch` (products, images, vendors, and categories
    only — sources have neither route; they are created by the async `POST
    /sources` job pipeline). Start every integration with `GET
    /attributes?type=product` to learn your keys. Completeness is per-channel.
    All errors share one envelope (see the `Error` schema). Authenticate with a
    workspace-scoped API key: `Authorization: Bearer mk_live_...`. See /llms.txt
    for an agent guide.
servers:
  - url: https://www.merchkit.com/api/v1
    description: Merchkit API v1
security:
  - ApiKeyAuth: []
paths:
  /images/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The resource UUID.
    get:
      summary: Get an image
      description: >-
        Full detail, same shape as the list rows. `label` is the workspace's
        primary-attribute value (render `label ?? id`); `attributes` is sparse —
        a missing key means unset or not-applicable (read `attributes[key] ??
        null`). Narrow the returned keys with `fields=<key>,<key>`.


        Scope: `read:images`.
      operationId: getImage
      parameters:
        - name: fields
          in: query
          schema:
            type: string
          description: >-
            Return only the attribute keys you name instead of every populated

            one. Useful when a workspace has hundreds of attributes and your

            integration reads a handful.


            `fields=sku,price` (comma-separated) or `fields=sku&fields=price`

            (repeated param, same result). Omit it entirely to get every

            populated key.


            Only the `attributes` map narrows. System fields (`id`, `type`,

            `label`, `parent_id`, `created_at`, `updated_at`) always come back,

            so naming one returns `400`. `label` still resolves from the primary

            attribute whether or not you select it. `pagination.total` is

            unchanged. `filter` and `sort` are independent: filter on keys you

            did not select.


            Sparse still means sparse. A selected key with no value stays

            absent. Keep reading `attributes[key] ?? null`.


            Reference keys return `{id, type, label}` stubs as usual, but

            `fields` does not reach through them.

            `fields=gallery_images.image_url` is not supported. Select the

            reference key, then batch-fetch:

            `GET /images?filter[id][in]=<ids>&fields=image_url`.


            Unknown keys return `400` with `field_errors`. Inverse-reference

            keys are rejected the same way. They are queries, not stored values.

            Read them via `/{resource}/{id}/references?attribute=`.


            Selecting only non-reference keys skips the reference join entirely,

            which avoids loading every referenced entity just to attach its
            label.
      responses:
        '200':
          description: The image.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EntityResource'
              example:
                data:
                  id: f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a4b
                  type: image
                  label: aria-hero.jpg
                  parent_id: null
                  created_at: '2026-06-02T14:11:09Z'
                  updated_at: '2026-07-18T09:30:22Z'
                  attributes:
                    file_name: aria-hero.jpg
                    image_url: https://cdn.merchkit.example/aria/aria-hero.jpg
                    alt_text: Aria Oak Dining Table — front hero shot
        '404':
          description: >-
            Not found — ids outside your workspace are indistinguishable from
            missing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    EntityResource:
      type: object
      description: >-
        The one shape for every entity read and mutation response. System fields
        live at the top level; every customer-defined key lives in `attributes`,
        so customer keys can never collide with system ones.
      required:
        - id
        - type
        - label
        - parent_id
        - created_at
        - updated_at
        - attributes
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - product
            - image
            - vendor
            - category
            - source
          description: The entity type discriminator.
        label:
          type:
            - string
            - 'null'
          description: >-
            The workspace's primary-attribute value for this entity; null when
            no primary attribute is configured or it is unset (never a UUID
            posing as a name). Render `label ?? id`.
        parent_id:
          type:
            - string
            - 'null'
          format: uuid
          description: 'Parent entity id (products: the variant parent).'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        attributes:
          type: object
          description: >-
            SPARSE map of customer-defined keys — only keys with values appear;
            a missing key means unset or not-applicable (read `attributes[key]
            ?? null`; never contains null or ""). Scalars are bare values; a
            single reference is a labeled stub; a list reference is a COMPLETE
            ordered stub array (no cap, array order = position order).
            Inverse-reference keys never appear — traverse them via filters or
            `/products/{id}/references`. The full key list comes from `GET
            /attributes`.
          additionalProperties:
            $ref: '#/components/schemas/AttributeValue'
      example:
        id: 9b2f6c1e-8a04-4c6e-b0d3-5f2f6f7a9e21
        type: product
        label: Aria Oak Dining Table
        parent_id: null
        created_at: '2026-06-02T14:11:09Z'
        updated_at: '2026-07-18T09:30:22Z'
        attributes:
          sku: ARIA-DT-72
          product_name: Aria Oak Dining Table
          price: 1299
          material: White Oak
          vendor:
            id: 77e1b2aa-6b3d-4f19-9d10-8c2a5e7f4b21
            type: vendor
            label: Nordic Timber Co.
          category:
            id: c41d09f3-2e85-47a6-b93c-d5f8e1a20c67
            type: category
            label: Dining Tables
          gallery_images:
            - id: f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a4b
              type: image
              label: aria-hero.jpg
            - id: f0a2c3d4-e5f6-4a70-9b8c-0d1e2f3a4b5c
              type: image
              label: aria-detail.jpg
            - id: f0a3d4e5-f6a7-4b80-8c9d-1e2f3a4b5c6d
              type: image
              label: aria-side.jpg
            - id: f0a4e5f6-a7b8-4c90-9dae-2f3a4b5c6d7e
              type: image
              label: aria-lifestyle.jpg
            - id: f0a5f6a7-b8c9-4da0-8ebf-3a4b5c6d7e8f
              type: image
              label: aria-packshot.jpg
    Error:
      type: object
      description: >-
        The one error envelope every non-2xx response uses. `documentation_url`
        links to the code's section of the error docs.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - is_retriable
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - insufficient_scope
                - forbidden
                - not_found
                - validation_failed
                - rate_limited
                - conflict
                - internal_error
            message:
              type: string
            documentation_url:
              type: string
              format: uri
              description: https://docs.merchkit.com/developers/errors#<code>
            is_retriable:
              type: boolean
              description: >-
                Only `rate_limited` and `internal_error` are retriable.
                Deterministic client errors (validation, not-found, conflict)
                return a 4xx and are never retriable.
            retry_after_seconds:
              type:
                - integer
                - 'null'
            alternative_action:
              type: string
              description: What to do instead, when there is a better call.
            request_id:
              type: string
            field_errors:
              type: array
              items:
                $ref: '#/components/schemas/FieldError'
      example:
        error:
          code: validation_failed
          message: 'Unknown attribute key(s): colour.'
          documentation_url: https://docs.merchkit.com/developers/errors#validation_failed
          is_retriable: false
          retry_after_seconds: null
          alternative_action: List valid attribute keys via GET /v1/attributes?type=product.
          request_id: req_01j9x2k8
          field_errors:
            - field: colour
              issue: not_a_defined_attribute
    AttributeValue:
      description: >-
        A read value: a bare scalar (string/number/boolean), a single reference
        stub, or a complete ordered array of reference stubs.
      oneOf:
        - type: string
        - type: number
        - type: boolean
        - $ref: '#/components/schemas/ReferenceStub'
        - type: array
          items:
            $ref: '#/components/schemas/ReferenceStub'
    FieldError:
      type: object
      required:
        - field
        - issue
      properties:
        field:
          type: string
        issue:
          type: string
          description: Machine-readable issue code, e.g. `not_a_defined_attribute`.
        acceptable_values:
          type: array
          items:
            type: string
          description: 'For select-value violations: the allowed values.'
    ReferenceStub:
      type: object
      description: >-
        A labeled pointer to another entity. Fetch the full record via `GET
        /{type plural}/{id}` when needed — the label is inline so list rendering
        needs no extra lookups.
      required:
        - id
        - type
        - label
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - product
            - image
            - vendor
            - category
            - source
        label:
          type:
            - string
            - 'null'
          description: The referenced entity's label (same null rule).
      example:
        id: 77e1b2aa-6b3d-4f19-9d10-8c2a5e7f4b21
        type: vendor
        label: Nordic Timber Co.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace-scoped API key (`mk_live_...`). Each operation lists the scope
        it requires in `x-required-scopes`. See the Authentication guide for the
        full scope table and key management.

````