apiUpsertOffers
تعديليتطلب مفتاحًاShop API: price, handling time, fulfilment mode and pause for up to 200 SKUs in one call, with a per-item result. Counts against the bulk budget.
الوسائط
| الاسم | النوع | الوصف |
|---|---|---|
| idempotencyKey | String! | مطلوب |
| items | [ApiOfferItemInput!]! | مطلوب |
يُرجع
مثال
mutation ApiUpsertOffers($idempotencyKey: String!, $items: [ApiOfferItemInput!]!) {
apiUpsertOffers(idempotencyKey: $idempotencyKey, items: $items) {
applied
dryRun
failed
held
items {
error
offerId
ok
skipReason
skipped
sku
}
pendingBatchId
reason
replayed
}
}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 ApiUpsertOffers($idempotencyKey: String!, $items: [ApiOfferItemInput!]!) { apiUpsertOffers(idempotencyKey: $idempotencyKey, items: $items) { applied dryRun failed held items { error offerId ok skipReason skipped sku } pendingBatchId reason replayed } }"}'