Elastic Path Merchant Realm Mappings API

The Merchant Realm Mappings API from Elastic Path — 2 operation(s) for merchant realm mappings.

OpenAPI Specification

elastic-path-merchant-realm-mappings-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 Merchant Realm Mappings 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: Merchant Realm Mappings
paths:
  /v2/merchant-realm-mappings:
    get:
      summary: Get the Merchant Realm Mapping for the current store
      description: 'This API is used to obtain an [Authentication Realm](/docs/api/single-sign-on/authentication-realms) if there is none yet for the current store.

        '
      operationId: getMerchantRealmMappings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    $ref: '#/components/schemas/MerchantRealmMappingResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        default:
          $ref: '#/components/responses/InternalServerError'
      tags:
      - Merchant Realm Mappings
  /v2/merchant-realm-mappings/{mapping_id}:
    get:
      summary: Get a Merchant Realm Mapping
      operationId: getMerchantRealmMapping
      parameters:
      - name: mapping_id
        in: path
        required: true
        description: The id of the Application Key.
        schema:
          type: string
          example: 0c45e4ec-26e0-4043-86e4-c15b9cf985a0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    $ref: '#/components/schemas/MerchantRealmMappingResponse'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/InternalServerError'
      tags:
      - Merchant Realm Mappings
    put:
      summary: Update a Merchant Realm Mapping
      operationId: updateMerchantRealmMapping
      parameters:
      - name: mapping_id
        in: path
        required: true
        description: The id of the Application Key.
        schema:
          type: string
          example: 0c45e4ec-26e0-4043-86e4-c15b9cf985a0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
              - data
              properties:
                data:
                  required:
                  - type
                  - prefix
                  $ref: '#/components/schemas/MerchantRealmMapping'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    $ref: '#/components/schemas/MerchantRealmMappingResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/ConflictError'
        default:
          $ref: '#/components/responses/InternalServerError'
      tags:
      - Merchant Realm Mappings
components:
  schemas:
    MerchantRealmMapping:
      properties:
        prefix:
          type: string
          description: The store prefix that is assigned to this merchant realm mapping. This can be `null` if a store prefix has not been assigned.
          example: myCompany
        type:
          type: string
          description: Represents the type of object being returned. Always `merchant-realm-mappings`.
          const: merchant-realm-mappings
    MerchantRealmMappingResponse:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for this merchant realm mapping.
          format: uuid
          example: 0c45e4ec-26e0-4043-86e4-c15b9cf985a0
        prefix:
          type: string
          description: The store prefix that is assigned to this merchant realm mapping. This can be `null` if a store prefix has not been assigned.
          example: myCompany
        type:
          type: string
          description: Represents the type of object being returned. Always `merchant-realm-mappings`.
          const: merchant-realm-mappings
        realm_id:
          type: string
          description: The ID of the authentication realm used to sign in as administrator.
          example: e730bf37-ed95-4ca9-b4c4-2c5ee08b21d7
        store_id:
          type: string
          description: System-generated store ID.
          example: 88888888-4444-4333-8333-111111111111
    Error:
      required:
      - status
      - title
      properties:
        title:
          type: string
          description: A brief summary of the error.
          examples:
          - Bad Request
        status:
          type: string
          format: string
          description: The HTTP response code of the error.
          examples:
          - '400'
        detail:
          type: string
          description: Optional additional detail about the error.
          examples:
          - The field 'name' is required
    ErrorResponse:
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
  responses:
    ConflictError:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            conflict-error:
              summary: Prefix already in use
              value: "{\n  \"errors\": [\n    {\n      \"detail\": \"the prefix is already in use\",\n      \"status\": \"409\",\n      \"title\": \"Conflict\"\n    }\n  ]\n}\n"
    NotFoundError:
      description: Not found. The requested entity does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            not-found:
              summary: Requested entity not found
              value: "{\n  \"errors\": [\n    {\n      \"detail\": \"merchant realm mapping not found\",\n      \"status\": \"404\",\n      \"title\": \"Not Found\"\n    }\n  ]\n}\n"
    ValidationError:
      description: Bad request. The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing-name:
              summary: Required field missing
              value: "{\n  \"errors\": [\n    {\n      \"detail\": \"The field 'prefix' is required.\",\n      \"status\": \"400\",\n      \"title\": \"Bad Request\"\n    }\n  ]\n}\n"
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized-error:
              value: "{\n  \"errors\": [\n    {\n      \"title\": \"Unauthorized\",\n      \"status\": \"401\"\n    }\n  ]\n}\n"
    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:
              summary: Internal server error
              value: "{\n  \"errors\": [\n    {\n      \"title\": \"Internal Server Error\",\n      \"status\": \"500\",\n      \"detail\": \"there was a problem processing your request\"\n    }\n  ]\n}\n"
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer