Skip to main content

Hey, 

 

I’m trying to create a webhook to post to my Woocommerce site. Since the ids are automatically generated after a new item is added, what do I need to enter in the ID fields, since they are required?

 

Example: This is not the full code…. 

 

{

"id": , // What to enter here?

"date_created": "",

"date_created_gmt": "",

"date_modified": "",

"date_modified_gmt": "",

"description": "",

"permalink": "",

"sku": "21. Sku:139004",

"price": "",

"regular_price": "21. Price:20.00",

@Shakila_Reed 

Seems like you’d first need to create a Product, then second create the Variation(s).


I’m using the create variations end point. post > /wp-json/wc/v3/products/<product_id>/variations 

 

https://woocommerce.github.io/woocommerce-rest-api-docs/?php#product-variation-properties

 

I am able to successfully upload the sku and regular price, with webhook > post. Doing it that way, Zapier automatically generates this information. But since I have nested data, i have to use the custom request. 


Hi @Shakila_Reed 

What WooCommerce API Endpoint are you trying to use?

Please link to the WC API endpoint documentation you are referencing.