# Help creating a product, getting an INVALID\_REQUEST\_ERROR

**URL:** <https://developer.squareup.com/forums/t/help-creating-a-product-getting-an-invalid-request-error/4291>\
**Category:** Questions\
**Tags:** catalog-api\
**Created:** [November 21, 2021, 4:56pm UTC](https://developer.squareup.com/forums/t/help-creating-a-product-getting-an-invalid-request-error/4291 "2021-11-21T16:56:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://developer.squareup.com/forums/u/ben)\
**Post date:** [November 21, 2021, 4:56pm UTC](https://developer.squareup.com/forums/t/help-creating-a-product-getting-an-invalid-request-error/4291/1 "2021-11-21T16:56:35Z")

</div>

Hi., I am new to the Square API (using Python) and am trying to create a product using [upsert\_catalog\_object](https://github.com/square/square-python-sdk/blob/master/doc/api/catalog.md#upsert-catalog-object) however I am getting an error and I am stuck figuring out quite what is wrong.

Here is my request body:

```auto
{
    "idempotency_key": "b0bbd1ad-e10a-4358-8cd0-b2d881d4525a",
    "object": {
        "type": "ITEM",
        "id": "#item",
        "present_at_all_locations": false,
        "present_at_location_ids": [
            "K085TXKGCT4PT"
        ],
        "is_deleted": false,
        "image_id": "CNOOAQGBUGKR7TANJP5Z2Z6M",
        "item_data": {
            "name": "Test Item",
            "description": "<p data-mce-fragment=\"1\">Test description.</p>",
            "available_online": false,
            "variations": [
                {
                    "id": "#v0",
                    "type": "ITEM_VARIATION",
                    "item_variation_data": {
                        "item_id": "#item",
                        "name": "Default Title",
                        "sku": "my-sku",
                        "ordinal": 0,
                        "pricing_type": "FIXED_PRICING",
                        "price_money": {
                            "amount": 600,
                            "currency": "USD"
                        },
                        "track_inventory": true,
                        "inventory_alert_type": "LOW_QUANTITY",
                        "inventory_alert_threshold": 20,
                        "stockable": true,
                        "user_data": "weightGrams=40"
                    }
                }
            ]
        }
    }
}

```

And the error:

```auto
INVALID_REQUEST_ERROR (INVALID_VALUE): Object `#v0` of type ITEM_VARIATION is enabled at unit `3ES4EF5TZPZQ9`, but the referenced object with token `2YQATXDKZI6XQVCL7PZTB6GY` of type ITEM is not., FIELD: item_id

```

I appreciate any help. Thanks!

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [November 23, 2021, 4:49pm UTC](https://developer.squareup.com/forums/t/help-creating-a-product-getting-an-invalid-request-error/4291/2 "2021-11-23T16:49:49Z")

</div>

👋 The error is saying the `ITEM_VARATION` is enabled at a location the `ITEM` is not enabled at. The item is only enabled at `K085TXKGCT4PT` but the variation seems to be available everywhere (no explicit `present_at_all_locations` or `present_at_location_ids` ). 🙂
