Skip to content

API Calls

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

Source of truth: /internal-docs/crm-openapi.yaml/crm/openapi.yaml

Notes: samples are schema-derived placeholders. Replace placeholder values (ORGCODE, SESSION_GUID, etc.) with real values.

Inventory

MethodPathSummaryRequest schemaResponse schema
POST/account/contact/createCreate B2B account contact (draft)AccountContactCreateRequestAccountContactEnvelope
POST/account/contact/getGet B2B account contact (draft)AccountContactGetRequestAccountContactEnvelope
POST/account/contact/listList B2B account contacts (draft)AccountContactListRequestAccountContactListEnvelope
POST/account/contact/status/setSet B2B account contact status (draft)AccountContactStatusSetRequestAccountContactEnvelope
POST/account/contact/updateUpdate B2B account contact (draft)AccountContactUpdateRequestAccountContactEnvelope
POST/account/createCreate B2B account (draft)AccountCreateRequestAccountEnvelope
POST/account/credit/consumeAtomically consume B2B account credit (M6)NoneAccountEnvelope
POST/account/credit/releaseRelease B2B account credit (M6)NoneAccountEnvelope
POST/account/getGet B2B account (draft)AccountGetRequestAccountEnvelope
POST/account/listList B2B accounts (draft)AccountListRequestAccountListEnvelope
POST/account/status/setSet B2B account status (draft)AccountStatusSetRequestAccountEnvelope
POST/account/updateUpdate B2B account (draft)AccountUpdateRequestAccountEnvelope
POST/commentAdd comment (draft)CommentAddRequestCommentEnvelope
POST/comment/getGet comment (draft)CommentGetRequestCommentEnvelope
POST/comment/listList comments (draft)CommentListRequestCommentListEnvelope
POST/comment/reportReport top-N largest comments (draft)CommentReportRequestCommentReportEnvelope
POST/comment/reviseRevise comment (draft)CommentReviseRequestCommentEnvelope
POST/comment/statusUpdate comment status (draft)CommentStatusRequestCommentEnvelope
POST/customer/anonymizeAnonymize customer PII (CCPA right-to-forget with analytics preservation)NoneCustomerEnvelope
POST/customer/consent/getGet customer consent/preferences (draft)CustomerConsentGetRequestCustomerConsentEnvelope
POST/customer/consent/setSet customer consent/preferences (draft)CustomerConsentSetRequestCustomerConsentEnvelope
POST/customer/createCreate customer (draft)CustomerCreateRequestCustomerEnvelope
POST/customer/dedupe/listList potential customer duplicates (draft)CustomerDedupeRequestCustomerDedupeEnvelope
POST/customer/deleteDelete all customer data (CCPA right-to-delete)NoneEnvelope
POST/customer/flag/listList customer fraud/abuse flags (draft)CustomerFlagListRequestCustomerFlagListEnvelope
POST/customer/flag/setSet customer fraud/abuse flag (draft)CustomerFlagSetRequestCustomerFlagEnvelope
POST/customer/fraud/assessAssess customer fraud risk (draft)CustomerFraudAssessRequestCustomerFraudAssessEnvelope
POST/customer/fraud/listList customer fraud assessments (draft)CustomerFraudListRequestCustomerFraudListEnvelope
POST/customer/getGet customer (draft)CustomerGetRequestCustomerEnvelope
POST/customer/hold/listList customer holds (draft)CustomerHoldListRequestCustomerHoldListEnvelope
POST/customer/hold/resolveResolve customer hold (draft)CustomerHoldResolveRequestCustomerHoldEnvelope
POST/customer/listList customers (draft)CustomerListRequestCustomerListEnvelope
POST/customer/mergeMerge customer into another customer (draft)CustomerMergeRequestCustomerEnvelope
POST/customer/merge/listList customer merge audit records (draft)CustomerMergeListRequestCustomerMergeListEnvelope
POST/customer/searchSearch customers (partial match)CustomerSearchRequestCustomerListEnvelope
POST/exemption/certificate/createCreate exemption certificate (draft)ExemptionCertificateCreateRequestExemptionCertificateEnvelope
POST/exemption/certificate/getGet exemption certificate (draft)ExemptionCertificateGetRequestExemptionCertificateEnvelope
POST/exemption/certificate/listList exemption certificates (draft)ExemptionCertificateListRequestExemptionCertificateListEnvelope
POST/exemption/certificate/status/setSet exemption certificate status (draft)ExemptionCertificateStatusSetRequestExemptionCertificateEnvelope
POST/giftcard/issueIssue gift card (draft)StoredValueIssueRequestStoredValueEnvelope
POST/giftcard/redeemRedeem gift card (draft)StoredValueRedeemRequestStoredValueEnvelope
POST/inbox/createCreate inbox notification (draft)InboxCreateRequestInboxEnvelope
POST/inbox/getGet inbox notification (draft)InboxGetRequestInboxEnvelope
POST/inbox/listList inbox notifications (draft)InboxListRequestInboxListEnvelope
POST/inbox/stateUpdate inbox state (draft)InboxStateRequestInboxEnvelope
POST/inbox/statusUpdate inbox status (draft)InboxStatusRequestInboxEnvelope
POST/loyalty/adjustAdjust loyalty points (draft)LoyaltyAdjustRequestLoyaltyTxnEnvelope
POST/loyalty/earnEarn loyalty points (draft)LoyaltyEarnRequestLoyaltyTxnEnvelope
POST/loyalty/expireExpire loyalty points as-of (draft)LoyaltyExpireRequestLoyaltyExpireEnvelope
POST/loyalty/policy/getGet loyalty policy (draft)LoyaltyPolicyGetRequestLoyaltyPolicyEnvelope
POST/loyalty/policy/setSet loyalty policy (draft)LoyaltyPolicySetRequestLoyaltyPolicyEnvelope
POST/loyalty/previewRead-only earn estimate using real policyLoyaltyPreviewRequestLoyaltyPreviewEnvelope
POST/loyalty/recalculateRecalculate loyalty balancesLoyaltyRecalculateRequestLoyaltyRecalculateEnvelope
POST/loyalty/redeemRedeem loyalty points (draft)LoyaltyRedeemRequestLoyaltyTxnEnvelope
POST/loyalty/restoreRestore loyalty points (draft)LoyaltyRestoreRequestLoyaltyTxnEnvelope
POST/loyalty/reverseReverse loyalty points (draft)LoyaltyReverseRequestLoyaltyTxnEnvelope
POST/retention/policy/getGet current or versioned data retention policyNoneEnvelope
POST/retention/policy/setSet data retention policy for the orgNoneEnvelope
GET/statHealth checkNoneEnvelope
POST/subscription/cancelCancel an active or paused subscriptionSubscriptionLifecycleRequestSubscriptionEnvelope
POST/subscription/createCreate a customer subscriptionSubscriptionCreateRequestSubscriptionEnvelope
POST/subscription/getGet a subscription by IDSubscriptionGetRequestSubscriptionEnvelope
POST/subscription/listList subscriptions with optional status/customer filterSubscriptionListRequestSubscriptionListEnvelope
POST/subscription/pausePause an active subscriptionSubscriptionLifecycleRequestSubscriptionEnvelope
POST/subscription/resumeResume a paused subscriptionSubscriptionLifecycleRequestSubscriptionEnvelope
POST/warranty/getGet warranty by warranty_id or serial_numberNoneWarrantyEnvelope
POST/warranty/listList warranties by status, customer_id, or serial_number (paginated)NoneWarrantyListEnvelope
POST/warranty/registerRegister a warranty linking serial to customer and termsNoneWarrantyEnvelope
POST/warranty/status/setTransition warranty status (active → expired/voided/doomed)NoneWarrantyEnvelope
POST/warranty/updateUpdate warranty terms, expiry, or customer with expected_revisionNoneWarrantyEnvelope

