Catalog API does NOT offer PATCH, correct?

Hello,

I was playing around with the API explorer in the Catalog API to understand how the UpsertCatalogObject endpoint works as effectively the common gateway of POST and PUT. After using the correct (Object_ID, version) pair on the second UpsertCatalogObject request, I was able to confirm through the SearchObjects API call that PUT had occured correctly: my Sandbox environment only has one CatalogObject, and it is the one that I provided in the second UpsertCatalogObject payload.

I noticed, however, that when I left some fields that I have used for the first Upsert unset for the second, that those fields ended up unset on the object left on the server.

This, to me, means that UpsertCatalogObject is a POST and PUT - only API. Is this correct? If so, is there perhaps a different API or mechanism I could use if I ever wanted to serve a PATCH?

Unfortunately not at this time. As you say, the UpsertCatalogObject must include all the fields that you intend on keeping or else they will be removed from the actual object. Typically in these scenarios we recommend retrieving the entire catalog object first, and editing the object directly changing what you need, and then pushing the entire object to UpsertCatalogObject to ensure nothing is accidentally deleted.

1 Like