Katalog-API2026-11Vorschau

Produkte

Ein Angebot, das du aus einem Import gespeichert hast, mit deinem Titel, deinen Preisen und den Shops, in denen es verkauft wird.
  • Produkte werden an Shopify übertragen. Bestellungen der Marktplätze, auf denen dein Shopify-Shop verkauft, erreichen uns ebenfalls über Shopify: Einen Shop verbinden.
  • Ein WooCommerce- oder Wix-Shop behält seine eigenen Produkte und schickt seine Bestellungen mit Bestellung anlegen.

Das Product-Objekt

idstring
Beginnt mit prd_.
titlestring
Dein Titel. Der des Verkäufers bleibt am Import.
statusstring
active oder paused (von dir oder von einer Sync-Regel, wenn Kosten zu stark gestiegen sind oder der Verkäufer ausverkauft war).
sourceobject
Marktplatz, Angebotslink und Verkäufer in China.
options[]array
Optionsnamen, höchstens drei, so wie dein Shop sie zeigt.
price_range, cost_rangeobject
Deine Preise und die des Verkäufers, über alle Varianten.
channels[]array
Wo es gelistet ist: der Shop, seine eigene Produkt-ID und sein Status dort.
syncobject
Die Sync-Regel, der es folgt, und wann wir das Angebot zuletzt gelesen haben.
importstring
Der Import, aus dem es gespeichert wurde.
product
{
  "id": "prd_8f2k",
  "title": "Heavyweight Washed Hoodie",
  "status": "active",
  "source": {
    "marketplace": "weidian",
    "url": "https://weidian.com/item.html?itemID=7750970856",
    "seller": "Ruoyi Studio"
  },
  "options": ["Color", "Size"],
  "variants_count": 6,
  "price_range": {
    "min": { "amount": "49.99", "currency": "USD" },
    "max": { "amount": "54.99", "currency": "USD" }
  },
  "cost_range": {
    "min": { "amount": "38.00", "currency": "CNY" },
    "max": { "amount": "42.00", "currency": "CNY" }
  },
  "channels": [
    {
      "channel": "shopify",
      "shop": "acme-goods.myshopify.com",
      "external_id": "gid://shopify/Product/8812042",
      "status": "draft",
      "pushed_at": "2026-11-04T09:20:03Z"
    }
  ],
  "sync": {
    "rule": "rule_default",
    "last_checked_at": "2026-11-04T09:12:40Z"
  },
  "import": "imp_2c9d",
  "created_at": "2026-11-04T09:20:01Z",
  "updated_at": "2026-11-04T09:20:03Z"
}

Produkte auflisten

GET/v1/products

Deine Produkte, neueste zuerst.

Scopeproducts:read

Query-Parameter

statusstring
Optional. active oder paused.
channelstring
Optional. shopify, für die dort gelisteten.
changed_sincestring
Optional. Ein Zeitpunkt: nur Produkte, deren Kosten oder Bestand sich seitdem geändert haben.
limit, cursor
Pagination
curl "https://www.ninjabuy.com/api/v1/products?status=active&limit=2" \
  -H "Authorization: Bearer $NINJABUY_API_KEY" \
  -H "NinjaBuy-Version: 2026-11"
Response 200
HTTP/2 200 OK

{
  "data": [
    {
      "id": "prd_8f2k",
      "title": "Heavyweight Washed Hoodie",
      "status": "active",
      "variants_count": 6
    },
    {
      "id": "prd_1x0a",
      "title": "Canvas Tote",
      "status": "active",
      "variants_count": 3
    }
  ],
  "has_more": true,
  "cursor": "c_1x0a"
}

Ein Produkt abrufen

GET/v1/products/{id}

Ein Produkt mit seiner Quelle, seinen Kanälen und seinem Sync-Status. Seine Varianten haben eine eigene Route.

Scopeproducts:read

Pfadparameter

idstringerforderlich
Die ID des Produkts.

Fehler

StatusTypWann
404not-foundKein solches Produkt in diesem Konto.
curl "https://www.ninjabuy.com/api/v1/products/prd_8f2k" \
  -H "Authorization: Bearer $NINJABUY_API_KEY" \
  -H "NinjaBuy-Version: 2026-11"
Response 200
HTTP/2 200 OK

{
  "id": "prd_8f2k",
  "title": "Heavyweight Washed Hoodie",
  "status": "active",
  "source": {
    "marketplace": "weidian",
    "url": "https://weidian.com/item.html?itemID=7750970856",
    "seller": "Ruoyi Studio"
  },
  "options": ["Color", "Size"],
  "variants_count": 6,
  "price_range": {
    "min": { "amount": "49.99", "currency": "USD" },
    "max": { "amount": "54.99", "currency": "USD" }
  },
  "cost_range": {
    "min": { "amount": "38.00", "currency": "CNY" },
    "max": { "amount": "42.00", "currency": "CNY" }
  },
  "channels": [
    {
      "channel": "shopify",
      "shop": "acme-goods.myshopify.com",
      "external_id": "gid://shopify/Product/8812042",
      "status": "draft",
      "pushed_at": "2026-11-04T09:20:03Z"
    }
  ],
  "sync": {
    "rule": "rule_default",
    "last_checked_at": "2026-11-04T09:12:40Z"
  },
  "import": "imp_2c9d",
  "created_at": "2026-11-04T09:20:01Z",
  "updated_at": "2026-11-04T09:20:03Z"
}

Ein Produkt aktualisieren

PATCH/v1/products/{id}

Ändere Titel oder Beschreibung oder pausiere es und setze es fort. Schick nur, was sich ändert. Preise gelten pro Variante (Varianten); ein übertragenes Produkt bringt die Änderung bei der nächsten Übertragung in deinen Shop.

