Cannot Upsert (update) CatalogObjects of type "ITEM"

I’m trying to update my CatalogObject of type ITEM, but I get an error every time I try to upsert (update) an existing CatalogObject.

Any help would be greatly appreciated! Have been stuck on this for a while, can’t get a more informative error message

When I use the RetrieveCatalog endpoint, I am getting the ITEM back no problem.

I’ve tried passing back the version from RetrieveCatalogObject endpoint to Upsert Catalog Object as one of the fields, incrementing it by 1, incrementing it by a lot, no dice.

I’ve also tried passing back the entire CatalogObject retrieved with only the name change, still doesn’t work.

My requestBody looks like this (just trying to edit the name for simplicity).

{
    idempotency_key: crypto.randomUUID(),
    object: {
      id: "3F7UQD7TFPYCKBCST46ZLEIN",
      type: "ITEM",
      item_data: {
        name: "NEW NAME FROM CLI",
      },
    },
  };

Error:

   data: {
      errors: [
        {
          category: 'INVALID_REQUEST_ERROR',
          code: 'NOT_FOUND',
          detail: 'Resource not found.'
        }
      ]
    }

Thank you!

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Retrieve Catalog Objects
Catalog API
Work with Images

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

When updating a catalog object you have to pass in every field of the catalog object otherwise it will be removed from the catalog object. :slightly_smiling_face:

I’ve done this a few times (just edited the one field), no dice unfortunately.

Do I need to do something to the version #?

What’s your application ID and are you able to call RetrieveCatalogObject with 3F7UQD7TFPYCKBCST46ZLEIN? :slightly_smiling_face: