How to use make a api call in wordpress

I want to create a workflow to automatically upload product information in WordPress. I want to upload product prices, codes, pictures, etc. in Google Sheets to the WordPress product page through the API. However, an error occurs during the call. If I don’t use the make a API module, I can only upload the title and product description. Please help me find out what is wrong.Thanks.



1 Like

Hi @Avril_xu,

You’ve already specified what your base url is when establishing the Wordpress connection (pictured):

So in your Make and API Call action, leave out anything base url related and only include the endpoint which in your case may be something like /product to create a product or /product/123 if you’re looking to update a specific one.

You inserted an absolute (full) URL into the URL field.

If you read the description below it, it says:

Enter a path relative to https://__________ … For example: __________

So you simply need to OMIT the first part of the URL that will be added for you.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

1 Like

Thanks a lot. This problem has been settled, but another problem is that the subsequent make a API call reports an error. My current flow is to create a product information first, make a api call,and then update the relevant information such as price into this product information. How can I set it up? Thank you.



No problem, glad I could help you with “How to use make a api call in wordpress

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help as newer questions are displayed higher on the forum’s “new” page.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

You might need a / before the post id variable.

Please refer to the official Wordpress API documentation for more information.

Hope this helps! Let me know if there are any further questions or issues.

@samliew