AlmondTill/G3N API

removeSegmentMembers

mutation · in the family Pricing

What it does

Remove up to 48 shoppers from a segment in one call.

Remove up to 48 Consumers from a static segment in ONE transaction. Requires the unrestricted capability. Template class (v80).

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Pricing — Prices, price schedules, promotions, coupons and the money rules of selling.

Roles that may call it:

What happens

Deletes membership rows; absent shoppers are skipped.

Arguments

NameTypeRequiredNotes
segmentIdID ID!yes
consumerIdsID [ID!]!yes

Returns

RemoveSegmentMembersResult RemoveSegmentMembersResult! — The removeSegmentMembers result — deletes are idempotent (absent shoppers skip).

Example request

graphql
mutation ExampleRemoveSegmentMembers($segmentId: ID!, $consumerIds: [ID!]!) {
  removeSegmentMembers(segmentId: $segmentId, consumerIds: $consumerIds) {
    removed
    skippedAbsent
    memberCount
  }
}

Variables:

json
{
  "segmentId": "01900000-0000-7000-8000-50ab2f860000",
  "consumerIds": [
    "01900000-0000-7000-8000-3cbb3ce90000"
  ]
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "removeSegmentMembers": {
      "removed": 1,
      "skippedAbsent": 1,
      "memberCount": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer