{
  "info": {
    "name": "G3N Retail Stack - Minimum Viable Flow",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "End-to-end flow aligned to /common/minimum-viable-flow.html: login -> org setup -> product creation -> publish. Operator-only steps are included as placeholders with notes."
  },
  "variable": [
    {
      "key": "API_BASE",
      "value": "https://api.g3nretailstack.com"
    },
    {
      "key": "EMAIL",
      "value": "user@example.com"
    },
    {
      "key": "PASSCODE",
      "value": "Passw0rd!123"
    },
    {
      "key": "ORGCODE",
      "value": "ACME"
    },
    {
      "key": "INVITE_CODE",
      "value": "INV123"
    },
    {
      "key": "SESSION_GUID",
      "value": ""
    },
    {
      "key": "USER_GUID",
      "value": ""
    },
    {
      "key": "ORG_GUID",
      "value": ""
    },
    {
      "key": "ORG_REV",
      "value": ""
    },
    {
      "key": "PHYSICAL_GUID",
      "value": ""
    },
    {
      "key": "LEGAL_GUID",
      "value": ""
    },
    {
      "key": "LOGICAL_GUID",
      "value": ""
    },
    {
      "key": "CHANNEL_GUID",
      "value": ""
    },
    {
      "key": "CHANNEL_REV",
      "value": ""
    },
    {
      "key": "DIVISION_ID",
      "value": ""
    },
    {
      "key": "DIVISION_REV",
      "value": ""
    },
    {
      "key": "DEPARTMENT_ID",
      "value": ""
    },
    {
      "key": "DEPARTMENT_REV",
      "value": ""
    },
    {
      "key": "CATEGORY_ID",
      "value": ""
    },
    {
      "key": "CATEGORY_REV",
      "value": ""
    },
    {
      "key": "VENDOR_ID",
      "value": ""
    },
    {
      "key": "VENDOR_REV",
      "value": ""
    },
    {
      "key": "MANUFACTURER_ID",
      "value": ""
    },
    {
      "key": "MANUFACTURER_REV",
      "value": ""
    },
    {
      "key": "STYLE_ID",
      "value": ""
    },
    {
      "key": "STYLE_REV",
      "value": ""
    },
    {
      "key": "VARIANT_ID",
      "value": ""
    },
    {
      "key": "VARIANT_REV",
      "value": ""
    },
    {
      "key": "RUN_ID",
      "value": ""
    },
    {
      "key": "RUN_REV",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "USM - Session Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          }
        ],
        "url": "{{API_BASE}}/usm/session/create",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"email\": \"{{EMAIL}}\",\n  \"passcode\": \"{{PASSCODE}}\",\n  \"caption\": \"postman\",\n  \"session_label\": \"postman\",\n  \"reason\": \"login\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.session_guid) pm.collectionVariables.set('SESSION_GUID', data.session_guid);",
              "if (data.user_id) pm.collectionVariables.set('USER_GUID', data.user_id);"
            ]
          }
        }
      ]
    },
    {
      "name": "OFM - Org Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/ofm/org/create",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"orgcode\": \"{{ORGCODE}}\",\n  \"invitation_code\": \"{{INVITE_CODE}}\",\n  \"user_guid\": \"{{USER_GUID}}\",\n  \"caption\": \"Acme HQ\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.org_guid) pm.collectionVariables.set('ORG_GUID', data.org_guid);",
              "if (data.revision) pm.collectionVariables.set('ORG_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "OFM - Org Status Set (operator-only placeholder)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          }
        ],
        "url": "https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/ofm_orgstatusset/invocations",
        "description": "Operator-only direct Lambda (IAM/SigV4 required). This is NOT an API Gateway route. Use AWS CLI/SDK to invoke.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"org_guid\": \"{{ORG_GUID}}\",\n  \"status\": \"verified\",\n  \"expected_revision\": \"{{ORG_REV}}\",\n  \"reason\": \"onboarding\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "OFM - Facility Physical Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/ofm/facility/physical/create",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"org_guid\": \"{{ORG_GUID}}\",\n  \"code\": \"PHYS1\",\n  \"caption\": \"HQ\",\n  \"address\": {\n    \"street\": \"1 Main St\",\n    \"city\": \"Austin\",\n    \"region\": \"TX\",\n    \"country\": \"US\"\n  },\n  \"phone\": \"+1-555-0100\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.physical_guid) pm.collectionVariables.set('PHYSICAL_GUID', data.physical_guid);"
            ]
          }
        }
      ]
    },
    {
      "name": "OFM - Facility Legal Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/ofm/facility/legal/create",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"org_guid\": \"{{ORG_GUID}}\",\n  \"code\": \"LEG1\",\n  \"caption\": \"Acme LLC\",\n  \"address\": {\n    \"street\": \"1 Main St\",\n    \"city\": \"Austin\",\n    \"region\": \"TX\",\n    \"country\": \"US\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.legal_guid) pm.collectionVariables.set('LEGAL_GUID', data.legal_guid);"
            ]
          }
        }
      ]
    },
    {
      "name": "OFM - Facility Logical Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/ofm/facility/logical/create",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"org_guid\": \"{{ORG_GUID}}\",\n  \"code\": \"LOG1\",\n  \"caption\": \"Online DC\",\n  \"physical_guid\": \"{{PHYSICAL_GUID}}\",\n  \"legal_guid\": \"{{LEGAL_GUID}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.logical_guid) pm.collectionVariables.set('LOGICAL_GUID', data.logical_guid);"
            ]
          }
        }
      ]
    },
    {
      "name": "OFM - Sales Channel Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/ofm/sales-channel/create",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"org_guid\": \"{{ORG_GUID}}\",\n  \"logical_guid\": \"{{LOGICAL_GUID}}\",\n  \"channel_code\": \"WEB\",\n  \"market_code\": \"US\",\n  \"locale_codes\": [\n    \"en-US\"\n  ],\n  \"default_locale_code\": \"en-US\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.channel_guid) pm.collectionVariables.set('CHANNEL_GUID', data.channel_guid);",
              "if (data.revision) pm.collectionVariables.set('CHANNEL_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "OFM - Sales Channel Activate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/ofm/sales-channel/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"org_guid\": \"{{ORG_GUID}}\",\n  \"channel_guid\": \"{{CHANNEL_GUID}}\",\n  \"status\": \"active\",\n  \"expected_revision\": \"{{CHANNEL_REV}}\",\n  \"reason\": \"go-live\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Division Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/division",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"code\": \"DIV1\",\n  \"caption\": \"Division 1\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.division_id) pm.collectionVariables.set('DIVISION_ID', data.division_id);",
              "if (data.revision) pm.collectionVariables.set('DIVISION_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Division Activate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/division/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"division_id\": \"{{DIVISION_ID}}\",\n  \"status\": \"active\",\n  \"expected_revision\": \"{{DIVISION_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Department Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/department",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"division_id\": \"{{DIVISION_ID}}\",\n  \"code\": \"DEPT1\",\n  \"caption\": \"Department 1\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.department_id) pm.collectionVariables.set('DEPARTMENT_ID', data.department_id);",
              "if (data.revision) pm.collectionVariables.set('DEPARTMENT_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Department Activate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/department/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"department_id\": \"{{DEPARTMENT_ID}}\",\n  \"status\": \"active\",\n  \"expected_revision\": \"{{DEPARTMENT_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Category Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/category",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"department_id\": \"{{DEPARTMENT_ID}}\",\n  \"code\": \"CAT1\",\n  \"caption\": \"Category 1\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.category_id) pm.collectionVariables.set('CATEGORY_ID', data.category_id);",
              "if (data.revision) pm.collectionVariables.set('CATEGORY_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Category Activate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/category/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"category_id\": \"{{CATEGORY_ID}}\",\n  \"status\": \"active\",\n  \"expected_revision\": \"{{CATEGORY_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Vendor Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/vendor",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"code\": \"VEND1\",\n  \"caption\": \"Vendor 1\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.vendor_id) pm.collectionVariables.set('VENDOR_ID', data.vendor_id);",
              "if (data.revision) pm.collectionVariables.set('VENDOR_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Vendor Verify",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/vendor/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"vendor_id\": \"{{VENDOR_ID}}\",\n  \"status\": \"verified\",\n  \"expected_revision\": \"{{VENDOR_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Manufacturer Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/manufacturer",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"code\": \"MFG1\",\n  \"caption\": \"Manufacturer 1\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.manufacturer_id) pm.collectionVariables.set('MANUFACTURER_ID', data.manufacturer_id);",
              "if (data.revision) pm.collectionVariables.set('MANUFACTURER_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Manufacturer Verify",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/manufacturer/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"manufacturer_id\": \"{{MANUFACTURER_ID}}\",\n  \"status\": \"verified\",\n  \"expected_revision\": \"{{MANUFACTURER_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Style Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/style",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"code\": \"STYLE1\",\n  \"category_id\": \"{{CATEGORY_ID}}\",\n  \"vendor_ids\": [\n    \"{{VENDOR_ID}}\"\n  ],\n  \"manufacturer_ids\": [\n    \"{{MANUFACTURER_ID}}\"\n  ],\n  \"vendor_primary\": \"{{VENDOR_ID}}\",\n  \"manufacturer_primary\": \"{{MANUFACTURER_ID}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.style_id) pm.collectionVariables.set('STYLE_ID', data.style_id);",
              "if (data.revision) pm.collectionVariables.set('STYLE_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Style Activate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/style/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"style_id\": \"{{STYLE_ID}}\",\n  \"status\": \"active\",\n  \"expected_revision\": \"{{STYLE_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Variant Create",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/variant",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"style_id\": \"{{STYLE_ID}}\",\n  \"selections\": [],\n  \"code\": \"VAR1\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.variant_id) pm.collectionVariables.set('VARIANT_ID', data.variant_id);",
              "if (data.revision) pm.collectionVariables.set('VARIANT_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PVM - Variant Activate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/variant/status",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"style_id\": \"{{STYLE_ID}}\",\n  \"variant_id\": \"{{VARIANT_ID}}\",\n  \"status\": \"active\",\n  \"expected_revision\": \"{{VARIANT_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PVM - Identifier Add (SKU)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pvm/identifier/add",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"style_id\": \"{{STYLE_ID}}\",\n  \"variant_id\": \"{{VARIANT_ID}}\",\n  \"type\": \"sku\",\n  \"value\": \"SKU-001\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "PMC - Publish Run Start",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pmc/publish/run/start",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"style_id\": \"{{STYLE_ID}}\",\n  \"variant_id\": \"{{VARIANT_ID}}\",\n  \"channel_guid\": \"{{CHANNEL_GUID}}\",\n  \"reason\": \"initial publish\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.run_id) pm.collectionVariables.set('RUN_ID', data.run_id);",
              "if (data.revision) pm.collectionVariables.set('RUN_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PMC - Publish Run Step",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "content-type",
            "value": "application/json"
          },
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pmc/publish/run/step",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"run_id\": \"{{RUN_ID}}\",\n  \"expected_revision\": \"{{RUN_REV}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const data = (pm.response.json() || {}).data || {};",
              "if (data.revision) pm.collectionVariables.set('RUN_REV', data.revision);"
            ]
          }
        }
      ]
    },
    {
      "name": "PMC - Product Get",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-orgcode",
            "value": "{{ORGCODE}}"
          },
          {
            "key": "x-session-guid",
            "value": "{{SESSION_GUID}}"
          }
        ],
        "url": "{{API_BASE}}/pmc/product/get?variant_id={{VARIANT_ID}}&channel_guid={{CHANNEL_GUID}}"
      }
    }
  ]
}
