# updateRegistryItem

mutation · in the family [Selling](/reference/selling/)

## What it does

Change a registry item — usually the wanted quantity.

STAFF: edit ONE item row (desiredQty/priority/note — MUTABLE under the row's OCC): variantId never moves (the membership identity — remove + re-add). The registry must be ACTIVE (ruling); a doomed row refuses CONFLICT/IMMUTABLE. Requires the unrestricted capability. Template class (hand-derived v22).

## Who may call it

Capability area: **Selling** — Ringing sales, serving customers and issuing invoices.

- Owner
- Manager
- Associate Manager
- Sales Associate
- An API key whose scope allows `api:updateRegistryItem`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `input` | [EditRegistryItemInput](/types/EditRegistryItemInput/) `EditRegistryItemInput!` | yes | No further notes. |

## Returns

[RegistryItem](/types/RegistryItem/) `RegistryItem!` — One desired variant on a GiftRegistry. variantId is the membership identity (IMMUTABLE — remove + re-add instead); REMOVE = doom, history preserved (re-adding TAKES OVER the doomed marker — ruling).

## Example request

```graphql
mutation ExampleUpdateRegistryItem($input: EditRegistryItemInput!) {
  updateRegistryItem(input: $input) {
    id
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    variantId
    desiredQty
    priority
    note
  }
}
```

Variables:

```json
{
  "input": {
    "registryId": "01900000-0000-7000-8000-5a9f6ff30000",
    "itemId": "01900000-0000-7000-8000-140bfb5b0000",
    "desiredQty": 1
  }
}
```

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

## Example response

```json
{
  "data": {
    "updateRegistryItem": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "type": "<type>",
      "caption": "Blue jeans",
      "status": "<status>",
      "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",
      "variantId": "01900000-0000-7000-8000-8415e73b0000",
      "desiredQty": 1,
      "priority": "<priority>",
      "note": "Restock before the weekend."
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
- `CONFLICT/*` — The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. ([CONFLICT](/errors/CONFLICT/))
- `VALIDATION/VERSION_REQUIRED` — The request did not say which app version it came from. ([VALIDATION](/errors/VALIDATION/))
