Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misinterpretation of catalog_object_id in docs #150

Open
kyeshmz opened this issue Jun 14, 2024 · 0 comments
Open

Misinterpretation of catalog_object_id in docs #150

kyeshmz opened this issue Jun 14, 2024 · 0 comments

Comments

@kyeshmz
Copy link

kyeshmz commented Jun 14, 2024

Describe the bug
There are multiple places in the API where the JSDoc states that I need to add a catalog_object_id, when in fact, I need to provide a item_variation_id.

This might be the case where "all things are objects", but it would be better for the docs and the API to state that this needs to be a variation ID.

Example:
When hitting this API.
https://developer.squareup.com/explorer/square/inventory-api/retrieve-inventory-count

This is the error I get if I pass catalog_object_id.

'{"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Item variation with catalog object ID `<redacted>` not found."}]}'

The errors are clear enough that I understand a bit to pass a variation Id, but updating the docs and the jsdocs would be better.

EDIT:
So for this instance, this seems a bit weird for the end user to understand which one I pass.


  /** The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this line item. */
    catalogObjectId?: string | null;

Expected behavior
Have the docs show I need a variation ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant