> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fnskutoasin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Add Scan Task (per-barcode countries)

> Submit many barcodes in one request, each with its own marketplaces. Use this instead of Batch when barcodes target different marketplaces: Batch applies its single countries list to every barcode.

Submit many barcodes in one request, each with its **own** marketplaces.

<Note>
  **Batch vs. BatchV2:** **Batch Add Scan Task** applies its single `countries` list to **every** barcode in the request. Use `BatchV2` when different barcodes should be scanned in different marketplaces.
</Note>

<Warning>
  Do not repeat a country code within a barcode's `countries` (for example `["US", "US"]` or `["US", "us"]`). A request containing repeated codes is rejected and no tasks are created.
</Warning>

## Supported Marketplaces

Use these 2-letter codes in the `countries` array (multi-marketplace request) or the `X-Country-Code` header (single marketplace).

| Code | Marketplace | Code | Marketplace |
| - | - | - | - |
| AE | United Arab Emirates | UK | United Kingdom |
| IT | Italy | FR | France |
| MX | Mexico | SG | Singapore |
| IN | India | JP | Japan |
| CA | Canada | SA | Saudi Arabia |
| TR | Turkey | SE | Sweden |
| NL | Netherlands | BE | Belgium |
| ES | Spain | EG | Egypt |
| BR | Brazil | PL | Poland |
| AU | Australia | ZA | South Africa |
| DE | Germany | US | United States |

<Info>
  **Multi-marketplace requests:** pass up to **4** country codes in the `countries` array to scan across several Amazon marketplaces in one request. **Maximum 4 codes per request.**
</Info>

<Note>
  **Token cost:** a single-marketplace request (one code, or none) consumes **1 token**. A multi-marketplace request (2–4 codes) consumes **2 tokens**.
</Note>

<Note>
  If you omit the `countries` array, the request uses the marketplace from the `X-Country-Code` header. When that header is not provided, it defaults to **US**.
</Note>

### Example: one marketplace per barcode

```json theme={null}
{
  "items": [
    { "barCode": "X0012ABCDE", "countries": ["US"] },
    { "barCode": "X0034FGHIJ", "countries": ["DE"] },
    { "barCode": "X0056KLMNO", "countries": ["UK", "FR"] }
  ],
  "callBackUrl": "https://your-app.example.com/webhook"
}
```

### Example response

```json theme={null}
{
  "data": [
    { "id": 101, "barCode": "X0012ABCDE" },
    { "id": 102, "barCode": "X0034FGHIJ" },
    { "id": 103, "barCode": "X0056KLMNO" }
  ],
  "messages": [],
  "succeeded": true
}
```


## OpenAPI

````yaml post /v1/ScanTask/BatchV2
openapi: 3.0.0
info:
  title: ATO.BARCODE
  description: '<h4>Baseurl: <strong>https://ato.fnskutoasin.com</strong></h4>'
  version: 1.0.0
servers:
  - url: https://ato.fnskutoasin.com/api
security: []
paths:
  /v1/ScanTask/BatchV2:
    post:
      tags:
        - ScanTask
      summary: Batch Add Scan Task (per-barcode countries)
      description: >-
        Submit many barcodes in one request, each with its own marketplaces. Use
        this instead of Batch when barcodes target different marketplaces: Batch
        applies its single countries list to every barcode.
      operationId: ScanTask_BatchV2
      parameters:
        - name: X-Country-Code
          in: header
          description: >-
            Optional 2-letter marketplace country code (e.g. US, UK, CA).
            Defaults to US if not provided. Used when the request body does not
            specify a 'countries' array. See the Supported Marketplaces list on
            this page.
          required: false
          schema:
            type: string
            default: US
      requestBody:
        x-name: command
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchAddScanTasksV2Command'
        required: true
        x-position: 1
      responses:
        '200':
          description: Status 200 OK with the id of every newly created task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultOfListOfTaskOutput'
      security:
        - ApiKey: []
components:
  schemas:
    BatchAddScanTasksV2Command:
      type: object
      additionalProperties: false
      required:
        - items
      properties:
        items:
          type: array
          description: >-
            One entry per barcode. A barcode listed more than once is only
            processed once.
          items:
            $ref: '#/components/schemas/ScanTaskItem'
        callBackUrl:
          type: string
          nullable: true
    ResultOfListOfTaskOutput:
      allOf:
        - $ref: '#/components/schemas/Result'
        - type: object
          additionalProperties: false
          properties:
            data:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/TaskOutput'
    ScanTaskItem:
      type: object
      additionalProperties: false
      required:
        - barCode
      properties:
        barCode:
          type: string
          minLength: 1
        countries:
          type: array
          description: >-
            Marketplace country codes for this barcode only (e.g. ["US"]). Each
            barcode in the request can target different marketplaces. Do not
            repeat a code: a request containing repeated country codes is
            rejected and nothing is created. If omitted, the marketplace from
            the X-Country-Code header (default US) is used.
          maxItems: 4
          nullable: true
          items:
            type: string
            enum:
              - AE
              - IT
              - MX
              - IN
              - CA
              - TR
              - NL
              - ES
              - BR
              - AU
              - DE
              - UK
              - FR
              - SG
              - JP
              - SA
              - SE
              - BE
              - EG
              - PL
              - ZA
              - US
    Result:
      type: object
      additionalProperties: false
      properties:
        messages:
          type: array
          nullable: true
          items:
            type: string
        succeeded:
          type: boolean
    TaskOutput:
      type: object
      additionalProperties: false
      properties:
        id:
          type: integer
          format: int64
        barCode:
          type: string
          nullable: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.