Bug: Catalog API for listing Items is missing a field

I’m trying to read the soldOut field that exists in an item variation field’s locationOverrides response, but it is not there for the Node SDK. I am calling the ListCatalog endpoint. Only the locationId exists in it. When I use the API explore or check the logs it does exist however. Both the Node SDK and the API explore requests were made with the API version: 2021-09-15

The item variation ID is: DP2NTNYEFGMB3OPLJPW65PI2, the merchant account ID is: MLVDP26NCCB3P, and my application ID is: sq0idp-n7Co30IXghyF_BPiBvCnBA

Thanks!

:wave: Currently sold_out is a read only field that will be returned in the catalog object if the seller has set that item as sold out in the Dashboard. It currently isn’t available in the SDK. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

1 Like

Thanks for the reply Bryan!

I’m shocked to hear that this was intentional. I feel like an SDK that is upped to the same version should include the same fields.

What do you suggest I should do if the merchant wants my app to reflect when an item variation is in the sold_out state? Thanks!

We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.

I understand that this isn’t ideal but it is included in the Catalog response you could make a REST call to the catalog to get the status. :slightly_smiling_face:

Oh I think you misunderstood. Sorry for the confusion.

I am making calls to the Catalog API (for Items). The field does not exist in the response however. So I can’t read it.

In the API logs of my account it is there. But it is not there when calling it inside of my Node backend.

EDIT: I just updated my question to make more sense. Sorry about that.

Right the SDK isn’t showing the field. This is due to it not being included in the SDK. At this time if you want to read it you would need to make a REST API call not using the SDK to get sold_out in the response. :disappointed:

1 Like

Lol thanks Bryan.

Seems like someone just forgot to add it in the schema file: square-nodejs-sdk/itemVariationLocationOverrides.ts at master · square/square-nodejs-sdk · GitHub

Just need to add:

soldOut: ['sold_out', optional(boolean())],

Hopefully it can be fixed soon thanks. Let me know when it is if you can.

Awesome! Thank you! :slightly_smiling_face: