---
title: "Adds a box to scans, writes box to database if it is not there. You can use scan number 10 to add a box to the wallet."
method: POST
path: "/scan/addBox"
tags: ["scan", "wallet"]
---

# Adds a box to scans, writes box to database if it is not there. You can use scan number 10 to add a box to the wallet.

`POST /scan/addBox`

## Request body

- ScanIdsBox — Ergo box with associated scans (their respective identifiers)
  - `scanIds` integer[], required
  - `box` ErgoTransactionOutput, required
    - `boxId` string, base16 — Base16-encoded transaction box id bytes. Should be 32 bytes long
    - `value` integer, required — Amount of Ergo token
    - `ergoTree` string, base16, required — Base16-encoded ergo tree bytes
    - `creationHeight` integer, required — Height the output was created at
    - `assets` Asset[] — Assets list in the transaction
      - `tokenId` string, base16, required — Base16-encoded 32 byte digest
      - `amount` integer, required — Amount of the token
    - `additionalRegisters` Registers, required — Ergo box registers
    - `transactionId` string, base16 — Base16-encoded transaction id bytes
    - `index` integer — Index in the transaction outputs

## Response `200`

It the box is added successfully, then its id is returned

- string, base16 — Base16-encoded transaction id bytes

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/ergoplatform/apis/ergo-node-api.md) · [All operations](https://skmtc.dev/ergoplatform/apis/ergo-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ergoplatform/ergo-node-api/revisions/a731602272c6/schema)
