I’m new to Shopify so please excuse me if I’ve not done this or that…
I’ve created a private store (signed up to the partner programme), and made notes of the various API keys and secrets.
I downloaded the ShopifySharp application and pulled out of it the bits needed to create a product, and found from debugging the code that I needed an Access Token. In Postman, I created a GET request to:
https://.myshopify.com/admin/api/2019-04/storefront_access_tokens.json and added the necessary basic auth credentials and was ale to get my store’s access token: hurrah!
Next, since the C# app was failing with bad request, I decided to use Postman to try and create a POST product request to https://.myshopify.com/admin/api/2019-04/products.json. I added the necessary basic auth details as above, added two headers: X-Shopify-Access-Token (and set it to the value of the token returned above) and also Accept: application/json.
and finally, in the body of the request, I pasted in
The token that you need is to do this is actually your API password (API Key blah, Password …).
With this APi password inserted as the value for X-Shopify-Access-Token, the request now fails in Postman with “product”: “Required parameter missing or invalid” - presuambly because the example JSONs that Shopify provide for you is incomplete.
But in the C# App, this works!!
All I need now is the complete JSON to create products, and not just the snippet that Shopify provide.
I’m in the situation now where I need to update the Order API call to use the Link response in the response.headers, but, this is turning out to be ball-ache ie the Shopify docs aren’t much help to me