Nodejs - Instantiating a CatalogObject correctly

I don’t need any help here, but I wanted to post this because it was confusing me for a hot minute. I’m coming from Java, but am doing this integration with nodejs so I can learn about it.

I kept trying to make a request to create an ITEM via CatalogApi.upsertCatalogObject(body) however it kept telling me I was missing fields. Looking at the json examples on the github it appears that you have to build the request using snake case, however the object properties must be defined using camelcase as indicated in the sdk docs.

Minor oversite on my part, but it was one of those silly issues that hung me up for awhile. I think the biggest thing was that the error message kept telling me data field “item_data” was missing. Admittedly, that is the response from the server and not the command I’m using but it misdirected my attention.

Anyways, hopefully this helps someone someday.

:wave: Thanks for sharing your feedback. We’re constantly working to improve our products and services based on the feedback we receive from customers. I’ll be sure to share this with the appropriate team. :slightly_smiling_face: