Elastic Path Entry Relationships API

### Entry Relationships in Commerce When you create a field that uses `relationship` as a `field_type`, you update your entry values using the `Entry Relationship` endpoints. ### Entry Relationships in Product Experience Manager Once you have created your templates, you must associate them with your products using the `Entry Relationship` endpoints.

OpenAPI Specification

elastic-path-entry-relationships-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 25.1126.6886238
  x-version-timestamp: 2025-11-26 19:10:23+00:00
  title: Addresses Introduction Account Addresses Entry Relationships API
  description: 'The Addresses API allows you to organize account addresses. Addresses are a sub-resource of `account` resources, an account can have multiple addresses, such as home, work, and neighbour.


    You can use an account address with either [client_credentials access token](/docs/api/authentication/create-an-access-token) or a combination of [implicit access token](/docs/api/authentication/create-an-access-token) and [Account Management authentication](/docs/api/accounts/post-v-2-account-members-tokens) token.

    '
  contact:
    name: Elastic Path
    url: https://www.elasticpath.com
    email: support@elasticpath.com
  license:
    url: https://elasticpath.dev
    name: MIT
servers:
- url: https://useast.api.elasticpath.com
  description: US East
- url: https://euwest.api.elasticpath.com
  description: EU West
security:
- BearerToken: []
tags:
- name: Entry Relationships
  description: "\n### Entry Relationships in Commerce\n\nWhen you create a field that uses `relationship` as a `field_type`, you update your entry values using the `Entry Relationship` endpoints. \n\n### Entry Relationships in Product Experience Manager\n\nOnce you have created your templates, you must associate them with your products using the `Entry Relationship` endpoints.\n"
paths:
  /v2/flows/{flowSlug}/entries/{flowEntryID}/relationships/{flowFieldSlug}:
    post:
      tags:
      - Entry Relationships
      summary: Create an Entry Relationship
      description: '- In Commerce, create an entry relationship to one or more resources. If any relationships already exist, the ones made in the request are added to them.

        - In Product Experience Manager, create an entry relationship with the product to which you want to associate the template.

        '
      operationId: createAnEntryRelationship
      parameters:
      - name: flowSlug
        in: path
        required: true
        description: The slug of the flow/template that the entry belongs to.
        style: simple
        schema:
          type: string
      - name: flowFieldSlug
        in: path
        required: true
        description: The slug of the field/attribute that the relationship belongs to.
        style: simple
        schema:
          type: string
      - name: flowEntryID
        in: path
        required: true
        description: The ID of the entry you are requesting.
        style: simple
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/FlowsEntriesRelationshipsFieldSlugRequest'
              contentMediaType: application/json
            examples:
              default:
                value:
                  data:
                  - id: '{RESOURCE_ID}'
                    type: '{RESOURCE_TYPE}'
                  - id: '{RESOURCE_ID}'
                    type: '{RESOURCE_TYPE}'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Relationships'
              examples:
                default:
                  value:
                    data:
                    - type: brand
                      id: 0d28e5b6-f615-4e1c-b038-275cfde97927
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      tags:
      - Entry Relationships
      summary: Update an Entry Relationship
      description: '- In Commerce, updates an entry relationship to one or more resources. If any relationships already exist, the ones made in the request are added to them.

        - In Product Experience Manager, updates an entry relationship with the product to which you want to associate the template.

        '
      operationId: updateAnEntryRelationship
      parameters:
      - name: flowSlug
        in: path
        required: true
        description: The slug of the flow/template that the entry belongs to.
        style: simple
        schema:
          type: string
      - name: flowFieldSlug
        in: path
        required: true
        description: The slug of the field/attribute that the relationship belongs to.
        style: simple
        schema:
          type: string
      - name: flowEntryID
        in: path
        required: true
        description: The ID of the entry you are requesting.
        style: simple
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/FlowsEntriesRelationshipsFieldSlugRequest'
              contentMediaType: application/json
            examples:
              default:
                value:
                  data:
                  - id: '{RESOURCE_ID}'
                    type: '{RESOURCE_TYPE}'
                  - id: '{RESOURCE_ID}'
                    type: '{RESOURCE_TYPE}'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Relationships'
              examples:
                default:
                  value:
                    data:
                    - type: brand
                      id: 0d28e5b6-f615-4e1c-b038-275cfde97927
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      tags:
      - Entry Relationships
      summary: Delete an Entry Relationship
      description: "- In Commerce, deletes an entry relationship to one or more resources. \n- In Product Experience Manager, deletes an entry relationship with the product to which you want to associate the template.\n"
      operationId: deleteAnEntryRelationship
      parameters:
      - name: flowSlug
        in: path
        required: true
        description: The slug of the flow/template that the entry belongs to.
        style: simple
        schema:
          type: string
      - name: flowFieldSlug
        in: path
        required: true
        description: The slug of the field/attribute that the relationship belongs to.
        style: simple
        schema:
          type: string
      - name: flowEntryID
        in: path
        required: true
        description: The ID of the entry you are requesting.
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    UUID:
      type: string
      description: A unique identifier for a resource.
      format: uuid
      example: 00000000-0000-0000-0000-000000000000
    Error:
      required:
      - status
      - title
      properties:
        status:
          type: integer
          format: int
          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
    FlowsEntriesRelationshipsFieldSlugRequest:
      title: FlowsEntriesRelationshipsFieldSlugRequest
      type: object
      properties:
        data:
          type: array
          description: The data to be stored.
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/UUID'
              type:
                type: string
                description: The resource type of the object.
                examples:
                - customer
    ErrorResponse:
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    Relationships:
      title: Relationships
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        type:
          type: string
          description: Represents the type of object being returned.
          example: brand
  responses:
    ValidationError:
      description: Bad request. The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing-name:
              value:
                errors:
                - title: Validation Error
                  status: 400
                  detail: 'data.attributes.name: "name" is required'
    NotFound:
      description: Bad request. Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal-server-error:
              value:
                errors:
                - title: Not Found
                  status: 404
    InternalServerError:
      description: Internal server error. There was a system failure in the platform.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          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
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer