Skip Navigation

Tagged: 

This topic contains 0 replies, has 1 voice.

Last updated by rebeccaH-12 1 month, 3 weeks ago.

Assisted by: Noman.

Author Posts
August 1, 2024 at 2:20 pm #16030261

rebeccaH-12

Background of the issue:
I'm developing a custom solution to push posts from a staging site to a production site, including their translations. I'm currently using a custom function that makes a POST request to '/wp-json/wpml/v1/translations' on the production site to link translations.

Symptoms:
I'm encountering a 404 error indicating that no route was found matching the URL and request method. The error message I'm receiving is: {"code":"rest_no_route", "message":"No route was found matching the URL and request method.", "data":{"status":404}}

Questions:
Is there a specific REST API endpoint for linking translations on a remote site?
What is the correct method and data structure for linking translations via the API?
Are there any special configurations or permissions needed to enable this functionality?
If the REST API approach is not recommended, what alternative method would you suggest for programmatically linking translations on a remote production site?
Could you please provide or direct me to any relevant documentation about using WPML's API for remote operations, specifically for linking translations?

The topic ‘[Closed] Pushing posts, including translation posts, from staging to production’ is closed to new replies.