VTEX B2B GraphQL icon

VTEX B2B GraphQL

Interact with VTEX B2B Organizations GraphQL API

Actions15

Organization → Update

AI-generated

Summary

Update an organization via a GraphQL mutation.

Inputs

  • organizationId (required) — The ID of the organization to update.
  • customQuery — Custom GraphQL mutation to perform the update; leave empty to use the default template.
  • variables — Variables for the mutation, supplied as a JSON object.

Output shape

a single organization record (e.g., id, status, href)

Returns the updated organization's fields; error handling follows GraphQL response.

Examples

Example 1: Update organization name and status

organizationId: '123', customQuery: 'mutation { updateOrganization(id: $id, input: { name: $name, status: $status }) { id status } }', variables: {"id":"123","name":"Acme","status":"active"}'

Example 2: Update organization with default template

organizationId: '456', customQuery: '', variables: '{}'

Example 3: Update organization with custom mutation and variables

organizationId: '789', customQuery: 'mutation updateOrganization($id: ID!, $input: OrganizationInput!) { updateOrganization(id: $id, input: $input) { id href } }', variables: {"id":"789","input":{"name":"New Name"}}'

Discussion