Scopeproducts:write

Pfadparameter

idstringerforderlich
Die ID des Produkts.

Body

titlestring
Optional.
descriptionstring
Optional. HTML, das dein Shop zeigt.
statusstring
Optional. active oder paused. Paused setzt den Bestand auf deinen Kanälen auf 0.
sync_rulestring
Optional. Eine Sync-Regel-ID; bei null die Standardregel.

Fehler

StatusTypWann
404not-foundKein solches Produkt in diesem Konto.
curl -X PATCH "https://www.ninjabuy.com/api/v1/products/prd_8f2k" \
  -H "Authorization: Bearer $NINJABUY_API_KEY" \
  -H "NinjaBuy-Version: 2026-11" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paused" }'
Response 200
HTTP/2 200 OK

{
  "id": "prd_8f2k",
  "title": "Heavyweight Washed Hoodie",
  "status": "paused",
  "source": {
    "marketplace": "weidian",
    "url": "https://weidian.com/item.html?itemID=7750970856",
    "seller": "Ruoyi Studio"
  },
  "options": ["Color", "Size"],
  "variants_count": 6,
  "price_range": {
    "min": { "amount": "49.99", "currency": "USD" },
    "max": { "amount": "54.99", "currency": "USD" }
  },
  "cost_range": {
    "min": { "amount": "38.00", "currency": "CNY" },
    "max": { "amount": "42.00", "currency": "CNY" }
  },
  "channels": [
    {
      "channel": "shopify",
      "shop": "acme-goods.myshopify.com",
      "external_id": "gid://shopify/Product/8812042",
      "status": "draft",
      "pushed_at": "2026-11-04T09:20:03Z"
    }
  ],
  "sync": {
    "rule": "rule_default",
    "last_checked_at": "2026-11-04T09:12:40Z"
  },
  "import": "imp_2c9d",
  "created_at": "2026-11-04T09:20:01Z",
  "updated_at": "2026-11-04T09:20:03Z"
}

An Shopify übertragen

POST/v1/products/{id}/push

Listet das Produkt in deinem verknüpften Shopify-Shop: ein Shopify-Produkt, eine Variante pro behaltener SKU, seine Fotos, jede Variante am Standort Fulfilled by NinjaBuy bevorratet, damit die Bestellungen dafür zu uns kommen.

  • Die erste Übertragung legt es als Entwurf an: Titel und Fotos stammen von einem chinesischen Marktplatz, lies sie also, bevor deine Käufer es tun, und veröffentliche dann in Shopify.
  • Erneutes Übertragen aktualisiert dasselbe Shopify-Produkt: Preise und Bestand werden neu gesetzt, entfernte Varianten werden gelöscht. Status, Titel, Beschreibung und Fotos bleiben so, wie du sie in Shopify gelassen hast, außer du schickst neue.
  • Der Bestand ist die Zahl des Verkäufers, begrenzt auf 100: Wir kaufen bei Bedarf, es ist also, wie viele Bestellungen Shopify annimmt, bevor es ausverkauft anzeigt.
  • Dein Shop muss in US$ verkaufen, da die Preise in US$ sind. Ausverkaufte Varianten werden übersprungen und in skipped[] genannt.

Scopeproducts:write

Pfadparameter

idstringerforderlich
Die ID des Produkts.

Body

shopstring
Welcher verknüpfte Shop, etwa acme-goods.myshopify.com. Nur nötig, wenn du mehrere verknüpft hast.
title, descriptionstring
Optional. Wird nur an Shopify gesendet, wenn du sie sendest.

Fehler

StatusTypWann
409no-linked-storeMit diesem Konto ist kein Shopify-Shop verknüpft, oder es sind mehrere und shop fehlt.
409store-not-readyDer Zugriff des Shops ist abgelaufen, oder unser Standort ist noch nicht eingerichtet: Öffne die NinjaBuy-App in Shopify einmal.
422store-currencyDer Shop verkauft nicht in US$.
422too-many-optionsDas Angebot hat mehr als drei Optionen; Shopify nimmt drei.
422unprocessableJede Variante ist ausverkauft, oder Shopify hat ein Feld abgelehnt; detail gibt dessen Wortlaut weiter.
curl -X POST "https://www.ninjabuy.com/api/v1/products/prd_8f2k/push" \
  -H "Authorization: Bearer $NINJABUY_API_KEY" \
  -H "NinjaBuy-Version: 2026-11" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "shop": "acme-goods.myshopify.com" }'
Response 200
HTTP/2 200 OK

{
  "channel": "shopify",
  "shop": "acme-goods.myshopify.com",
  "external_id": "gid://shopify/Product/8812042",
  "status": "draft",
  "created": true,
  "variants": 5,
  "skipped": [{ "sku": "5187209555", "reason": "sold_out" }],
  "admin_url": "https://admin.shopify.com/store/acme-goods/products/8812042"
}

Ein Produkt löschen

DELETE/v1/products/{id}

Beendet die Synchronisierung und setzt den Bestand auf deinen Kanälen auf 0; das Shopify-Produkt bleibt, damit du es archivieren kannst. Bereits aufgegebene Bestellungen werden trotzdem versendet.

Scopeproducts:write

Pfadparameter

idstringerforderlich
Die ID des Produkts.

Fehler

StatusTypWann
404not-foundKein solches Produkt in diesem Konto.
curl -X DELETE "https://www.ninjabuy.com/api/v1/products/prd_8f2k" \
  -H "Authorization: Bearer $NINJABUY_API_KEY" \
  -H "NinjaBuy-Version: 2026-11"
Response 200
HTTP/2 200 OK

{ "id": "prd_8f2k", "deleted": true }