Call details

POST /account/contact/create

Purpose: Create B2B account contact (draft)

Notes: Create B2B account contact (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: AccountContactCreateRequest Response schema: AccountContactEnvelope

Sample request (schema-derived)

json
{
  "contact": {
    "request_context": {
      "orgcode": "ORGCODE",
      "actor": "string",
      "context_source": "session"
    },
    "reason": "example",
    "source_refs": [
      {
        "kind": null,
        "id": null
      }
    ],
    "account_guid": "string"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "contact": {
      "contact_guid": "string",
      "account_guid": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/contact/create",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/contact/get

Purpose: Get B2B account contact (draft)

Notes: Get B2B account contact (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier C (p95 150ms, p99 400ms).

Request schema: AccountContactGetRequest Response schema: AccountContactEnvelope

Sample request (schema-derived)

json
{
  "contact_guid": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "contact": {
      "contact_guid": "string",
      "account_guid": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/contact/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/contact/list

Purpose: List B2B account contacts (draft)

Notes: List B2B account contacts (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: AccountContactListRequest Response schema: AccountContactListEnvelope

Sample request (schema-derived)

json
{
  "account_guid": "string",
  "status": "active",
  "role": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "contacts": [
      {
        "contact_guid": "string",
        "account_guid": "string",
        "status": "active"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/contact/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/contact/status/set

Purpose: Set B2B account contact status (draft)

Notes: Set B2B account contact status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: AccountContactStatusSetRequest Response schema: AccountContactEnvelope

Sample request (schema-derived)

json
{
  "contact_guid": "string",
  "status": "active",
  "expected_revision": 0,
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "contact": {
      "contact_guid": "string",
      "account_guid": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/contact/status/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/contact/update

Purpose: Update B2B account contact (draft)

Notes: Update B2B account contact (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: AccountContactUpdateRequest Response schema: AccountContactEnvelope

Sample request (schema-derived)

json
{
  "contact_guid": "string",
  "expected_revision": 0,
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "contact": {
      "contact_guid": "string",
      "account_guid": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/contact/update",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/create

Purpose: Create B2B account (draft)

Notes: Create B2B account (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: AccountCreateRequest Response schema: AccountEnvelope

Sample request (schema-derived)

json
{
  "account": {
    "request_context": {
      "orgcode": "ORGCODE",
      "actor": "string",
      "context_source": "session"
    },
    "reason": "example",
    "source_refs": [
      {
        "kind": null,
        "id": null
      }
    ],
    "company_name": "string"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "account": {
      "account_guid": "string",
      "status": "active",
      "account_code": "CODE1"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/create",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/credit/consume

Purpose: Atomically consume B2B account credit (M6)

Notes: Atomically increment credit_used on a B2B account. Uses optimistic-locking via expected_revision. Returns 409 conflict if revision has changed (caller should re-read and retry). Returns 409 credit-limit-exceeded if new credit_used would exceed credit_limit. Returns 409 credit-hold if account is on hold or not active.

Request schema: None Response schema: AccountEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "account": {
      "account_guid": "string",
      "status": "active",
      "account_code": "CODE1"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/credit/consume",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/credit/release

Purpose: Release B2B account credit (M6)

Notes: Decrement credit_used on a B2B account (floor at 0). Used on order cancel to return previously consumed credit. Does not require revision check (idempotent release).

Request schema: None Response schema: AccountEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "account": {
      "account_guid": "string",
      "status": "active",
      "account_code": "CODE1"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/credit/release",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/get

Purpose: Get B2B account (draft)

Notes: Get B2B account (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier C (p95 150ms, p99 400ms).

Request schema: AccountGetRequest Response schema: AccountEnvelope

Sample request (schema-derived)

json
"value"

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "account": {
      "account_guid": "string",
      "status": "active",
      "account_code": "CODE1"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/list

Purpose: List B2B accounts (draft)

Notes: List B2B accounts (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: AccountListRequest Response schema: AccountListEnvelope

Sample request (schema-derived)

json
{
  "status": "active",
  "account_code": "CODE1",
  "q": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "accounts": [
      {
        "account_guid": "string",
        "status": "active",
        "account_code": "CODE1"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/status/set

Purpose: Set B2B account status (draft)

Notes: Set B2B account status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: AccountStatusSetRequest Response schema: AccountEnvelope

Sample request (schema-derived)

json
{
  "account_guid": "string",
  "status": "active",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "account": {
      "account_guid": "string",
      "status": "active",
      "account_code": "CODE1"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/status/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /account/update

Purpose: Update B2B account (draft)

Notes: Update B2B account (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: AccountUpdateRequest Response schema: AccountEnvelope

Sample request (schema-derived)

json
{
  "account_guid": "string",
  "expected_revision": 0,
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "account": {
      "account_guid": "string",
      "status": "active",
      "account_code": "CODE1"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /account/update",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment

Purpose: Add comment (draft)

Notes: Add comment (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CommentAddRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "target_type": "string",
  "target_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/get

Purpose: Get comment (draft)

Notes: Get comment (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: CommentGetRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "comment_id": "string",
  "target_type": "string",
  "target_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/list

Purpose: List comments (draft)

Notes: List comments (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: CommentListRequest Response schema: CommentListEnvelope

Sample request (schema-derived)

json
{
  "target_type": "string",
  "target_id": "string",
  "user_guid": "USER_GUID"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "items": [
      {
        "comment_id": "string",
        "target_type": "string",
        "target_id": "string",
        "status": "current",
        "current_revision": 0,
        "created_at": "2026-01-01T00:00:00Z"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/report

Purpose: Report top-N largest comments (draft)

Notes: Report top-N largest comments (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CommentReportRequest Response schema: CommentReportEnvelope

Sample request (schema-derived)

json
{
  "limit": 8
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "items": [
      {
        "comment_id": "string",
        "target_type": "string",
        "target_id": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/report",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/revise

Purpose: Revise comment (draft)

Notes: Revise comment (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CommentReviseRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "comment_id": "string",
  "target_type": "string",
  "target_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/revise",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/status

Purpose: Update comment status (draft)

Notes: Update comment status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: CommentStatusRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "comment_id": "string",
  "target_type": "string",
  "target_id": "string",
  "status": "current"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/status",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/anonymize

Purpose: Anonymize customer PII (CCPA right-to-forget with analytics preservation)

Notes: Replaces PII fields with redacted tokens, removes email/phone lookup indexes, transitions status to anonymized, removes from search. Customer-adjacent data (loyalty, fraud, consent, etc.) is preserved for analytics. Resolves G56.

Request schema: None Response schema: CustomerEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer": {
      "customer_guid": "string",
      "status": "active",
      "kind": "individual"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/anonymize",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/consent/get

Purpose: Get customer consent/preferences (draft)

Notes: Get customer consent/preferences (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier C (p95 150ms, p99 400ms).

Request schema: CustomerConsentGetRequest Response schema: CustomerConsentEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "consents": [
      {
        "consent_type": "string",
        "consent_state": "string"
      }
    ],
    "preferences": {
      "preferences": {},
      "reason": "example",
      "source_refs": [
        {
          "kind": null,
          "id": null
        }
      ]
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/consent/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/consent/set

Purpose: Set customer consent/preferences (draft)

Notes: Set customer consent/preferences (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: CustomerConsentSetRequest Response schema: CustomerConsentEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "consents": [
      {
        "consent_type": "string",
        "consent_state": "string"
      }
    ],
    "preferences": {
      "preferences": {},
      "reason": "example",
      "source_refs": [
        {
          "kind": null,
          "id": null
        }
      ]
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/consent/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/create

Purpose: Create customer (draft)

Notes: Create customer (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: CustomerCreateRequest Response schema: CustomerEnvelope

Sample request (schema-derived)

json
{
  "customer": {
    "request_context": {
      "orgcode": "ORGCODE",
      "actor": "string",
      "context_source": "session"
    },
    "reason": "example",
    "source_refs": [
      {
        "kind": null,
        "id": null
      }
    ]
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer": {
      "customer_guid": "string",
      "status": "active",
      "kind": "individual"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/create",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/dedupe/list

Purpose: List potential customer duplicates (draft)

Notes: List potential customer duplicates (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier C (p95 250ms, p99 600ms).

Request schema: CustomerDedupeRequest Response schema: CustomerDedupeEnvelope

Sample request (schema-derived)

json
"value"

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "matches": [
      {
        "customer": {
          "customer_guid": null,
          "status": null,
          "kind": null
        },
        "match_fields": [
          {}
        ]
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/dedupe/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/delete

Purpose: Delete all customer data (CCPA right-to-delete)

Notes: Permanently deletes a customer and all customer-adjacent DDB records (consent, fraud, holds, flags, merge audit, loyalty txns, subscriptions, warranties, exemption certs) plus lookup indexes (email, phone, code, external refs, status). Also removes the customer from the search index. Emits customer-deleted event. Resolves G55.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "items_deleted": 0
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/delete",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/flag/list

Purpose: List customer fraud/abuse flags (draft)

Notes: List customer fraud/abuse flags (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier C (p95 150ms, p99 400ms).

Request schema: CustomerFlagListRequest Response schema: CustomerFlagListEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "flags": [
      {
        "flag_id": "string",
        "flag_type": "string",
        "status": "open",
        "severity": "low"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/flag/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/flag/set

Purpose: Set customer fraud/abuse flag (draft)

Notes: Set customer fraud/abuse flag (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: CustomerFlagSetRequest Response schema: CustomerFlagEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "flag": {
    "flag_type": "string"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "flag": {
      "flag_id": "string",
      "flag_type": "string",
      "status": "open",
      "severity": "low"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/flag/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/fraud/assess

Purpose: Assess customer fraud risk (draft)

Notes: Assess customer fraud risk (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier C (p95 250ms, p99 600ms).

Request schema: CustomerFraudAssessRequest Response schema: CustomerFraudAssessEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "assessment": {
    "action_type": "string"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "assessment": {
      "assessment_id": "string",
      "customer_guid": "string",
      "action_type": "string",
      "risk_level": "low",
      "decision": "allow"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/fraud/assess",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/fraud/list

Purpose: List customer fraud assessments (draft)

Notes: List customer fraud assessments (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier C (p95 250ms, p99 600ms).

Request schema: CustomerFraudListRequest Response schema: CustomerFraudListEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "assessments": [
      {
        "assessment_id": "string",
        "customer_guid": "string",
        "action_type": "string",
        "risk_level": "low",
        "decision": "allow"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/fraud/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/get

Purpose: Get customer (draft)

Notes: Get customer (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier C (p95 150ms, p99 400ms).

Request schema: CustomerGetRequest Response schema: CustomerEnvelope

Sample request (schema-derived)

json
"value"

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer": {
      "customer_guid": "string",
      "status": "active",
      "kind": "individual"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/hold/list

Purpose: List customer holds (draft)

Notes: List customer holds (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier C (p95 250ms, p99 600ms).

Request schema: CustomerHoldListRequest Response schema: CustomerHoldListEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "holds": [
      {
        "hold_id": "string",
        "customer_guid": "string",
        "action_type": "string",
        "status": "pending"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/hold/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/hold/resolve

Purpose: Resolve customer hold (draft)

Notes: Resolve customer hold (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier D (p95 350ms, p99 700ms).

Request schema: CustomerHoldResolveRequest Response schema: CustomerHoldEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "hold_id": "string",
  "resolution": "approved",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "hold": {
      "hold_id": "string",
      "customer_guid": "string",
      "action_type": "string",
      "status": "pending"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/hold/resolve",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/list

Purpose: List customers (draft)

Notes: List customers (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: CustomerListRequest Response schema: CustomerListEnvelope

Sample request (schema-derived)

json
{
  "status": "active",
  "kind": "string",
  "q": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customers": [
      {
        "customer_guid": "string",
        "status": "active",
        "kind": "individual"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/merge

Purpose: Merge customer into another customer (draft)

Notes: Merge customer into another customer (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CustomerMergeRequest Response schema: CustomerEnvelope

Sample request (schema-derived)

json
{
  "source_customer_guid": "string",
  "target_customer_guid": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer": {
      "customer_guid": "string",
      "status": "active",
      "kind": "individual"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/merge",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/merge/list

Purpose: List customer merge audit records (draft)

Notes: List customer merge audit records (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier C (p95 250ms, p99 600ms).

Request schema: CustomerMergeListRequest Response schema: CustomerMergeListEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "merges": [
      {
        "source_customer_guid": "string",
        "target_customer_guid": "string",
        "direction": "source",
        "merged_at": "2026-01-01T00:00:00Z"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/merge/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /customer/search

Purpose: Search customers (partial match)

Notes: Search customers (partial match). Auth is via headers; org identity uses x-orgcode or body placement as documented. Search results may be eventually consistent; use exact-match reads for immediate consistency. Route class Tier C (p95 250ms, p99 600ms).

Request schema: CustomerSearchRequest Response schema: CustomerListEnvelope

Sample request (schema-derived)

json
{
  "q": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customers": [
      {
        "customer_guid": "string",
        "status": "active",
        "kind": "individual"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /customer/search",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /exemption/certificate/create

Purpose: Create exemption certificate (draft)

Notes: Create exemption certificate (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier C (p95 350ms, p99 800ms).

Request schema: ExemptionCertificateCreateRequest Response schema: ExemptionCertificateEnvelope

Sample request (schema-derived)

json
{
  "certificate": {
    "certificate_id": "string",
    "certificate_code": "CODE1",
    "status": "active"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "certificate": {
      "certificate_id": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /exemption/certificate/create",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /exemption/certificate/get

Purpose: Get exemption certificate (draft)

Notes: Get exemption certificate (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 200ms, p99 500ms).

Request schema: ExemptionCertificateGetRequest Response schema: ExemptionCertificateEnvelope

Sample request (schema-derived)

json
{
  "certificate_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "certificate": {
      "certificate_id": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /exemption/certificate/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /exemption/certificate/list

Purpose: List exemption certificates (draft)

Notes: List exemption certificates (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 250ms, p99 600ms).

Request schema: ExemptionCertificateListRequest Response schema: ExemptionCertificateListEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "status": "active",
  "limit": 8
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "certificates": [
      {
        "certificate_id": "string",
        "status": "active"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /exemption/certificate/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /exemption/certificate/status/set

Purpose: Set exemption certificate status (draft)

Notes: Set exemption certificate status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier C (p95 350ms, p99 800ms).

Request schema: ExemptionCertificateStatusSetRequest Response schema: ExemptionCertificateEnvelope

Sample request (schema-derived)

json
{
  "certificate_id": "string",
  "status": "active",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "certificate": {
      "certificate_id": "string",
      "status": "active"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /exemption/certificate/status/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /giftcard/issue

Purpose: Issue gift card (draft)

Notes: Issue gift card (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier D (p95 300ms, p99 600ms).

Request schema: StoredValueIssueRequest Response schema: StoredValueEnvelope

Sample request (schema-derived)

json
{
  "amount": {
    "currency": "string",
    "amount": 0
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "stored_value": {
      "card_code": "CODE1",
      "status": "active",
      "balance": {
        "currency": "string",
        "amount": 0
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /giftcard/issue",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /giftcard/redeem

Purpose: Redeem gift card (draft)

Notes: Redeem gift card (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: StoredValueRedeemRequest Response schema: StoredValueEnvelope

Sample request (schema-derived)

json
{
  "card_code": "CODE1",
  "order_ref": "string",
  "amount": {
    "currency": "string",
    "amount": 0
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "stored_value": {
      "card_code": "CODE1",
      "status": "active",
      "balance": {
        "currency": "string",
        "amount": 0
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /giftcard/redeem",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/create

Purpose: Create inbox notification (draft)

Notes: Create inbox notification (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: InboxCreateRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "team_guid": "string",
  "title": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/create",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/get

Purpose: Get inbox notification (draft)

Notes: Get inbox notification (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: InboxGetRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "notification_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/list

Purpose: List inbox notifications (draft)

Notes: List inbox notifications (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: InboxListRequest Response schema: InboxListEnvelope

Sample request (schema-derived)

json
{
  "team_guid": "string",
  "org_wide": false,
  "status": "inbox"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "items": [
      {
        "notification_id": "string",
        "team_guid": "string",
        "status": "inbox",
        "state": "pending",
        "priority": "low",
        "title": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/state

Purpose: Update inbox state (draft)

Notes: Update inbox state (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: InboxStateRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "notification_id": "string",
  "state": "pending"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/state",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/status

Purpose: Update inbox status (draft)

Notes: Update inbox status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: InboxStatusRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "notification_id": "string",
  "status": "inbox"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/status",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/adjust

Purpose: Adjust loyalty points (draft)

Notes: Adjust loyalty points (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: LoyaltyAdjustRequest Response schema: LoyaltyTxnEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "points_delta": 0,
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "transaction": {
      "loyalty_txn_id": "string",
      "customer_guid": "string",
      "order_ref": "string"
    },
    "balance": {
      "available_points": 0,
      "pending_points": 0,
      "lifetime_earned": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/adjust",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/earn

Purpose: Earn loyalty points (draft)

Notes: Earn loyalty points (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: LoyaltyEarnRequest Response schema: LoyaltyTxnEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "order_ref": "string",
  "amount": {
    "currency": "string",
    "amount": 0
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "transaction": {
      "loyalty_txn_id": "string",
      "customer_guid": "string",
      "order_ref": "string"
    },
    "balance": {
      "available_points": 0,
      "pending_points": 0,
      "lifetime_earned": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/earn",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/expire

Purpose: Expire loyalty points as-of (draft)

Notes: Expire loyalty points as-of (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: LoyaltyExpireRequest Response schema: LoyaltyExpireEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_guid": "string",
    "expired_points": 0,
    "balance": {
      "available_points": 0,
      "pending_points": 0,
      "lifetime_earned": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/expire",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/policy/get

Purpose: Get loyalty policy (draft)

Notes: Get loyalty policy (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: LoyaltyPolicyGetRequest Response schema: LoyaltyPolicyEnvelope

Sample request (schema-derived)

json
{
  "as_of": "2026-01-01T00:00:00Z",
  "policy_version": "string",
  "channel_code": "pos_generic"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "policy": {
      "policy_version": "string",
      "earn_policy": {
        "points_per_unit": 0
      },
      "redeem_policy": {
        "mode": "per_point"
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/policy/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/policy/set

Purpose: Set loyalty policy (draft)

Notes: Set loyalty policy (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: LoyaltyPolicySetRequest Response schema: LoyaltyPolicyEnvelope

Sample request (schema-derived)

json
{
  "policy": {
    "policy_version": "string",
    "earn_policy": {
      "points_per_unit": 0
    },
    "redeem_policy": {
      "mode": "per_point"
    }
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "policy": {
      "policy_version": "string",
      "earn_policy": {
        "points_per_unit": 0
      },
      "redeem_policy": {
        "mode": "per_point"
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/policy/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/redeem

Purpose: Redeem loyalty points (draft)

Notes: Redeem loyalty points (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: LoyaltyRedeemRequest Response schema: LoyaltyTxnEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "order_ref": "string",
  "redeem_points": 0,
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "transaction": {
      "loyalty_txn_id": "string",
      "customer_guid": "string",
      "order_ref": "string"
    },
    "balance": {
      "available_points": 0,
      "pending_points": 0,
      "lifetime_earned": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/redeem",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/restore

Purpose: Restore loyalty points (draft)

Notes: Restore loyalty points (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: LoyaltyRestoreRequest Response schema: LoyaltyTxnEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "transaction": {
      "loyalty_txn_id": "string",
      "customer_guid": "string",
      "order_ref": "string"
    },
    "balance": {
      "available_points": 0,
      "pending_points": 0,
      "lifetime_earned": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/restore",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /loyalty/reverse

Purpose: Reverse loyalty points (draft)

Notes: Reverse loyalty points (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier D (p95 300ms, p99 600ms).

Request schema: LoyaltyReverseRequest Response schema: LoyaltyTxnEnvelope

Sample request (schema-derived)

json
{
  "customer_guid": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "transaction": {
      "loyalty_txn_id": "string",
      "customer_guid": "string",
      "order_ref": "string"
    },
    "balance": {
      "available_points": 0,
      "pending_points": 0,
      "lifetime_earned": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /loyalty/reverse",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /retention/policy/get

Purpose: Get current or versioned data retention policy

Notes: Retrieves the current retention policy, a specific version, or the effective policy as-of a given date.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "policy": {},
    "revision": 0
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /retention/policy/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /retention/policy/set

Purpose: Set data retention policy for the org

Notes: Configures per-org data retention rules (customer retention days, loyalty txn retention days, etc.). Uses current+versioned dual-record pattern with expected_revision guard. Resolves G57.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "policy": {},
    "revision": 0
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /retention/policy/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

GET /stat

Purpose: Health check

Notes: Health check. Tenant routes require x-orgcode; /stat health checks do not. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier A (p95 500ms).

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "service": "string",
    "status": "active"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "GET /stat",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /subscription/cancel

Purpose: Cancel an active or paused subscription

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: SubscriptionLifecycleRequest Response schema: SubscriptionEnvelope

Sample request (schema-derived)

json
{
  "subscription_id": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "subscription": {
      "subscription_id": "string",
      "customer_id": "string",
      "plan_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /subscription/cancel",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /subscription/create

Purpose: Create a customer subscription

Notes: Create a new subscription for a customer tied to a subscription plan. Route class Tier A (p95 500ms).

Request schema: SubscriptionCreateRequest Response schema: SubscriptionEnvelope

Sample request (schema-derived)

json
{
  "subscription": {
    "customer_id": "string",
    "plan_id": "string",
    "frequency": "daily"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "subscription": {
      "subscription_id": "string",
      "customer_id": "string",
      "plan_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /subscription/create",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /subscription/get

Purpose: Get a subscription by ID

Request schema: SubscriptionGetRequest Response schema: SubscriptionEnvelope

Sample request (schema-derived)

json
{
  "subscription_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "subscription": {
      "subscription_id": "string",
      "customer_id": "string",
      "plan_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /subscription/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /subscription/list

Purpose: List subscriptions with optional status/customer filter

Notes: Paginated; use limit and next_token.

Request schema: SubscriptionListRequest Response schema: SubscriptionListEnvelope

Sample request (schema-derived)

json
{
  "status": "active",
  "customer_id": "string",
  "limit": 8
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "subscriptions": [
      {
        "subscription_id": "string",
        "customer_id": "string",
        "plan_id": "string"
      }
    ],
    "next_token": "string"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /subscription/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /subscription/pause

Purpose: Pause an active subscription

Request schema: SubscriptionLifecycleRequest Response schema: SubscriptionEnvelope

Sample request (schema-derived)

json
{
  "subscription_id": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "subscription": {
      "subscription_id": "string",
      "customer_id": "string",
      "plan_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /subscription/pause",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /subscription/resume

Purpose: Resume a paused subscription

Request schema: SubscriptionLifecycleRequest Response schema: SubscriptionEnvelope

Sample request (schema-derived)

json
{
  "subscription_id": "string",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "subscription": {
      "subscription_id": "string",
      "customer_id": "string",
      "plan_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /subscription/resume",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /warranty/get

Purpose: Get warranty by warranty_id or serial_number

Request schema: None Response schema: WarrantyEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "note": "See WarrantyEnvelope"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /warranty/get",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /warranty/list

Purpose: List warranties by status, customer_id, or serial_number (paginated)

Notes: Paginated; use limit and next_token.

Request schema: None Response schema: WarrantyListEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "note": "See WarrantyListEnvelope"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /warranty/list",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /warranty/register

Purpose: Register a warranty linking serial to customer and terms

Notes: Create a warranty registration with idempotency. Resolves G51 (warranty registration entity).

Request schema: None Response schema: WarrantyEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "note": "See WarrantyEnvelope"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /warranty/register",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /warranty/status/set

Purpose: Transition warranty status (active → expired/voided/doomed)

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: WarrantyEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "note": "See WarrantyEnvelope"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /warranty/status/set",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /warranty/update

Purpose: Update warranty terms, expiry, or customer with expected_revision

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: WarrantyEnvelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "note": "See WarrantyEnvelope"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /warranty/update",
    "service": "crm",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}