Skip to content

Request Builders (Canonical)

Use these canonical request builder patterns to assemble HTTP calls for each service. They show where fields go (headers vs body vs query) and the minimum base headers to include. For the full endpoint catalog, see each service’s Surfaces page.

Global rules

  • Use the custom domain: https://api.g3nretailstack.com/<service>/....
  • GET: parameters go in the query string; no JSON bodies on GET.
  • POST: parameters go in the JSON body; auth/tenancy stays in headers for org-scoped services (body auth accepted only where documented). Exceptions: USM and UTL require body auth.
  • Treat session_guid and x-api-key as secrets (never put them in URLs or logs).
  • For SDK-style normalization, see /common/client-shim.html.
  • Retry guidance (endpoint class): read/list/resolve calls are safe to retry with identical inputs (including POST reads); write/mutation calls should only be retried with idempotency keys or expected_revision.

UAS (Public API: /uas/stat)

Method posture: POST only.

Headers (canonical)

bash
-H "content-type: application/json"
-H "x-cccode: $CCCODE" # optional

Body (JSON)

json
{ "email": "user@example.com", "passcode": "Abcd!234", "include_payment_history": false, "actor": "ops-user", "cccode": "ABCD-1234-EFGH" }

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/uas/stat" \
  -H "content-type: application/json" \
  -H "x-cccode: $CCCODE" \
  -d '{"email":"user@example.com","passcode":"Abcd!234","include_payment_history":false,"actor":"ops-user"}'

USM (Sessions + Service Accounts + API Keys)

Base: https://api.g3nretailstack.com/usm

Method posture: POST for all routes (including reads/lists).

Headers (canonical)

bash
-H "content-type: application/json"

Auth placement

  • session_guid lives in the JSON body for session calls.
  • api_key lives in the JSON body for API-key management.
  • Only POST /usm/api_key/validate accepts x-api-key header auth.

Template (session call)

bash
curl -sS -X POST "https://api.g3nretailstack.com/usm/session/create" \
  -H "content-type: application/json" \
  -d '{"email":"user@example.com","passcode":"Abcd!234","caption":"cli","session_label":"cli"}'

OFM (Org + Facilities + Members + Sales Channels)

Base: https://api.g3nretailstack.com/ofm

Method posture: OFM uses POST for reads/lists/resolves and writes.

Headers (canonical)

bash
-H "content-type: application/json"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"

Body placement

  • Org identity lives in the JSON body (org_guid, orgcode, logical_guid), depending on the endpoint.
  • Body session_guid / api_key is accepted for compatibility, but headers are canonical.

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/ofm/org/get" \
  -H "content-type: application/json" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"org_guid":"ORG_GUID"}'

MRS (Metadata + Payload Storage)

Base: https://api.g3nretailstack.com/mrs

Auth: x-session-guid (human session) or x-api-key (service account).

Headers (canonical)

bash
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"

Field placement

  • GET: orgcode, container, and selectors go in the query string.
  • POST: parameters go in the JSON body.

GET template

bash
curl -sS -G "https://api.g3nretailstack.com/mrs/record/meta" \
  -H "x-session-guid: $SESSION_GUID" \
  --data-urlencode "orgcode=$ORGCODE" \
  --data-urlencode "container=demo" \
  --data-urlencode "record_id=rec-1"

POST template

bash
curl -sS -X POST "https://api.g3nretailstack.com/mrs/record" \
  -H "content-type: application/json" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"orgcode":"'$ORGCODE'","container":"demo","content_type":"application/json","payload":{"hello":"world"}}'

PVM (Product/Vendor Modeling)

Base: https://api.g3nretailstack.com/pvm

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "content-type: application/json"

Field placement

  • GET: query string (orgcode can be header or query; header is canonical).
  • POST: JSON body (session_guid / api_key accepted in body for compatibility; headers are canonical).

GET template

bash
curl -sS -G "https://api.g3nretailstack.com/pvm/style/get" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  --data-urlencode "style_id=STYLE_ID"

POST template

bash
curl -sS -X POST "https://api.g3nretailstack.com/pvm/style" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"code":"STYLE1","category_id":"CAT_ID","vendor_ids":["V1"],"manufacturer_ids":["M1"],"vendor_primary":"V1","manufacturer_primary":"M1"}'

PMC (Publishing Control Plane)

Base: https://api.g3nretailstack.com/pmc

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "x-cccode: $CCCODE" # optional
-H "content-type: application/json"

Field placement

  • GET: query string; auth/tenancy in headers.
  • POST: JSON body; auth/tenancy in headers (body auth accepted for convenience).

GET template

bash
curl -sS -G "https://api.g3nretailstack.com/pmc/product/get" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  --data-urlencode "variant_id=VARIANT_ID" \
  --data-urlencode "channel_guid=CHANNEL_GUID"

POST template

