Define a Local Alias for an On-Demand Sandbox

You can test storefronts using either a global alias or an alias on your local system to access a specific on-demand sandbox.

To use a global alias, assign a CNAME to the DNS that maps the alias to the IP address of the sandbox. To test on your local system, you can use the Sandbox API to assign a local alias to a sandbox using the following procedure.

Note: Before you define any sandbox aliases, make sure to define a custom host name, such as www.merchant.com, in your site’s alias configuration under ‘Merchant Tools > SEO > Aliases’.

Define an on-demand sandbox Alias using the POST /sandboxes/{sandboxId}/aliases method.

  1. To open the Sandbox API user interface, go to B2C Commerce Sandbox API.
  2. Click Authorize.
  3. Enter the API client ID for the Sandbox API.
  4. To dismiss the authorization window and return to the Sandbox API user interface, click Close.
  5. In the Common section of the Sandbox API user interface, click to expand the GET/system method.
  6. Click Try it out.
  7. Click Execute.


  8. Add one of the retrieved inbound IP addresses and the custom hostname in your local hosts file, for example, 192.0.2.10 www.merchant.com). You need admin rights to edit this file.
  9. In the Sandboxes section of the Sandbox API user interface, click to expand the GET /sandboxes method
  10. Click Try it out.
  11. Click Execute.


  12. From the results, copy the desired Sandbox ID.
  13. In the Sandboxes section of the Sandbox API user interface, click to expand the POST /sandboxes/{sandboxId}/aliases method
  14. Click Try it out.
  15. Register the hostname by (1) editing the alias value, (2) adding the hostname, and (3) specifying the Sandbox ID copied above.


  16. Click Execute.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.