Skip to main content
Question

Webhook 'PUT' Request Failing to Add Products in WooCommerce

  • November 1, 2024
  • 4 replies
  • 24 views

Hi there,

I have a webhook setup that is meant to add an item to a subscription. It says that the put request is working successfully on the test but there is no product being added after testing.

When I run the same setup on Postman it works and does add the product.

I imagine there is something wrong with how I have this set up? Hope you can help.

Thank you,

Tom.

 

Did this topic help you find an answer to your question?

4 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30938 replies
  • November 1, 2024

Hi @Silkie 

Can you link to the app API endpoint documentation you used to configure the API request?

Try using this Zap action: Webhook - Custom Request (PUT)

Then you can use JSON as the Body.


  • Author
  • Beginner
  • 3 replies
  • November 1, 2024

Hi Troy,

This was worked through with chatgpt, I'm using the PUT request with JSON. I tried that same PUT request with Postman and it worked fine, I wondered if the way I’ve added the data could be the issue, I put the code like this on Postman:

{

  "line_items": [

    {

      "product_id": 1140423,

      "quantity": 1

    }

  ]

}

Hope you can help!

Tom.


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30938 replies
  • November 4, 2024

@Silkie 

Can you post updated screenshots showing how your Zap step is configured in EDIT mode so we can see these fields:

  • Method
  • URL
  • Body
  • Headers

  • Author
  • Beginner
  • 3 replies
  • November 4, 2024

I found the solution, for me anyway. Essentially using the webhooks PUT request it was throwing back all sorts of errors, I changed the webhooks to custom and it allowed me to paste my code in, worked immediately. Thank you!