---
title: "GET /bins"
method: GET
path: "/bins"
---

# GET /bins

`GET /bins`

## Query parameters

- `keyset` BinKeyset, required — Defines keyset for paginating Bins. The keyset should always use the `binId` as the second argument for ordering and paging, however, different dates may be used depending on the query. This is specified by DateField
  - `seek` 'BEFORE' | 'AFTER' — Whether the page referred to by this keyset comes before or after those values.
  - `size` integer, nullable
  - `dateField` 'CHARGED_AT' | 'DISPATCHED_AT' | 'DUE_AT' | 'RECEIVED_AT' | 'REFUNDED_AT' | 'RETIRED_AT' — Defines which datetime field the keyset corresponds to.
  - `binId` integer, nullable
  - `date` string, date-time, nullable
- `filter` BinFilter, required — Describes a set of filters to apply to a bin query. Note that the field referred to by `startDate` and `endDate` must be specified elsewhere, e.g. in BinKeyset.
  - `status` 'IN_STOCK' | 'DISPATCHED' | 'RETIRED'
  - `startDate` string, date, nullable
  - `endDate` string, date, nullable
  - `assignedUserId` integer, nullable
  - `assignedOrderId` integer, nullable
  - `includeSingleUse` boolean, nullable

## Response `200`

getBins 200 response

- KeysetPageBinBinKeyset — Represents a page paginated by a keyset.
  - `data` Bin[], required
    - `id` BinBarcode, required — Represents a UPC-A barcode of 11 digits. The checksum is not stored, it should be generated when needed, and otherwise not sent by clients during API calls.
      - `orderBarcode` boolean — We reserve the prefix 90 for order barcodes, so that we are able to distinguish an order from bin barcodes without doing an API or DB lookup.
      - `singleUseBinBarcode` boolean — Checks if this barcode is a single-use bin barcode.
      - `packagingBarcode` boolean
    - `status` 'IN_STOCK' | 'DISPATCHED' | 'RETIRED', required
    - `created` string, date-time, required
    - `assignment` BinAssignmentReusableBinAssignment, required — An assignment to a reusable bin, modeled by Bin
      - `id` integer, required
      - `binId` BinBarcode, required — Represents a UPC-A barcode of 11 digits. The checksum is not stored, it should be generated when needed, and otherwise not sent by clients during API calls.
        - `orderBarcode` boolean — We reserve the prefix 90 for order barcodes, so that we are able to distinguish an order from bin barcodes without doing an API or DB lookup.
        - `singleUseBinBarcode` boolean — Checks if this barcode is a single-use bin barcode.
        - `packagingBarcode` boolean
      - `orderId` integer, required
      - `user` UserBasic, required
        - `active` boolean
      - `dispatch` BinScan, required — Describes a bin being scanned, either to dispatch or to receive it.
        - `admin` UserBasic, required
          - `active` boolean
        - `timestamp` string, date-time, required — The date time at which the scan occurred.
      - `dueAt` string, date-time, required
      - `chargeAt` string, date-time, required
      - `chargeAttempts` BinChargeAttempts, required
        - `count` integer, required
        - `lastAttemptedAt` string, date-time, required
        - `lastErrorMessage` string, required
      - `receipt` BinScan, required — Describes a bin being scanned, either to dispatch or to receive it.
        - `admin` UserBasic, required
          - `active` boolean
        - `timestamp` string, date-time, required — The date time at which the scan occurred.
      - `charge` BinCharge, required — Describes charging a customer for a bin, for example because it was lost or broken.
        - `id` integer, required — The id of the charge
        - `admin` UserBasic, required
          - `active` boolean
        - `timestamp` string, date-time, required — The date time at which the charge occurred.
        - `amount` number, required — The amount charged.
        - `paymentMethod` 'CREDIT_CARD' | 'ACCOUNT_CREDITS', required — Describes how a payment was made.
      - `refund` BinCharge, required — Describes charging a customer for a bin, for example because it was lost or broken.
        - `id` integer, required — The id of the charge
        - `admin` UserBasic, required
          - `active` boolean
        - `timestamp` string, date-time, required — The date time at which the charge occurred.
        - `amount` number, required — The amount charged.
        - `paymentMethod` 'CREDIT_CARD' | 'ACCOUNT_CREDITS', required — Describes how a payment was made.
    - `pickup` ScheduledBinPickup, required
      - `stopRequestId` integer, required
      - `scheduleByDate` string, date, required
    - `retirement` BinRetirement, required — Describes a bin being retired.
      - `admin` UserBasic, required
        - `active` boolean
      - `timestamp` string, date-time, required — The date time at which the charge occurred.
      - `reason` 'NOT_READY' | 'BASE_DAMAGE' | 'LID_DAMAGE' | 'ENVIRONMENTAL_DAMAGE' | 'BARCODE_DAMAGE' | 'OTHER_DAMAGE' | 'MISSING_CUSTOMER' | 'MISSING_CUSTOMER_GOODWILL' | 'MISSING_LOGISTICS' | 'WORN_OUT', required
  - `previousKeyset` BinKeyset, required — Defines keyset for paginating Bins. The keyset should always use the `binId` as the second argument for ordering and paging, however, different dates may be used depending on the query. This is specified by DateField
    - `seek` 'BEFORE' | 'AFTER' — Whether the page referred to by this keyset comes before or after those values.
    - `size` integer, nullable
    - `dateField` 'CHARGED_AT' | 'DISPATCHED_AT' | 'DUE_AT' | 'RECEIVED_AT' | 'REFUNDED_AT' | 'RETIRED_AT' — Defines which datetime field the keyset corresponds to.
    - `binId` integer, nullable
    - `date` string, date-time, nullable
  - `nextKeyset` BinKeyset, required — Defines keyset for paginating Bins. The keyset should always use the `binId` as the second argument for ordering and paging, however, different dates may be used depending on the query. This is specified by DateField
    - `seek` 'BEFORE' | 'AFTER' — Whether the page referred to by this keyset comes before or after those values.
    - `size` integer, nullable
    - `dateField` 'CHARGED_AT' | 'DISPATCHED_AT' | 'DUE_AT' | 'RECEIVED_AT' | 'REFUNDED_AT' | 'RETIRED_AT' — Defines which datetime field the keyset corresponds to.
    - `binId` integer, nullable
    - `date` string, date-time, nullable

---

[API](https://skmtc.dev/mamaearth/apis/mama-earth-api.md) · [All operations](https://skmtc.dev/mamaearth/apis/mama-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mamaearth/mama-earth-api/revisions/42b90383d711/schema)
