Making multiple variant items with the create product api + multiple skus

i have been working on integrations with printify and have a lot done,with a goal to share the python code once finalized to assist in future integration.

orders place automatically and i can update my tracking numbers as they come in over api, But
I cannot figure out the create product methods 100%.

I have figured out how to make the product, get the variant fields over properly, and add the default sku to them, but i don’t understand how to update the sku for each variant, and also the main photos.

Is there a way to do this in the create product & sku API endpoint, or what is the best process?
I have variant attribute ids for size and color ect but im just a little confused where to start

Would be great to have the ability to add all skus with the main create call.

Additionally variants are corrupt until opened in editor and recreated by webflow, but it seems to fix them correctly.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

ok i figured it out so im gonna share here for anyone that is using the new documentation.
it was very difficult to understand with no documentation on this process, but after creating the product you have to set the variants parameters with the sku-values field for each sku instance in a list object before letting webflow recreate the variants.

you have to use the create sku api call and must include all of these fields or it wont work and confusingly asks for the option name as a field example:"color" in the error, but when added it fails and instead is looking for the cms id combination.

This is a current accepting json to create a new sku with custom data:

sendurl = "https://api.webflow.com/sites/{siteID}/products/{productId}/skus"

payload = {
  "skus": [
    {
      "fields": {
        "slug": "name-size-color", #required for create sku has no effect
        "sku-values": {
          "288d07": "751", #variant option ID : Variant option selected ID
          "09a761": "16"    #can use up to the limit of options allowed in your plan type
        },
        "_archived": false,
        "_draft": false,
        "price": {
          "value": 2000, #price for variant
          "unit": "USD"
        },
        "sku": "Test-sku-number", #Sku Number for variant
        "name": "Test Name",        #Variant name has no effect
        "main-image": {
          "fileId": "secrets.token_hex(16)", #Python Secrets library for auto id generation has to be an id included or wont save the photo
          "url": "https://imageurl.png",
          "alt": "null"
        }
      }
    }
  ]
}

@matthewpmunger are there any complete tutorials that show this process the new developers site is severely broken, barely understandable and most tests fail due to not having correct data

I am also looking for the tutorials so that we could properly learn and I could also teach it to my team members. So they could perform the task if I am not available. So if you have any tutorial source so kindly share with us.