Skip to main content

Update a Merchant Realm Mapping

PUT Update a Merchant Realm Mapping

https://useast.api.elasticpath.com/v2/merchant-realm-mappings/:mappingId

Parameters

Path parameters

NameRequiredTypeDescription
mapping-idRequiredstringThe ID for the requested merchant realm mapping.

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
typeRequiredstringmerchant-realm-mappings
prefixRequiredstringThe prefix name to associate with a store.

Request Example

Curl

curl -X PUT https://useast.api.elasticpath.com/v2/merchant-realm-mappings/:mappingId \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "merchant-realm-mappings",
"prefix": "awesomeName"
}
}'

JavaScript SDK

const mappingId = "25617d3e-14a6-434c-bfab-3fda87517aaf";
const data = {
type: "merchant-realm-mappings",
prefix: "awesomeName",
};

// Where `EPCC` is an authenticated client
await EPCC.MerchantRealmMappings.Update(mappingId, data);

Response Example

200 OK

{
"data": {
"id": "925c8617-41b3-44fa-ac4b-2f6edd1bd3c5",
"prefix": "awesomeName",
"realm_id": "e730bf37-ed95-4ca9-b4c4-2c5ee08b21d7",
"store_id": "88888888-4444-4333-8333-111111111111",
"type": "merchant-realm-mappings"
}
}