Elastic Path Product Image Relationships API

Products are the items or services that you might want to sell in your store. In Product Experience Manager, products can also have associated rich media assets, such as product images or a file containing additional product details. You can do this using [Files API](/docs/api/pxm/files). Once you have created your files, you associate files with your products using the [Create Product Main Image Relationships API](/docs/api/pxm/products/create-product-main-image-relationships).

Operations 4

POST /pcm/products/{productID}/relationships/main_image Create main image relationships #
GET /pcm/products/{productID}/relationships/main_image Get Main Image Relationships #
PUT /pcm/products/{productID}/relationships/main_image Replace Main Image Relationships #
DELETE /pcm/products/{productID}/relationships/main_image Delete Main Image Relationships #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic-path-product-image-relationships-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elastic-path-product-image-relationships-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Product Experience Manager Introduction Product Image Relationships API
  description: '

    Product Experience Manager uses the PIM service to manage product information, hierarchies, and price books. Ideally, Product Experience Manager becomes the single source of truth for product data across your organization.


    In Commerce, the product data is stored separately from pricing, catalogs, and inventory. This separation means that you retrieve all product data only when you are managing product data and assets. Otherwise, when setting prices or managing inventory, you retrieve a reference to the product rather than the entire product, which makes the response times very fast.


    You also have the flexibility to create catalogs for different scenarios by combining hierarchies of products with a price book. Scenarios might include:


    - **Multiple geographical regions**. Display different catalogs in different regions with suitable pricing or combine product hierarchies from two different regions to display in a third region.

    - **Multiple channels**. Display different catalogs based on how a shopper accesses your store, such as through a mobile app or a web storefront.

    - **Direct to business versus direct to customers**. Offer different products and prices for business customers versus retail customers.

    - **Preferred customers**. Offer special pricing to preferred customers while displaying a standard price catalog to all other shoppers.

    - **Reward programs**. Enable reward programs where catalog prices drop after a certain spending level is reached.

    - **Product sales**. Offer sale items for a limited time.


    Scenarios are created by defining the context within which a catalog is displays. Contexts can be a customer ID, a channel, or any other user-defined tag that can be passed to the APIs from the front-end shopper experiences.

    '
  version: 26.0612.7739142
  x-version-timestamp: 2026-06-12 10:52:50+00:00
servers:
- url: https://euwest.api.elasticpath.com
  description: EU West Production Server
- url: https://useast.api.elasticpath.com
  description: US East Production Server
security:
- bearerAuth: []
tags:
- name: Product Image Relationships
  description: 'Products are the items or services that you might want to sell in your store. In Product Experience Manager, products can also have associated rich media assets, such as product images or a file containing additional product details.


    You can do this using [Files API](/docs/api/pxm/files).


    Once you have created your files, you associate files with your products using the [Create Product Main Image Relationships API](/docs/api/pxm/products/create-product-main-image-relationships).

    '
paths:
  /pcm/products/{productID}/relationships/main_image:
    post:
      summary: Create main image relationships
      description: Associates a main image with the specified product.
      operationId: createProductMainImageRelationships
      tags:
      - Product Image Relationships
      parameters:
      - $ref: '#/components/parameters/product_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/main_image_request'
            examples:
              create-product-main-image-relationship:
                value:
                  data:
                    type: file
                    id: 3ab3deca-1f11-47b7-a409-24ea3234d72c
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/write_conflict'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    get:
      summary: Get Main Image Relationships
      operationId: getProductMainImageRelationships
      tags:
      - Product Image Relationships
      parameters:
      - $ref: '#/components/parameters/product_id'
      responses:
        '200':
          description: Returns all product variation relationships
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/main_image_response'
              examples:
                product-main-image-relationships:
                  value:
                    data:
                      type: file
                      id: file-1
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/write_conflict'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    put:
      summary: Replace Main Image Relationships
      operationId: updateProductMainImageRelationships
      tags:
      - Product Image Relationships
      parameters:
      - $ref: '#/components/parameters/product_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/replace_main_image_request'
            examples:
              replace-main-image-relationship:
                value:
                  data:
                    type: file
                    id: 3ab3deca-1f11-47b7-a409-24ea3234d72c
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/write_conflict'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    delete:
      summary: Delete Main Image Relationships
      operationId: deleteProductMainImageRelationships
      tags:
      - Product Image Relationships
      parameters:
      - $ref: '#/components/parameters/product_id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/write_conflict'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
components:
  responses:
    not_found:
      description: Bad Request. Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            internal-server-error:
              value:
                errors:
                - title: Not Found
                  status: '404'
    bad_request:
      description: Bad request. The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            bad-request:
              value:
                errors:
                - title: Bad Request
                  detail: Could not parse the supplied filter
                  status: '400'
    internal:
      description: Internal server error. There was a system failure in the platform.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            internal-server-error:
              value:
                errors:
                - status: '500'
                  title: Internal Server Error
                  detail: There was an internal server error, you can report with your request id.
                  request_id: 635da56d-75a1-43cd-b696-7ab119756b3a
    unprocessable_entity:
      description: Bad request. The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            failed-validation:
              value:
                errors:
                - title: Failed Validation
                  status: '422'
                  detail: <XYZ> can not be empty
    write_conflict:
      description: Write conflict detected
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            internal-server-error:
              value:
                errors:
                - title: Conflict
                  status: '409'
                  detail: write conflict detected
    forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            internal-server-error:
              value:
                errors:
                - title: Forbidden
                  status: '403'
                  detail: entity owned by organization
  schemas:
    replace_main_image_request:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: The ID of the new image file.
              example: 00000000-0000-0000-0000-000000000000
            type:
              type: string
              enum:
              - file
    error:
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            required:
            - status
            - title
            properties:
              status:
                type: string
                description: The HTTP response code of the error.
                example: '500'
              title:
                type: string
                description: A brief summary of the error.
                example: Internal server error
              detail:
                type: string
                description: Optional additional detail about the error.
                example: An internal error has occurred.
              request_id:
                type: string
                description: Internal request ID.
                example: 00000000-0000-0000-0000-000000000000
              meta:
                type: object
                description: Additional supporting meta data for the error.
                example:
                  missing_ids:
                  - e7d50bd5-1833-43c0-9848-f9d325b08be8
    main_image_response:
      type: object
      properties:
        data:
          description: A file object representing the main image, or null if no main image is set.
          type:
          - object
          - 'null'
          properties:
            id:
              description: A unique identifier for the image file generated automatically when a file is created.
              type: string
            type:
              description: This represents the type of resource object being returned. Always `file`.
              type: string
              enum:
              - file
    main_image_request:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: The ID of the image file.
              example: 00000000-0000-0000-0000-000000000000
            type:
              description: This represents the type of resource being returned. Always `file`.
              type: string
              enum:
              - file
  parameters:
    product_id:
      name: productID
      in: path
      schema:
        type: string
        example: 00000000-0000-0000-0000-000000000000
        x-postman-example: '{{productID}}'
      required: true
      description: A unique identifier for the product.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer