# AddDiscountPlacements

> Place discount codes on a store or email connection; the codes are pushed to the provider. Write access, discounts toolset, MCP tool add_discount_placements.

**Access:** [Write](https://developer.missin.co.uk/get-started/authentication.md#access-levels)

## Variables

| Variable | Type | Required | Accepts | Description |
|---|---|---|---|---|
| `input` | `AddDiscountPlacementsInput!` | yes | Input object, below |  |

## Input types

### AddDiscountPlacementsInput

| Field | Type | Required | Accepts | Description |
|---|---|---|---|---|
| `child` | `JSON` | no | Any JSON value | The provider block keyed by the connection's slug (see PlaceDiscountCodeInput.child). |
| `connectionId` | `UUID!` | yes |  | The connection the code is put on. Whether it is pushed anywhere follows from that connection's provider. |
| `discountCodeId` | `UUID!` | yes |  |  |

## Call it

```bash curl
curl https://api.missin.co.uk/graphql/v1 \
  -H "Authorization: Bearer $MISSIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operationName":"AddDiscountPlacements","variables":{"input":{"connectionId":"00000000-0000-0000-0000-000000000000","discountCodeId":"00000000-0000-0000-0000-000000000000"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"77f75ccd5d37dddd06df340e255fec69f83305b4575ca538ccd214cd59e90d14"}}}'
```

## Document

```graphql
mutation AddDiscountPlacements($input: AddDiscountPlacementsInput!) { __typename addDiscountPlacements(input: $input) { __typename count discountCodeId placementIds userErrors { __typename code field message } } }
```

Source: https://developer.missin.co.uk/reference/discounts/add-discount-placements
