Help with working with API (updating product inventory)

I’m having trouble with
I’m trying to update the stock status of a product

Working in
I’m a developer, now working with postman just to make the calls while I build my platform

Site link

What I’m trying to do
update product inventory status

What I’ve tried so far
Every paid AI possible, please help I don’t know what’s the issue anymore

Extra context
postman request PATCH ‘https: //www.wixapis.com/stores/v3/products-with-inventory/e8ea4a04-570d-4b78-9a00-0d08e4ff4334’ \

–header ‘Content-Type: application/json’ \

–header 'Authorization: Bearer ’ \

–header ‘wix-site-id: 7e21e9b8-0dd1-4036-8faf-64dfc502974f’ \

–header ‘Cookie: XSRF-TOKEN=1764532169|oG2dknSiDo2M’ \

–body '{

"product": {

    "id": "e8ea4a04-570d-4b78-9a00-0d08e4ff4334",

    "revision": "23",

    "options": \[

        {

            "id": "1e1a9077-5521-4afa-a061-886a5638c64b",

            "name": "size",

            "key": "size",

            "optionRenderType": "TEXT_CHOICES",

            "choicesSettings": {

                "choices": \[

                    {

                        "choiceId": "b0a59e58-0afa-4587-b020-c0979b6b4970",

                        "choiceType": "CHOICE_TEXT",

                        "name": "XS"

                    },

                    {

                        "choiceId": "ddeb2edc-c64b-4281-beb7-1f147d61cd88",

                        "choiceType": "CHOICE_TEXT",

                        "name": "S"

                    },

                    {

                        "choiceId": "1afc9256-362c-49fb-a338-190252ee4dca",

                        "choiceType": "CHOICE_TEXT",

                        "name": "M"

                    },

                    {

                        "choiceId": "86489d32-32c1-4ed7-b086-244eeed8e62b",

                        "choiceType": "CHOICE_TEXT",

                        "name": "L"

                    },

                    {

                        "choiceId": "a23fe307-9a6e-479b-9d52-c5f87190f191",

                        "choiceType": "CHOICE_TEXT",

                        "name": "XL"

                    },

                    {

                        "choiceId": "486b50e1-ca9f-4fb7-a111-68eed5c7702d",

                        "choiceType": "CHOICE_TEXT",

                        "name": "XXL"

                    }

                \]

            }

        }

    \],

    "variantsInfo": {

        "variants": \[

            {

                "id": "949ec0f5-71a7-4936-a09b-6e470b121edd",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "b0a59e58-0afa-4587-b020-c0979b6b4970"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryItem": {

                    "in_stock": true

                }

            },

            {

                "id": "d76fbcab-d7b6-495e-81e2-5af57e7ffe68",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "ddeb2edc-c64b-4281-beb7-1f147d61cd88"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryItem": {

                    "in_stock": true

                }

            },

            {

                "id": "e467906d-76e8-4208-88da-94af2ad510a5",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "1afc9256-362c-49fb-a338-190252ee4dca"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryItem": {

                    "in_stock": true

                }

            },

            {

                "id": "0048bd18-d20e-4564-ae85-27469725bef8",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "86489d32-32c1-4ed7-b086-244eeed8e62b"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryItem": {

                    "in_stock": true

                }

            },

            {

                "id": "526154fd-79e6-4f41-8d4d-a99395e4ef7e",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "a23fe307-9a6e-479b-9d52-c5f87190f191"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryItem": {

                    "in_stock": true

                }

            },

            {

                "id": "9c78b1e6-8fc1-4b8e-8103-a1348683abad",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "486b50e1-ca9f-4fb7-a111-68eed5c7702d"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "268"

                    }

                },

                "inventoryItem": {

                    "in_stock": true

                }

            }

        \]

    }

}

}’

error:
{

"message": "Missing product option choices. Every variant option id (\`variants.choices.optionId\` field) must exist in \`options.id\`",

"details": {

    "applicationError": {

        "code": "MISSING_VARIANT_OPTION_CHOICE",

        "description": "Missing product option choices. Every variant option id (\`variants.choices.optionId\` field) must exist in \`options.id\`",

        "data": {

            "optionsMissingChoice": \[

                "size"

            \],

            "productId": "e8ea4a04-570d-4b78-9a00-0d08e4ff4334"

        }

    }

}

}

