AlmondTill/G3N API

createOrgStyle

mutation · in the family Org style

What it does

Create a new your organization’s enablement of a shared style — selling it locally at your organization.

Create an OrgStyle selection — the per-org enablement of a group Style; 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
inputNewOrgStyleInput NewOrgStyleInput!yesCreate-input for an OrgStyle selection.

Returns

OrgStyle OrgStyle! — An OrgStyle selection — the per-org enablement of a group Style: selection strictly required before the org ranges/sells it. Parent = the organization (not the family root). NO domain payload (per-org assortment/pricing enrichments arrive additively at their own slices). Freely deactivatable/doomable; a NON-doomed selection blocks the master Style doom only. Creating one is floor-gated: the org must have a defaultCurrency and every non-doomed Product of the style must price it.

Example request

graphql
mutation ExampleCreateOrgStyle($input: NewOrgStyleInput!) {
  createOrgStyle(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    styleId
    code
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "organizationId": "01900000-0000-7000-8000-1971e30a0000",
    "styleId": "01900000-0000-7000-8000-5467ec760000"
  }
}

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

Example response

json
{
  "data": {
    "createOrgStyle": {
      "id": "01900000-0000-7000-8000-7793e9ca0000",
      "sysId": "EY-EXMP-0000-000F",
      "type": "OrgStyle",
      "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",
      "styleId": "01900000-0000-7000-8000-5467ec760000",
      "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