---
title: "Import trade-ins by product IDs"
method: POST
path: "/ops/trade-ins/ingest-by-product-ids"
tags: ["ops", "ops-trade-ins"]
---

# Import trade-ins by product IDs

`POST /ops/trade-ins/ingest-by-product-ids`

## Request

- Base URL: `https://api.topi-staging.eu`
- URL: `https://api.topi-staging.eu/ops/trade-ins/ingest-by-product-ids`
- Auth: OAuth 2
  - Authorization code: `/oauth2/authorize`
  - Token URL: `/oauth2/token` scopes: `ops-trade-in:edit`

Ingest by product IDs from a CSV file

## Request body

- IngestByProductIDsPayload: Payload ingesting trade in product IDs
  - `csv_import` string, required: Base64 encoded CSV containing asset IDs and trade in product IDs
  - `provider_id` string, required: Trade-in provider ID

## Response `200`

OK response.

- IngestByProductIDsResult
  - `failed_count` integer, required: how many items are failed to ingest
  - `failed_items` UnsuccessfulProductIDIngestion[], required: A list of failed product ID ingestions
    - `line_number` integer, required: The line number of the CSV where it has failed
    - `reason` string, required: The reason why it has failed
  - `skipped_count` integer, required: how many items are skipped to ingest
  - `skipped_items` UnsuccessfulProductIDIngestion[], required: A list of skipped product ID ingestions
    - `line_number` integer, required: The line number of the CSV where it has failed
    - `reason` string, required: The reason why it has failed
  - `succeeded_count` integer, required: how many items are successfully ingested
  - `total_count` integer, required: how many items are in the CSV

## Changes

- **2026-10-27** `ac6979514123`: 1 info
  - api operation id `Trade in.ingestByProductIDs` removed and replaced with `Trade in#ingestByProductIDs`
- **2026-10-26** `7ff7ee94b30e`: 2 info
  - api operation id `Trade in#ingestByProductIDs` removed and replaced with `Trade in.ingestByProductIDs`
  - api tag `ops-trade-ins` added

[Operation history](https://skmtc.dev/topi/apis/topi-public-api/changes/ops/trade-ins/ingest-by-product-ids/post.md)

---

[API](https://skmtc.dev/topi/apis/topi-public-api.md) - [All operations](https://skmtc.dev/topi/apis/topi-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/topi/apis/topi-public-api/revisions/09f585e29aa8?raw)
