# Change what an item sells for

A sale price is what the till charges for a window of time — add the new price with its dates, or edit the standing one; the old windows stay as history.

Pricing & money · a play in 2 steps.

## The steps

1. Add the new price and the window it applies in. — [createSalePrice](/reference/sale-price/createSalePrice/)
2. Edit a standing price — the change writes a new revision and the old one stays in history. — [updateSalePrice](/reference/sale-price/updateSalePrice/)

## The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

### createSalePrice

[createSalePrice](/reference/sale-price/createSalePrice/) — mutation · Create a new sale price — a time-boxed promotional price at your organization.

**Example request**

```graphql
mutation ExampleCreateSalePrice($input: NewSalePriceInput!) {
  createSalePrice(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    startAt
    endAt
    markdownPlanId
    markdownStepIndex
  }
}
```

Variables:

```json
{
  "input": {
    "caption": "Blue jeans",
    "inventoryItemId": "01900000-0000-7000-8000-9307d9650000",
    "endAt": "2027-01-31T00:00:00.000Z",
    "price": {
      "currency": "USD",
      "amount": "10.00"
    }
  }
}
```

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

**Example response**

```json
{
  "data": {
    "createSalePrice": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "SP-EXMP-0000-000F",
      "type": "SalePrice",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "startAt": "2027-01-31T00:00:00.000Z",
      "endAt": "2027-01-31T00:00:00.000Z",
      "markdownPlanId": "01900000-0000-7000-8000-7b0984720000",
      "markdownStepIndex": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### updateSalePrice

[updateSalePrice](/reference/sale-price/updateSalePrice/) — mutation · Edit a sale price — a time-boxed promotional price — change its details.

**Example request**

```graphql
mutation ExampleUpdateSalePrice($id: ID!, $revision: ID!, $input: EditSalePriceInput!) {
  updateSalePrice(id: $id, revision: $revision, input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    startAt
    endAt
    markdownPlanId
    markdownStepIndex
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "input": {
    "caption": "Blue jeans"
  }
}
```

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

**Example response**

```json
{
  "data": {
    "updateSalePrice": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "SP-EXMP-0000-000F",
      "type": "SalePrice",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "startAt": "2027-01-31T00:00:00.000Z",
      "endAt": "2027-01-31T00:00:00.000Z",
      "markdownPlanId": "01900000-0000-7000-8000-7b0984720000",
      "markdownStepIndex": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```
