AlmondTill/G3N API

On this page

publishStorefront

mutation · in the family Storefront

What it does

Take a draft storefront live — the whole configuration is re-checked and the custom web address (if set) is claimed.

Publish a DRAFT Storefront: THE INVALID_CONFIG GATE re-validates the WHOLE config record-aware (selling LF ACTIVE · theme ∈ the roster · collections ACTIVE · division ACTIVE + channel-kind · category ACTIVE — VALIDATION/INVALID naming the miss) AND the custom domain (when set) CLAIMS its GLOBAL uniqueness marker in the SAME transaction — CONFLICT/IDENTITY_TAKEN if another published site holds the name (cross-tenant blind: the refusal names nothing foreign). v1 provisions NO serving infrastructure (the map — this record is the control plane). Requires the unrestricted capability + the record's CURRENT revision.

Careful

Refused if any referenced piece is missing or inactive, or if another live storefront already holds that web address.

Who may call it

Capability area: System and integration setup — Registers, connections and the settings your systems run on.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
reasonStringnoNo further notes.

Returns

Storefront Storefront! — A Storefront — the ecom DTC PUBLISH-CONFIG document: which selling facility the site sells from, which canned theme renders it, which collections it merchandises, which browse tree and channel division frame it, and (optionally) the custom domain it claims. The lifecycle: born draft (claiming nothing) → publish (THE INVALID_CONFIG GATE re-validates every ref record-aware + the GLOBAL domain marker claims in the SAME transaction — CONFLICT/IDENTITY_TAKEN if another published site holds the name) → unpublish (the marker releases) → republish (the SAME gate + re-claim). published NEVER dooms — unpublish first (the FSM forbids the edge). THE SERVING ESTATE IS DELIBERATELY ABSENT v1 (the map): publish flips state, claims the domain, validates config — it provisions NOTHING; this record is the control plane the DTC workstream will consume. SEO copy rides the Decoration attachment, never fields here.

Example request

mutation ExamplePublishStorefront($id: ID!, $revision: ID!, $reason: String) {
  publishStorefront(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    logicalFacilityId
    theme
    customDomain
    collectionIds
    categoryId
    divisionId
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

{
  "data": {
    "publishStorefront": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "SF-EXMP-0000-000F",
      "type": "Storefront",
      "caption": "Blue jeans",
      "status": "draft",
      "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",
      "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
      "theme": "<theme>",
      "customDomain": "<custom domain>",
      "collectionIds": [
        "01900000-0000-7000-8000-b1c179550000"
      ],
      "categoryId": "01900000-0000-7000-8000-786111a40000",
      "divisionId": "01900000-0000-7000-8000-25bd925b0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in