AlmondTill/G3N API

createOrgBrand

mutation · in the family Org brand

What it does

Create a new your organization’s enablement of a shared brand — switching it on locally at your organization.

Create an OrgBrand selection — the per-org enablement of a group Brand; requires the unrestricted capability.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Catalog structure — Creating and retiring catalog families and whole items.

Roles that may call it:

Arguments

NameTypeRequiredNotes
inputNewOrgBrandInput NewOrgBrandInput!yesCreate-input for an OrgBrand selection.

Returns

OrgBrand OrgBrand! — An OrgBrand selection — the per-org enablement of a group Brand (the strict-selection pattern: no org-scoped Brand reference without an active selection). Parent = the organization (not the family root). Freely deactivatable/doomable; a NON-doomed selection blocks the master Brand doom only.

Example request

graphql
mutation ExampleCreateOrgBrand($input: NewOrgBrandInput!) {
  createOrgBrand(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    brandId
    code
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "organizationId": "01900000-0000-7000-8000-1971e30a0000",
    "brandId": "01900000-0000-7000-8000-6d1c7e960000"
  }
}

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

Example response

json
{
  "data": {
    "createOrgBrand": {
      "id": "01900000-0000-7000-8000-fb04e0520000",
      "sysId": "EB-EXMP-0000-000F",
      "type": "OrgBrand",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "brandId": "01900000-0000-7000-8000-6d1c7e960000",
      "code": "BJ-001"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Dry run

Add dryRun: true to the request envelope (extensions.at) to rehearse this call: every check runs, the write is rehearsed against the current records and nothing is stored; the answer is the refusal a real call would give, or the record it would create. Every response to a rehearsal carries dryRun: true, so a rehearsed record is never mistaken for a saved one.

Used in