How to import data from 3rd party sites/data source using Magento API section in Magento 2?
If you want to import data from the external resource you just need to create a controller where you can write you curl request or call and execute the. If you want to create a periodic task that you can create a Cron job where you can write you curl request or call. You can use both the process on the basis of the requirement.
But, if you can to export data to another site from your Magento store then you need to create a REST api endpoint through which 3rd party can make request on your store.
Feel free to contact us if have any problem to setup a cron job or REST api end point.
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this