How to correctly write a PUT request to shopify using jquery ajax?
I need to make changes in the client’s additional field by means of a PUT request in jquery
Using Postman - everything works, but through the webfront I get success, but there are no changes, why is that?
My code:
$.ajax({
type : 'PUT',
url : 'https://xxx:xxx_xxx@mydomain.myshopify.com/admin/api/2023-01/customers/5976393646168/metafields/21215617450072.json',
contentType: "application/json; charset=utf-8",
data : JSON.stringify({"metafield":{"value":"qweqweqwe"}}),
success: function() {
alert('success');
},
error: function() {
alert('error');
}
})