Upload and Update Assets

What you’ll build

A one-way (initial, then occasional update) sync that creates a multi-level asset hierarchy in remberg and keeps core master data up to date.

Typical source: Excel/CSV export or ERP. Typical target structure: Produktionsbereich → Linie → Equipment

Mental model: remberg assets form a tree. Each asset is a node. You build nesting by sending a parent reference. Everything in remberg (Equipment, Locations, Storages, ...) is an asset.


📘

Most customers import assets once or in longer period via CSV instead of using the API.

Related endpoints

  • POST /v2/assets/types
  • GET /v2/assets/types/label/{label} (or list types, if you need discovery)
  • POST /v2/assets
  • GET /v2/assets/number/{assetNumber}
  • PATCH /v2/assets/number/{assetNumber}
  • GET /v2/assets (filter by parentAssetNumber, assetTypeLabel, updatedAtFrom)


Step 0: Decide your “safe defaults”

Because you rarely store remberg UUIDs, use assetNumber as your stable key and prefer all byNumber / number-based endpoints unless you can store our reference as well.

Consider:

  • assetNumber = your stable external key (SAP technische Platz-ID, Seriennummer, ERP-Schlüssel).
  • Keep AssetTypes coarse-grained (“CNC-Maschine”, “Linie”, “Lagerort”, “Gruppe”) — don’t create a type per individual asset.
  • Treat the source hierarchy as authoritative for new assets and name/type updates.
  • Don’t delete assets in sync runs as this might remove references in remberg that you'r users rely on. Instead, set the status to "Inactive".


Step 1: Asset types once (import or create)

Goal: have a small, stable set of AssetTypes available before you sync assets.

Most customers do this once:

  1. Import AssetTypes via CSV or create them manually in the UI.
  2. Use coarse categories as templates (per tenant unique labels), for example:
    • Produktionsbereich
    • Linie
    • CNC-Maschine
    • Lagerort
    • Gruppe / Sammeltyp

Keep the set small. AssetTypes are not individual assets — they are reusable templates for shared properties of assets. .

Done when:

  • every category you need exists as an AssetTypeLabel in remberg
  • you don’t expect to create more types during normal sync runs

Step 2: Create assets (parents first, then children)

Goal: mirror your source hierarchy into remberg using assetNumber + parentAssetNumber.

Important: Parents must exist before children. Creating a child that references a missing parent will fail so you need to orchestrate the order correctly.

Recommended flow:

  1. Read assets from your source and split them into levels:
    • Level 1: roots
    • Level 2: Items within.
  2. For each level top-down:
    • For every asset, resolve by assetNumber.
    • If missing → create it.
    • If present → update it (Step 3).

Creation needs only a few fields:

  • assetNumber – your stable external key (SAP, ERP, Excel ID)
  • name – display name
  • assetTypeLabel – map from your internal type key
  • parentAssetNumber – empty for roots, otherwise the parent’s number
  • plus any master data you already have and want to sync (manufacturer, model, serial, location, …)

Done when:

  • all roots exist
  • children show under the correct parent
  • your sync can be re-run without duplicates

Step 3: Upsert master data on later runs

Goal: on repeat runs, change only what changed.

Flow per asset:

  1. Resolve by assetNumber.
  2. If missing → create (Step 2).
  3. If present → patch deltas only:
    • name
    • assetTypeLabel (rare change, but supported)
    • your chosen master fields
    • optionally parentAssetNumber if you want hierarchy corrections

Guidelines:

  • Patch only stable fields you own in the source of truth.
  • Don’t delete assets automatically. If needed, set status to “Inactive”.

Done when:

  • repeat runs send only deltas
  • no duplicates are created
  • updated assets reflect your source values

(Brief) Files on assets

Files are synced separately via the Files API.

Typical pattern:

  1. Upload files to folders using the files endpoints.
  2. Reference the target context by:
    • assetNumber (preferred), or
    • assetTypeLabel if you want to attach to all assets of a type.

Summary checklist

You’re done when:

  • AssetTypes exist once, coarse and stable.
  • Assets are created top-down using parentAssetNumber.
  • Every run uses assetNumber as the externalReference.
  • Later runs follow resolve → patch deltas → create if missing.
  • Sync respects ~5 req/s and retries safely.