something that might help, here’s the response of the product creation:
{

"product": {

    "id": "e8ea4a04-570d-4b78-9a00-0d08e4ff4334",

    "revision": "23",

    "createdDate": "2025-11-25T19:29:13.662Z",

    "updatedDate": "2025-11-30T23:43:19.526Z",

    "numericId": "1764098953656002",

    "name": "Avant-garde Cotton Harem Jumpsuit: Asymmetric Gothic Set",

    "slug": "avant-garde-cotton-harem-jumpsuit-asymmetric-gothic-set",

    "visible": true,

    "visibleInPos": true,

    "media": {

        "main": {

            "id": "511719_749f6b1b05ce4157a4a2f2196b64b8b1\~mv2.jpg",

            "image": {

                "id": "511719_749f6b1b05ce4157a4a2f2196b64b8b1\~mv2.jpg",

                "url": "https://static.wixstatic.com/media/511719_749f6b1b05ce4157a4a2f2196b64b8b1~mv2.jpg",

                "height": 3000,

                "width": 1689,

                "filename": "511719_0dbf26552d7041edb21198612172fbad\~mv2.jpg",

                "sizeInBytes": "920397"

            },

            "mediaType": "IMAGE",

            "uploadId": "731c1e89-5679-4e43-ac67-f8859ff866e9"

        }

    },

    "options": \[

        {

            "id": "1e1a9077-5521-4afa-a061-886a5638c64b",

            "name": "Size",

            "optionRenderType": "TEXT_CHOICES",

            "choicesSettings": {

                "choices": \[

                    {

                        "choiceId": "b0a59e58-0afa-4587-b020-c0979b6b4970",

                        "linkedMedia": \[\],

                        "choiceType": "CHOICE_TEXT",

                        "key": "XS",

                        "name": "XS",

                        "inStock": false,

                        "visible": true

                    },

                    {

                        "choiceId": "ddeb2edc-c64b-4281-beb7-1f147d61cd88",

                        "linkedMedia": \[\],

                        "choiceType": "CHOICE_TEXT",

                        "key": "S",

                        "name": "S",

                        "inStock": false,

                        "visible": true

                    },

                    {

                        "choiceId": "1afc9256-362c-49fb-a338-190252ee4dca",

                        "linkedMedia": \[\],

                        "choiceType": "CHOICE_TEXT",

                        "key": "M",

                        "name": "M",

                        "inStock": false,

                        "visible": true

                    },

                    {

                        "choiceId": "86489d32-32c1-4ed7-b086-244eeed8e62b",

                        "linkedMedia": \[\],

                        "choiceType": "CHOICE_TEXT",

                        "key": "L",

                        "name": "L",

                        "inStock": false,

                        "visible": true

                    },

                    {

                        "choiceId": "a23fe307-9a6e-479b-9d52-c5f87190f191",

                        "linkedMedia": \[\],

                        "choiceType": "CHOICE_TEXT",

                        "key": "XL",

                        "name": "XL",

                        "inStock": false,

                        "visible": true

                    },

                    {

                        "choiceId": "486b50e1-ca9f-4fb7-a111-68eed5c7702d",

                        "linkedMedia": \[\],

                        "choiceType": "CHOICE_TEXT",

                        "key": "XXL",

                        "name": "XXL",

                        "inStock": false,

                        "visible": true

                    }

                \]

            },

            "key": "Size"

        }

    \],

    "modifiers": \[\],

    "infoSections": \[\],

    "mainCategoryId": "5afade7e-3f9c-454d-980d-98c05f4d7c20",

    "inventory": {

        "availabilityStatus": "OUT_OF_STOCK",

        "preorderStatus": "DISABLED",

        "preorderAvailability": "NO_VARIANTS"

    },

    "productType": "PHYSICAL",

    "physicalProperties": {},

    "handle": "Product_259",

    "importId": "760c73f9-316c-4eb2-a33a-b5ce6eab4623",

    "actualPriceRange": {

        "minValue": {

            "amount": "268"

        },

        "maxValue": {

            "amount": "269"

        }

    },

    "compareAtPriceRange": {

        "minValue": {

            "amount": "0"

        },

        "maxValue": {

            "amount": "0"

        }

    },

    "variantsInfo": {

        "variants": \[

            {

                "id": "949ec0f5-71a7-4936-a09b-6e470b121edd",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "b0a59e58-0afa-4587-b020-c0979b6b4970"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryStatus": {

                    "inStock": false,

                    "preorderEnabled": false

                }

            },

            {

                "id": "d76fbcab-d7b6-495e-81e2-5af57e7ffe68",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "ddeb2edc-c64b-4281-beb7-1f147d61cd88"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryStatus": {

                    "inStock": false,

                    "preorderEnabled": false

                }

            },

            {

                "id": "e467906d-76e8-4208-88da-94af2ad510a5",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "1afc9256-362c-49fb-a338-190252ee4dca"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryStatus": {

                    "inStock": false,

                    "preorderEnabled": false

                }

            },

            {

                "id": "0048bd18-d20e-4564-ae85-27469725bef8",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "86489d32-32c1-4ed7-b086-244eeed8e62b"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryStatus": {

                    "inStock": false,

                    "preorderEnabled": false

                }

            },

            {

                "id": "526154fd-79e6-4f41-8d4d-a99395e4ef7e",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "a23fe307-9a6e-479b-9d52-c5f87190f191"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "269"

                    }

                },

                "inventoryStatus": {

                    "inStock": false,

                    "preorderEnabled": false

                }

            },

            {

                "id": "9c78b1e6-8fc1-4b8e-8103-a1348683abad",

                "visible": true,

                "choices": \[

                    {

                        "optionChoiceIds": {

                            "optionId": "1e1a9077-5521-4afa-a061-886a5638c64b",

                            "choiceId": "486b50e1-ca9f-4fb7-a111-68eed5c7702d"

                        }

                    }

                \],

                "price": {

                    "actualPrice": {

                        "amount": "268"

                    }

                },

                "inventoryStatus": {

                    "inStock": false,

                    "preorderEnabled": false

                }

            }

        \]

    },

    "flattenOptions": \[\],

    "flattenModifiers": \[\],

    "variantSummary": {

        "variantCount": 6

    },

    "entityEventSequence": "39"

}

}