Custom Endpoint For Custom Post Type from Child Theme

When you register your custom post type, you should use rewrite like this:

add_action('init', 'create_location');
function create_location() {
  register_post_type('location',
    array(
      'labels' => array(
        'name' => __('Locations'),
        'singular_name' => __('Location')
      ),
      'public' => true,
      'rewrite' => array(
        'slug' => 'location'
      )
    )
  );
}  

Don’t forget to update your permalinks by going to example.com/wp-admin/options-permalink.php and click on Save Changes.

You should also be able to modify an already registered post type by using register_post_type() once again from the child theme.

From the description for register_post_type():

Create or modify a post type. register_post_type should only be invoked through the ‘init’ action. It will not work if called before ‘init’, and aspects of the newly created or modified post type will work incorrectly if called later.

References

Post Types

Modifying post type – using the registered_post_type hook

Function Reference/register post type