When creating a new product it's a minefield.

Solved
Highlighted
Excursionist
16 2 1

When I create a new product it's a minefield.  I think the documentation should be more clear on what aspects you can POST on creation of a product, perhaps it would be clearer if you have a different table for fields you can set.  For instance I tried defining a static.
public static inline var inventoryManagement = 'shopify';
Then but if set that on my Variant when creating a product it 422, I understand you default it but why am I not allowed to set on creation?  
I am now going through manually checking which fields I can setup on creation and which will result in a 422 and then adjusting my typedef to make them optional and commenting them, it's not fun as I have to try each field, also with options it's really weird because I need some variants for them to be accepted.  It feels like only the examples provided work anything else and it's likely to fail.  I am thinking maybe I have two typedef one for creation and one for update that is an extension.
if I set images up it allows me to use image without 422.
I am gathering I need to do two calls to get a product quantity up with the REST api this is rather ugly yet to implement futures so it's kind of messy.
Is there a better place I can look at for documentation... ideally source code! :)

0 Likes
Highlighted
Excursionist
16 2 1

Hopefully have some example uses up soon that I will add to hxTShopify, but the REST api needs more clarity on the property settings.

0 Likes
Highlighted
Excursionist
16 2 1

oh quantity goes up ok

0 Likes
Highlighted
Excursionist
16 2 1

This is an accepted solution.

confused the inventory thing is now working.

0 Likes
Highlighted
Excursionist
16 2 1

Have updated hxTShopify library witten in Haxe language, with example demo of product creation and product migration of 7 products between stores, includes Images, Variants, Options and Quanities.
https://www.linkedin.com/pulse/exploring-shopify-haxe-justin-mills/
I am looking for work and have customised some liquid, based in the UK probably be back as I iron out more details.

0 Likes