Menu

apiUpsertOffers

MutationClé requise

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.

Arguments

NomTypeDescription
idempotencyKeyString!requis
items[ApiOfferItemInput!]!requis

Retourne

ApiBatchResultView!

Exemple

GraphQL
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
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 } }"}'