Overview of the Issue
Depending on your permalink structure, REST API endpoints will miss a slash in the URL or have an extra slash.
Workaround
This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.
Our developers are checking the bug to devise a permanent fix.
As a workaround, please go to SettingsPermalinks and add the missing trailing slash to your custom permalink structure.
Or you can apply the following patch:
Note: if you have any trouble applying the current patch, please open a support forum ticket and we’ll help you with that.
Edit the file sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 57 and replace:
return $this->convert_url_string( $url, $sitepress->get_current_language() );
By:
$matchTrailingSlash = $url[ strlen( $url ) - 1 ] === '/' ? 'trailingslashit' : 'untrailingslashit'; return $matchTrailingSlash( $this->convert_url_string( $url, $sitepress->get_current_language() ) );