Zum Hauptinhalt springen
- Schnellstart

API-Schnellstart

Führen Sie den kleinsten nützlichen Workflow aus: Bestätigen Sie Ihren Token, importieren Sie ein Asset, ordnen Sie es einem Shopify-Produkt zu und weisen Sie einer bestehenden Bestellung Downloads zu.

1. Basis-URL und Token festlegen

export ALVA_API_BASE="https://<app-host>/api/v1"
export ALVA_API_TOKEN="adk_live_<keyId>_<secret>"

2. Authentifizierung bestätigen

curl "$ALVA_API_BASE/ping" \
  -H "Authorization: Bearer $ALVA_API_TOKEN"

Ein erfolgreicher Ping bestätigt, dass sich der Token für den freigegebenen Shop authentifizieren kann.

3. Ein Asset von einer Remote-URL importieren

curl -X POST "$ALVA_API_BASE/assets" \
  -H "Authorization: Bearer $ALVA_API_TOKEN" \
  -H "Idempotency-Key: asset-$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "source_url": "https://storage.example.com/products/video.mp4",
    "filename": "video.mp4",
    "content_type": "video/mp4",
    "title": "Video lesson"
  }'

4. Den Ingest-Job abfragen

curl "$ALVA_API_BASE/jobs/<job_id>" \
  -H "Authorization: Bearer $ALVA_API_TOKEN"

5. Die Datei einem Shopify-Produkt zuordnen

curl -X POST "$ALVA_API_BASE/mappings" \
  -H "Authorization: Bearer $ALVA_API_TOKEN" \
  -H "Idempotency-Key: mapping-$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "shopify_product_id": "gid://shopify/Product/1234567890",
    "shopify_variant_ids": [],
    "file_ids": [123],
    "pack_ids": [],
    "link_ids": [],
    "license_key_tag_ids": [],
    "download_type": "ZIP",
    "is_active": true
  }'

6. Einer Bestellung Downloads zuweisen

curl -X POST "$ALVA_API_BASE/orders/5501234567890/assignments" \
  -H "Authorization: Bearer $ALVA_API_TOKEN" \
  -H "Idempotency-Key: assign-$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "shopify_customer_id": "777888999",
    "items": [
      { "shopify_product_id": "gid://shopify/Product/1234567890" }
    ],
    "send_email": false,
    "fraud_check": false
  }'

API-Dokumentation

War das hilfreich?

Immer noch nicht weiter? Schreiben Sie an admin@alvaapps.com.

Zuletzt aktualisiert 2026-06-05