square / square-nodejs-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for `item_data` type `event`

Aghassi opened this issue · comments

commented

Describe the bug
When using Square Online, you can create an item that is for an Event. This item has metadata on it to differentiate it from other items in your catalog. Today, you can't ask the API for all items of type event. You must first ask for all items and then filter on event key under item_data. This is inconvenient especially as there are limits on how much the API can return over time.

Expected behavior
There should be a way to at least request all items with item_data.event as well as a way to paginate based on start_date. This data is already part of the payload today, ex:

        "event": {
          "uid": "*********",
          "start_at": "2023-07-01T20:00:00+00:00",
          "end_at": "2023-07-02T00:00:00+00:00",
          "event_location_time_zone": "America/Los_Angeles",
          "event_location_name": "EXAMPLE",
          "event_location_types": [
            "IN_PERSON"
          ],
          "address_id": "************",
          "all_day_event": false

To Reproduce
Go to square online and create a catalog item with type Event. Fill in the details. Then try and use the SDK to query for just that item(s). You cannot.

Screenshots
If applicable, add screenshots to help explain the bug.

Square SDK version
For example: 17.2.x

25.1.0

Additional context
Add any other context about the problem here.

Hi @Aghassi

I have reached out to our API team for further information. I'll report back here when I have an update for you. Thanks for bringing this to our attention!

In the future, we suggest that questions like this be asked on our Developer Forums as these forums are monitored by Square Employees and you will receive a response to questions within 48 hours.

Hey @Aghassi,

The team got back to me pretty quickly. This Improvement (along with achieving parity with Square Online for other types that are not supported in the catalog) is on the Roadmap for 2023, but unfortunately I don't have much more of a clear timeline than that. Rest assured this problem is known and will get addressed.

In the meantime I am going to close this ticket as it's not directly an issue with the nodejs SDK, and is instead an improvement to the API itself.

Thanks again for your feedback 😄

cheers!

commented

Thanks for the update! Look forward to this improvement! I'll use the forum next time. I'm use to operating with open source work on GitHub which is why I filed here first. Thanks again!