القائمة

apiIngestMediaFromUrls

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

Shop API: asks Wamia to fetch up to 20 images the shop serves by https URL. Fetches run out of band (10 MB max, JPEG/PNG/WebP/GIF, one same-host redirect); poll apiMyMediaImports or read mediaState on apiMyListings. Idempotent by key.

الوسائط

الاسمالنوعالوصف
idempotencyKeyString!مطلوب
items[ApiMediaIngestItemInput!]!مطلوب

يُرجع

ApiMediaIngestResultView!

مثال

GraphQL
mutation ApiIngestMediaFromUrls($idempotencyKey: String!, $items: [ApiMediaIngestItemInput!]!) {
  apiIngestMediaFromUrls(idempotencyKey: $idempotencyKey, items: $items) {
    items {
      assetId
      attempts
      createdAt
      failureCode
      failureReason
      id
      productId
      status
      updatedAt
      url
      variantId
    }
    replayed
  }
}
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":"mutation ApiIngestMediaFromUrls($idempotencyKey: String!, $items: [ApiMediaIngestItemInput!]!) { apiIngestMediaFromUrls(idempotencyKey: $idempotencyKey, items: $items) { items { assetId attempts createdAt failureCode failureReason id productId status updatedAt url variantId } replayed } }"}'