# updateOrganization

mutation · in the family [Organization structure](/reference/organization-structure/)

## What it does

Edit an organization — one store or business unit in your group — change its details.

Edit an Organization's mutable attributes. Requires the unrestricted capability + the record's CURRENT revision. A primaryPhysicalFacility re-designation is guarded (in-tenant + belongs-to-this-org + active) and implicitly releases the old designation.

## Careful

Edits take effect immediately and write a new revision; the old revision stays in history.

## Who may call it

Capability area: **Organization structure** — Opening and closing organizations and facilities — the legal and physical structure of your group.

- Owner
- System Administrator
- An API key whose scope allows `api:updateOrganization`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | yes | The id of the record. |
| `revision` | [ID](/types/#scalars) `ID!` | yes | The revision id you read on the record; the change is refused if an edit landed in the meantime. |
| `input` | [EditOrganizationInput](/types/EditOrganizationInput/) `EditOrganizationInput!` | yes | No further notes. |

## Returns

[Organization](/types/Organization/) `Organization!` — An organization — THE CONTAINER: a merchant's operating organization within its org group.

## Example request

```graphql
mutation ExampleUpdateOrganization($id: ID!, $revision: ID!, $input: EditOrganizationInput!) {
  updateOrganization(id: $id, revision: $revision, input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    jurisdiction
    code
    legalName
    brandName
    operatingAsName
    owners
    costCentre
    primaryPhysicalFacility
    defaultCurrency
    stripeAccountRef
    stripeChargesEnabled
    stripeDetailsSubmitted
  }
}
```

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": {
    "updateOrganization": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "OR-EXMP-0000-000F",
      "type": "Organization",
      "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",
      "jurisdiction": "<jurisdiction>",
      "code": "BJ-001",
      "legalName": "Blue jeans",
      "brandName": "Blue jeans",
      "operatingAsName": "Blue jeans",
      "owners": [
        "01900000-0000-7000-8000-f89daae50000"
      ],
      "costCentre": "<cost centre>",
      "primaryPhysicalFacility": "01900000-0000-7000-8000-925e35910000",
      "defaultCurrency": "<default currency>",
      "stripeAccountRef": "<stripe account ref>",
      "stripeChargesEnabled": true,
      "stripeDetailsSubmitted": true
    }
  },
  "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/))

## Used in

- [Fix the business details](/use-cases/fix-business-details/)
