Update Customer using API

Hi all friends,
I have an error when add new customer and update customer

My URL Request: (PUT method)

I tried with:

  1. data={“customer_name”: “Watson”}
  2. {data={“customer_name”: “Watson”}}
  3. data:{“customer_name”: “Watson”}
  4. {data:{“customer_name”: “Watson”}}
  5. {“customer_name”: “Watson”}}

Someone could help me ?
I read at: https://frappe.io/docs/user-guide/rest_api

Can you share your code?

To create a customer,

Send a POST request to /api/resource/Customer with formdata,

key: data
value: {“customer_name”: “Watson”}

Note, make sure that you include all mandatory data or it will not create the record and throw MandatoryError.

Give a thank to 2 guys.
I found the way to fixed it.