القائمة

apiMyInsights

استعلاميتطلب مفتاحًا

Shop API: the dashboard overview (sales, orders to pack, returns, low stock, top products…) over days (7–90, default 14) plus listing states and webhook health.

الوسائط

الاسمالنوعالوصف
daysInt

يُرجع

ApiInsightsView!

مثال

GraphQL
query ApiMyInsights($days: Int) {
  apiMyInsights(days: $days) {
    dashboard {
      days
      generatedAt
      inTransitCount
      legacyOrdersPeriod
      legacySalesPeriodMillimes
      lowStockCount
      ordersPeriod
      ordersPreviousPeriod
      ordersToday
      pausedOffers
      pendingReturns
      productsInReview
      readyCount
      salesPeriodMillimes
      salesPreviousPeriodMillimes
      salesTodayMillimes
      salesYesterdayMillimes
      toPackCount
    }
    generatedAt
    listingsByState {
      count
      state
    }
    pendingBatches
    webhooks {
      connectionId
      consecutiveFailures
      createdAt
      disabledAt
      events
      failingSince
      id
      lastDeliveryAt
      lastHttpStatus
      status
      url
    }
  }
}
curl
curl -sS https://api.wamia.tn/connect/graphql \
  -H 'content-type: application/json' \
  -H 'x-api-key: wamia_…' \
  -H 'user-agent: my-integration/1.0.0 (+https://shop.example.tn)' \
  -H 'wamia-idempotency-key: 6f0e1a2b-…' \
  --data '{"query":"query ApiMyInsights($days: Int) { apiMyInsights(days: $days) { dashboard { days generatedAt inTransitCount legacyOrdersPeriod legacySalesPeriodMillimes lowStockCount ordersPeriod ordersPreviousPeriod ordersToday pausedOffers pendingReturns productsInReview readyCount salesPeriodMillimes salesPreviousPeriodMillimes salesTodayMillimes salesYesterdayMillimes toPackCount } generatedAt listingsByState { count state } pendingBatches webhooks { connectionId consecutiveFailures createdAt disabledAt events failingSince id lastDeliveryAt lastHttpStatus status url } } }"}'