---
title: "Receive the current bin assignment of the provided bin."
method: PUT
path: "/bins/{barcode}/assignments/current/receive"
---

# Receive the current bin assignment of the provided bin.

`PUT /bins/{barcode}/assignments/current/receive`

## Request

- Base URL: `https://api.mamaearth.ca` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mamaearth.ca/bins/{barcode}/assignments/current/receive`
- Auth: none declared
- TypeScript: <https://skmtc.dev/mamaearth/apis/mama-earth-api/docs/bins/:barcode/assignments/current/receive/put.ts> (a function with typed inputs; its response is checked against the schema)

Receive the current bin assignment of the provided bin.


We use "current" and not "{id}" here because the receiver scans a bin without knowing its
current assignment.

## Path parameters

- `barcode` 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

## Response `200`

receiveCurrentBinAssignment 200 response

- BinAssignmentReusableBinAssignment: 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.

---

[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.dev/mamaearth/apis/mama-earth-api/revisions/2693a8db8dbd?raw)
