Open Inventory / Docs
EndpunkteData exchangeResourcesImport

Import inventory items from UTF-8 CSV

Die API läuft auf deiner Anwendungsinstanz. Schemas und Feldnamen stammen unverändert aus der OpenAPI-Spezifikation. Browsergebundene Aufrufe benötigen eine Sitzung auf der Instanz.

POST
/resources/import

Creates up to 1,000 items from a raw CSV body of at most 5 MB. Rows are validated independently, existing items are never overwritten, and structured fields may contain JSON. The same Idempotency-Key and identical file can be retried safely.

Authentifizierung

bearerAuth
headerAuthentifizierungBearer <inv_ token>

Header-Parameter

Idempotency-Key*string

UUID identifying this atomic operation; reuse it only to retry the exact same request.

Formatuuid
X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Anfrageinhalt

body*file

UTF-8 CSV with a required name header. See CsvImportResponse for row-level outcomes.

Formatbinary

Antwortinhalt

Every row replayed from an earlier identical import

application/json
  1. response
importId*string

The request Idempotency-Key.

Formatuuid
summary*
rows*array<>
Einträge1 <= items <= 1000
Beispielanfrage
curl -X POST 'https://inventory.example.com/api/v1/resources/import' \  -H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08'
Beispielantwort
{  "importId": "84402506-7f34-4409-8ec1-a4e0ffb6b608",  "summary": {    "total": 1,    "created": 0,    "replayed": 0,    "failed": 0  },  "rows": [    {      "line": 2,      "status": "created",      "resource": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "sku": "string"      },      "error": "string",      "details": [        "string"      ]    }  ]}