# Search records by tote ID/barcode

**URL:** <https://community.shiphero.com/t/search-records-by-tote-id-barcode/1529>\
**Category:** GraphQL API\
**Created:** [August 31, 2021, 10:36pm UTC](https://community.shiphero.com/t/search-records-by-tote-id-barcode/1529 "2021-08-31T22:36:07Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Gergely](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@Gergely](https://community.shiphero.com/u/Gergely)\
**Post date:** [December 13, 2022, 1:32pm UTC](https://community.shiphero.com/t/search-records-by-tote-id-barcode/1529/16 "2022-12-13T13:32:39Z")

</div>

I was going to +1 this feature as well, but I might have found the solution.

I was desperately looking for ways to optimise our [workaround](https://community.shiphero.com/t/query-what-is-currently-in-totes/295/10) for the lack of this feature, when I came across a (new?) query.

 ![shiphero-tote-query](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/26042df15102e4466f46c6475fcbc30cf7326722.png)

Unfortunately, there is not much documentation available on it outside the schema, so not entirely sure what the data returned is _in fact_ meant to be, but after playing around with it a bit, I managed to integrate it into our workflow in a dev env. It seems to cover [our use case](https://community.shiphero.com/t/seemingly-random-403-forbidden/2236) perfectly!

Currently, it only filters by `barcode` but if you don’t routinely create new totes, you could keep a dictionary of all totes that are in use if you want to search by `tote_id` or `tote_name`.

An example query:

```auto
query {
  tote(barcode: "4 ******* 0") {
    request_id
    complexity
    data {
      orders {
        order_number
        line_items {
          edges {
            node {
              sku
              quantity
            }
          }
        }
      }
      picks {
        sku
        quantity
      }
    }
  }
}

```

and response:

```auto
{
  "data": {
    "tote": {
      "request_id": "63987dd58817625211e2de09",
      "complexity": 102,
      "data": {
        "orders": [
          {
            "order_number": "T ******** 5",
            "line_items": {
              "edges": [
                {
                  "node": {
                    "sku": "S ******* 1",
                    "quantity": 1
                  }
                },
                {
                  "node": {
                    "sku": "S ****** 1",
                    "quantity": 1
                  }
                },
                {
                  "node": {
                    "sku": "T ******** 4",
                    "quantity": 1
                  }
                }
              ]
            }
          }
        ],
        "picks": [
          {
            "sku": "T ******** 4",
            "quantity": 1
          },
          {
            "sku": "S ****** 1",
            "quantity": 1
          },
          {
            "sku": "S ******* 1",
            "quantity": 1
          }
        ]
      }
    }
  },
  "extensions": {
    "throttling": {
      "estimated_complexity": 102,
      "cost": 5,
      "cost_detail": {
        "tote": {
          "items_count": 4,
          "cost": 1,
          "total_cost": 5,
          "fields": {}
        }
      },
      "user_quota": {
        "credits_remaining": 1997,
        "max_available": 2002,
        "increment_rate": 30
      }
    }
  }
}

```

I hope this will be useful for others following this thread as well!

Could someone from ShipHero reading this forum confirm that this query is ready to be used in production?

---

_[View the full topic](https://community.shiphero.com/t/search-records-by-tote-id-barcode/1529)._
