Tarandeep Gill
Tarandeep Gill

Reputation: 1536

Shopify API fields not updated

I am using a Private Application to update some fields of my products.

The calls are going through just fine (and returning 200 OK), however, none of the fields passed is actually being updated, and I am being returned the old product field values.

PUT https://MYKEY:[email protected]/admin/products/NNNNNNNN.json
{"product":{"id": NNNNNNNN,"title":"Product Name"}}

Returns:

HTTP/1.1 200 OK
{"product": {title: 'OLD TITLE'}, .... }

PS: I am using CURL, and I can read the products. Just can't update them.

Upvotes: 1

Views: 221

Answers (1)

Tarandeep Gill
Tarandeep Gill

Reputation: 1536

Solved. You have to set 'content-type': 'application/json' in your request, which is not really documented in the API Docs.

Upvotes: 1

Related Questions