Title: Edit Reusable Block content using Json REST API POST call
Last modified: June 23, 2022

---

# Edit Reusable Block content using Json REST API POST call

 *  Resolved [JeanP](https://wordpress.org/support/users/jeanp/)
 * (@jeanp)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/edit-block-content-using-json-rest-api-post-call/)
 * Hi There,
 * I have created a Reusable block with this content:
 * <!– wp:woocommerce/product-best-sellers {“rows”:1,”categories”:[58,60]} /–>
 * I would like to change the categories that are displayed in this woocommerce 
   product bestsellers block using a REST API Post call. For instance 58 & 60 should
   change to 40 & 41
 * This is how I have set up the rest API POST call:
 * URL: [https://your-wordpress-site.com/wp-json/wp/v2/blocks/800](https://your-wordpress-site.com/wp-json/wp/v2/blocks/800)
   
   Method: POST Body: {“content”: “<!– wp:woocommerce/product-best-sellers {“rows”:
   1,”categories”:[40,41]} /–>”}
 * I can change the title of the block with an API call. But I haven’t been able
   to edit the content of the block.
 * How should I set up the Body of the API Call to edit the category IDś?
 * For reference, here you can find the GET call of the block: [https://www.webpagescreenshot.info/#v2=bgajAQsHH](https://www.webpagescreenshot.info/#v2=bgajAQsHH)
    -  This topic was modified 3 years, 11 months ago by [JeanP](https://wordpress.org/support/users/jeanp/).
    -  This topic was modified 3 years, 11 months ago by [JeanP](https://wordpress.org/support/users/jeanp/).
    -  This topic was modified 3 years, 11 months ago by [James Huff](https://wordpress.org/support/users/macmanx/).
    -  This topic was modified 3 years, 11 months ago by [James Huff](https://wordpress.org/support/users/macmanx/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/edit-block-content-using-json-rest-api-post-call/#post-15770410)
 * Hey [@jeanp](https://wordpress.org/support/users/jeanp/),
 * Thanks for providing all of the details in your post. I’m not seeing anything
   that appears to be off. We tend to deal with questions regarding the WooCommerce
   REST API and Store API and not so much with core WordPress API issues. While 
   this is a WooCommerce block you’re updating, it’s using core WordPress methods.
 * You may want to try one of these places for help. They tend to be better places
   to ask developer-focused questions than the forum. More developers tend to “hang
   out” there than they do in the forums.
    - WooCommerce Slack Community: [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
    - WooCommerce Community group on Facebook: [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 * If you’re able to find the answer, please do post it here so that if anyone else
   needs to know this in the future, they’ll be able to find it. I’ll leave this
   thread open for a while to see if anyone is able to help too.
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/edit-block-content-using-json-rest-api-post-call/#post-15795615)
 * Seems we’ve not had additional inputs on this thread. Thus, we encourage you 
   to make use of the above resources.
 * I’ll go ahead and mark the thread closed but please feel free to create a new
   thread if you have further questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Edit Reusable Block content using Json REST API POST call’ is closed 
to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/edit-block-content-using-json-rest-api-post-call/#post-15795615)
 * Status: resolved