WordPress at a glance
filter is not described

rest_prepare_post_type filter-hook . WP 4.7.0

Filters a post type returned from the API.

Allows modification of the post type data right before it is returned.

Usage

add_filter( 'rest_prepare_post_type', 'filter_function_name_6901', 10, 3 );
function filter_function_name_6901( $response, $item, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$item(object)
The original post type object.
$request(WP_REST_Request)
Request used to generate the response.

Where the hook is called

WP_REST_Post_Types_Controller::prepare_item_for_response()
rest_prepare_post_type
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php 224
return apply_filters( 'rest_prepare_post_type', $response, $post_type, $request );

Where the hook is used (in WP core)

Does not used.