Deleting a base or individual product's locale

Learn how to delete locale for a base or individual product programmatically.

When deleting a locale from an individual product or base product, note that:

  • You can only delete a locale from an individual or base product. You cannot delete multiple locales at the same time. When you delete a locale from a base product, you also delete that locale from all of its product variations.

  • You can't delete a default locale. Attempting to do so will result in an error. To delete a default locale, you must change the default locale by updating the product before you can delete the original default locale.

The following DELETE /v1/products/{productId or ERID}/locales/{locale} request deletes the locale from a base or individual product.

You cannot delete a locale from a product variation.

To delete a locale for a base product or individual product, you must provide either a productId or ERID and the locale (for example, en_GB).

Duplicate ERIDs are not allowed. To prevent duplicate ERIDs, enable the Enforce Unique Value when configuring company settings in Global Commerce to ensure that you won't accidentally provide an ERID that would result in duplicate products in the response if you searched for a product by ERID.

The following example deletes a locale with a specific base or individual product with a productId.

curl --location --request DELETE 'https://api.digitalriver.com/products/v1/{productId}/locales/{locale}' \
--header 'Authorization: Basic <API_key>' \
...

An ERID request requires the x-erid-as-pid=true header.

curl --location --request DELETE 'https://api.digitalriver.com/v1/products/{ERID}/locales/{locale}' \
--header 'Authorization: Basic <API_key>' \
--header 'header x-erid-as-pid=true' \
...

Verifying the deletion of a product's locale in Global Commerce

Deleting a locale associated with an individual or base product will no longer appear associated with the product in Global Commerce.

  1. Sign in to Global Commerce.

  2. Select Catalog, select Products, and then click Manage Products. The Products page appears.

  3. Click the Search tab, select Product from the Search In drop-down list, and choose ID from the Search By list. Enter the product identifier or ERID in the Search For field, then click Search.

  4. Click the link for the product under the Internal Product Name column. The Edit Product page appears.

  5. Click the Details tab and verify the deleted locale no longer appears under the Choose a Locale column.

Last updated