bash
curl -sS -X POST "https://api.g3nretailstack.com/pmc/publish/run/start" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"style_id":"STYLE_ID","variant_id":"VARIANT_ID","channel_guid":"CHANNEL_GUID","reason":"initial publish"}'

ICS (Inventory Control)

Base: https://api.g3nretailstack.com/ics

Method posture: POST for all routes (including reads/lists). GET on /ics/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "x-logical-guid: $LOGICAL_GUID"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/ics/stock/get" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -H "x-logical-guid: $LOGICAL_GUID" \
  -d '{"variant_id":"VARIANT_ID"}'

PPM (Pricing & Promotions)

Base: https://api.g3nretailstack.com/ppm

Method posture: POST for all routes. GET on /ppm/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "x-logical-guid: $LOGICAL_GUID"
-H "x-channel-code: $CHANNEL_CODE"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/ppm/price/get" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -H "x-logical-guid: $LOGICAL_GUID" \
  -d '{"variant_id":"VARIANT_ID"}'

SCM (Sales Cycle Management)

Base: https://api.g3nretailstack.com/scm

Method posture: POST for all routes. GET on /scm/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "x-logical-guid: $LOGICAL_GUID"
-H "x-channel-code: $CHANNEL_CODE"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/scm/order/create" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -H "x-logical-guid: $LOGICAL_GUID" \
  -H "x-channel-code: $CHANNEL_CODE" \
  -d '{"order":{"lines":[]},"reason":"new order","source_refs":[{"kind":"pos","id":"TXN-001"}]}'

PCM (Procurement Cycle Management)

Base: https://api.g3nretailstack.com/pcm

Method posture: POST for all routes. GET on /pcm/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "x-logical-guid: $LOGICAL_GUID"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/pcm/po/create" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -H "x-logical-guid: $LOGICAL_GUID" \
  -d '{"po":{"vendor_ref":"V1","lines":[]},"reason":"restock","source_refs":[{"kind":"planner","id":"PLN-001"}]}'

CRM (Customer Relationship & Loyalty)

Base: https://api.g3nretailstack.com/crm

Method posture: POST for all routes. GET on /crm/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/crm/customer/create" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"customer":{"display_name":"Jane Doe","primary_email":"jane@example.com"},"reason":"walk-in","source_refs":[{"kind":"pos","id":"TXN-001"}]}'

Influencer (Influencer & Referral Earnings)

Base: https://api.g3nretailstack.com/influencer

Method posture: POST for all routes. GET on /influencer/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/influencer/campaign/create" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"campaign":{"name":"Summer 2026"},"reason":"seasonal launch","source_refs":[{"kind":"marketing","id":"MKT-001"}]}'

Accounting (Accounting & ERP Integration)

Base: https://api.g3nretailstack.com/accounting

Method posture: POST for all routes. GET on /accounting/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/accounting/event/record" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"event_type":"sale","occurred_at":"2026-01-15T12:00:00Z","amount":{"currency":"USD","amount":49.99},"reason":"daily close","source_refs":[{"kind":"pos","id":"TXN-001"}]}'

IPM (Integration Plane Management)

Base: https://api.g3nretailstack.com/ipm

Method posture: POST for all routes. GET on /ipm/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/ipm/webhook/create" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"url":"https://hooks.example.com/g3n","event_filters":[{"service":"pvm","actions":["variant-updated"]}],"reason":"sync","source_refs":[{"kind":"integration","id":"INT-001"}]}'

RBS (Retail Bus Service)

Base: https://api.g3nretailstack.com/rbs

Method posture: POST for all routes. GET on /rbs/stat only.

Headers (canonical)

bash
-H "x-orgcode: $ORGCODE"
-H "x-session-guid: $SESSION_GUID" # or: -H "x-api-key: $API_KEY"
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/rbs/subscription/register" \
  -H "content-type: application/json" \
  -H "x-orgcode: $ORGCODE" \
  -H "x-session-guid: $SESSION_GUID" \
  -d '{"queue_url":"https://sqs.us-east-1.amazonaws.com/123456789012/my-queue","auth_mode":"assume_role","role_arn":"arn:aws:iam::123456789012:role/rbs-consumer","external_id":"EXT-001","reason":"event sync","source_refs":[{"kind":"ops","id":"OPS-001"}]}'

UTL (Utility Service)

Base: https://api.g3nretailstack.com/utl

Method posture: POST for all routes. GET on /utl/stat only.

Auth placement: session_guid and orgcode live in the JSON body (not headers).

Headers (canonical)

bash
-H "content-type: application/json"

Template

bash
curl -sS -X POST "https://api.g3nretailstack.com/utl/export/request" \
  -H "content-type: application/json" \
  -d '{"session_guid":"'$SESSION_GUID'","orgcode":"'$ORGCODE'","reason":"quarterly data export"}'