MISSINdevelopersLog in

API reference

SetPlacementTargets

Replace the products and collections a discount placement targets. Write access, discounts toolset, MCP tool set_placement_targets.

Access: Write

Variables

VariableTypeRequiredAcceptsDescription
inputSetPlacementTargetsInput!yesInput object, below

Input types

SetPlacementTargetsInput

FieldTypeRequiredAcceptsDescription
connectionIdUUID!yesMust name the placement's own connection — the one its targets narrow.
placementIdUUID!yes
targets[PlacementTargetBindInput!]!yesInput object, below. at most 1000 itemsReplaces the placement's set wholesale. Empty means whole-store.

PlacementTargetBindInput

FieldTypeRequiredAcceptsDescription
externalIdString!yes1 to 512 charactersThe provider's own id for the object, in its own namespace.
snapshotJSONnoObject, fields belowTitle/price captured at bind time, so a chip renders without a live API call.
targetTypePlacementTargetType!yesOne of COLLECTION, PRICE, PRODUCT
valueAmountFloatno0 to 5000Amount in this connection's currency. Null inherits the discount's declared value.

PlacementTargetBindInput.snapshot

FieldTypeRequiredAcceptsDescription
titlestringyesat most 512 characters
subtitlestringnoat most 512 characters
amountnumberno
currencyCodestringnoexactly 3 characters

Call it

bash
curl https://api.missin.co.uk/graphql/v1 \
  -H "Authorization: Bearer $MISSIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operationName":"SetPlacementTargets","variables":{"input":{"connectionId":"00000000-0000-0000-0000-000000000000","placementId":"00000000-0000-0000-0000-000000000000","targets":[]}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"fac7d43d643abcc132fda548aaefb1d44dfd38c87d65ffa5a313d2643e257a9d"}}}'

Document

graphql
mutation SetPlacementTargets($input: SetPlacementTargetsInput!) { __typename setPlacementTargets(input: $input) { __typename placementId targetCount userErrors { __typename code field message } } }

For AI agents: a markdown index of this site is at /llms.txt, and every page is available as markdown by adding .md to its URL.