publ betaReference (MCP guide)
Open publ console

publ Reference

ticket_discount_settings_get — inspect and prepare an event discount policy

Discover active discount policies for an existing E00003 event, inspect one exact policy, or prepare its names, management-label membership, sales conditions, override tier prices or selected-policy deletion.

Use the channel and transport requirements: selected authorized channel, one exact E00003 installation, verified consumer/base currency, and OWNER or a MANAGE_P_APPS delegate whose current manual policy permits configuration. Content-only delegates and account scope cannot use this workflow. BOOK_AND_TICKET_V3 uses the selected API origin, without a shop-store lookup or another inferred service host.

Inputs and discovery

Field Required here Contract
channelCode Yes string; min length 1; max length 512; The exact channelCode selected through channel discovery. Do not supply a URL, channel numeric ID, account ID or credentials.
pAppCode Yes E00003
eventId Yes string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.
view Yes one of: list, policy, delete (by kind)
view.page No When view.kind is list: integer; minimum 1; maximum 10000; default 1
view.policyId Yes When view.kind is policy: string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.
view.operation No When view.kind is policy: one of: tierPrice, tierLink, tierUnlink, metadata, salesTerms (by kind)
view.operation.eventPolicyTierPriceId Yes When view.kind is policy and view.operation.kind is tierPrice: string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.
view.operation.payment Yes When view.kind is policy and view.operation.kind is tierPrice: one of: free, paid (by kind)
view.operation.payment.amount Yes When view.kind is policy and view.operation.kind is tierPrice and view.operation.payment.kind is paid: string; pattern ^(0|[1-9]\d{0,9})(\.\d{1,2})?$
view.operation.tierLabelId Yes When view.kind is policy and view.operation.kind is tierLink: string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.
view.operation.payment Yes When view.kind is policy and view.operation.kind is tierLink: one of: free, paid (by kind)
view.operation.payment.amount Yes When view.kind is policy and view.operation.kind is tierLink and view.operation.payment.kind is paid: string; pattern ^(0|[1-9]\d{0,9})(\.\d{1,2})?$
view.operation.eventPolicyTierPriceIds Yes When view.kind is policy and view.operation.kind is tierUnlink: array; items: string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.; min items 1; max items 100
view.operation.confirmation Yes When view.kind is policy and view.operation.kind is tierUnlink: UNLINK_TIER_PRICES
view.operation.settings Yes When view.kind is policy and view.operation.kind is metadata: object
view.operation.settings.title No When view.kind is policy and view.operation.kind is metadata: string; min length 3; max length 50; pattern ^[^\r\n]*$
view.operation.settings.presentationalTitle No When view.kind is policy and view.operation.kind is metadata: string; min length 3; max length 50; pattern ^[^\r\n]*$
view.operation.settings.labelIds No When view.kind is policy and view.operation.kind is metadata: array; items: string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.; max items 10
view.operation.settings Yes When view.kind is policy and view.operation.kind is salesTerms: object
view.operation.settings.languages No When view.kind is policy and view.operation.kind is salesTerms: array; items: ko, en, ja, zh-cn, zh-tw, fr, es, de, ru, pt, it, ar, hi, bn, vi, id, th, tr, fa, pl, others; min items 1; max items 21 or null
view.operation.settings.codes No When view.kind is policy and view.operation.kind is salesTerms: array; items: string; pattern ^[a-z0-9]{2,20}$; min items 1; max items 10 or null
view.operation.settings.purchaseUnit No When view.kind is policy and view.operation.kind is salesTerms: integer; minimum 1; maximum 20 or null
view.operation.settings.minimumQuantity No When view.kind is policy and view.operation.kind is salesTerms: integer; minimum 2; maximum 100 or null
view.policyIds Yes When view.kind is delete: array; items: string; min length 1; max length 160; pattern ^[A-Za-z0-9_-]+$; Exact resource identifier returned by this operation, never a title, unrelated row ID or URL.; min items 1; max items 100
view.confirmation Yes When view.kind is delete: DELETE_DISCOUNT_POLICIES

Objects are strict. Business IDs use 1–160 ASCII letters, digits, underscores or hyphens. Caller currency, installation, consumer, headers, origin, raw body and URLs are not inputs. Null is accepted only for the four sales-condition settings below.

List discovery returns one stable page of LISTED, nondefault policies in source API order, with pagination, coverage.completeInventory:false and coverage.nextPage (the next page number or null). Complete inventory remains false even when this page contains all reported rows. It returns no mutation revision and creates no job. An out-of-range page may be empty but has no verified current console destination.

Selected-policy reads require a LISTED event and discount policy, and exactly one distinct LISTED default policy belonging to that event. The discount's refEventPolicyId must identify that default policy. Returned embedded policy projections and inherited prices must agree with their exact source policies. Missing, conflicting, duplicated or cross-consumer relationships fail closed.

Operations

operation.kind Required fields and effect
metadata settings with optional title, presentationalTitle, labelIds. Change names or this policy's management-label links.
salesTerms settings with optional languages, codes, purchaseUnit, minimumQuantity. Merge selected conditions into the full observed object.
tierPrice An active eventPolicyTierPriceId and payment. Change one override amount, preserving its tier assignment.
tierLink Existing active global tierLabelId and payment. Create one override price link.
tierUnlink 1–100 distinct active eventPolicyTierPriceIds and confirmation:UNLINK_TIER_PRICES. Remove selected overrides; all active overrides may be selected.

Names and management labels

Names must be nonblank single lines of 3–50 UTF-16 code units with no CR/LF; leading/trailing whitespace is preserved. Omitted names retain current values. Both final names must be valid even when only one is supplied. labelIds is a complete selection of up to ten unique existing IDs: omission preserves links, while [] removes all links from this policy without deleting global labels. Empty settings:{} inspects metadata and prepares a no-op; it cannot prepare a different edit.

Metadata reads the EVENT_POLICY management-label catalog, bounded at 500 unique rows. availableLabels may contain AVAILABLE and NOT_AVAILABLE labels; there is no implicit availability filter. Linked projections must agree with that catalog, including its consumer when supplied. Labels are normalized by labelId; this does not prove console display ordering or translations. These are management labels, separate from availableTierLabels used for pricing.

Sales conditions

Setting Accepted non-null value Explicit null
languages 1–21 unique values from ko, en, ja, zh-cn, zh-tw, fr, es, de, ru, pt, it, ar, hi, bn, vi, id, th, tr, fa, pl, others. Disable with the source wildcard array.
codes 1–10 unique strings, each 2–20 lowercase ASCII letters/digits. No trimming or case conversion. Disable with the source wildcard array.
purchaseUnit Integer 1–20; value 1 means no unit restriction. Disable with -1, as does value 1.
minimumQuantity Integer 2–100. Disable with -1.

Omission preserves a condition; unknown observed sales terms are also preserved. Empty settings produce no change. Empty arrays and caller-supplied "*" are invalid; use null to disable languages or codes. Codes configure source display/purchase conditions, not coupon generation or issuance. Preparing these values does not verify checkout discount evaluation.

Override tier prices

Payment is either {"kind":"free"} or {"kind":"paid","amount":"..."}. Paid amounts must be positive decimal text and meet the same currency/channel price rules as default tier pricing. They cannot exceed the matching base price for the same tierLabelId. No percentage discount or automatically recalculated price is accepted: provide the final amount. Do not substitute cancellation-fee limits.

For tierPrice and tierLink, the discount response must include defaultEventPolicyTierPrices, even when explicitly empty. A missing inherited-price projection fails; any present projection must match the exact default policy. If the verified base policy has no matching tier row, no base cap is invented, but currency/channel limits still apply.

Link/unlink preparation reads complete LISTED and ARCHIVED global tier-label inventories, each at most five 100-row pages and at most 500 rows combined. availableTierLabels contains only LISTED labels with no override row in this discount policy, including no deleted row. Linking requires fewer than 500 override rows and an observed active global label ID. Use the original console when no valid label ID is known; do not invent an ID to probe options. There is no global-label editor here. Plain, metadata and sales-condition reads do not load tier membership; only metadata loads management labels.

Examples

These are complete getter arguments with illustrative IDs. Replace them with authorized observations. The price example assumes KRW and a matching base price of at least 20,000. Prepare again with the complete intended operation after any settings or target change.

Discover page one:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "list",
    "page": 1
  }
}

Inspect without preparing a change:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example"
  }
}

Inspect names and management-label options without changing them:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example",
    "operation": {
      "kind": "metadata",
      "settings": {}
    }
  }
}

Change the management name and clear policy label links, preserving the public name:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example",
    "operation": {
      "kind": "metadata",
      "settings": {
        "title": "Early booking",
        "labelIds": []
      }
    }
  }
}

Set language, unit and minimum-quantity conditions while disabling code restriction:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example",
    "operation": {
      "kind": "salesTerms",
      "settings": {
        "languages": [
          "en",
          "ko"
        ],
        "codes": null,
        "purchaseUnit": 2,
        "minimumQuantity": 4
      }
    }
  }
}

Change an existing override amount, preserving its tier assignment:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example",
    "operation": {
      "kind": "tierPrice",
      "eventPolicyTierPriceId": "override-example",
      "payment": {
        "kind": "paid",
        "amount": "20000"
      }
    }
  }
}

Link an existing global tier label at a free override price:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example",
    "operation": {
      "kind": "tierLink",
      "tierLabelId": "tier-label-example",
      "payment": {
        "kind": "free"
      }
    }
  }
}

Remove one active override link:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "policy",
    "policyId": "discount-example",
    "operation": {
      "kind": "tierUnlink",
      "eventPolicyTierPriceIds": [
        "override-example"
      ],
      "confirmation": "UNLINK_TIER_PRICES"
    }
  }
}

Results and next step

Result Meaning
TICKET_DISCOUNT_POLICIES One discovery page with event, eventPolicies, pagination and coverage; no mutation revision.
TICKET_DISCOUNT_SETTINGS Exact discountPolicy, basePolicy, event and revision. An operation adds its prepared request, null for a no-op. Metadata adds availableLabels; link/unlink adds availableTierLabels.
TICKET_POLICY_LIFECYCLE Deletion preparation: event, complete active policies, selectedPolicyIds, coverage, revision and DELETE request, without writing.
TICKET_DISCOUNT_SETTINGS_UNVERIFIED A relationship, dependency, price cap or observed state could not be verified. Schema, permission, context and source-price errors may also reject preparation.

Successful reads have writesPerformed:false and create no journal. Two stable business snapshots are required; generated insertedAt/updatedAt values are excluded and monetary representations normalized. This is not an atomic snapshot or evidence of causal change.

Apply the same target and full operation with its returned revision through ticket_discount_settings_apply. A plain-read revision or metadata inspection with empty settings cannot authorize different settings. The current console destination depends on the view: metadata and plain policy reads return the surviving page-one list/modal, while sales conditions and prices use their selected-policy screens.

This operates on existing policies only. Policy creation/copy, translations, global-label edits, coupon issuance, current schedules, issued tickets, checkout/charging, refunds and settlement are outside this method.

Prepare selected discount deletion

Use the existing method with view:{kind:"delete",policyIds:["observed-discount"],confirmation:"DELETE_DISCOUNT_POLICIES"}. Supply 1–100 unique active discount IDs. This reads the exact event, its single default policy and every active discount page (up to 500 discounts). It rejects missing/default policies, incomplete inventory or inconsistent embedded relationships. It returns TICKET_POLICY_LIFECYCLE, selectedPolicyIds, coverage.completeActiveInventory:true, a revision and the exact DELETE preview without writing.

Apply the same delete view fields as operation in ticket_discount_settings_apply, omitting root policyId. The list view and a policy read do not prepare deletion; its revision includes the exact selection and complete active inventory. The destination is the surviving discount list at page 1, limit 100. No separate public lifecycle tool is introduced; the internal recovery task is commerce-ticket-policy-lifecycle.

Deletion preparation reads two stable full snapshots: the LISTED event, exactly one active default policy, and all active discount pages (fixed 100 rows, at most five pages/500 discounts). It rejects changing totals, incomplete pages, duplicate identities and discounts not referencing the default. Any supplied embedded active-policy projection must match this inventory. Unlike ordinary list discovery, deletion returns coverage.completeActiveInventory:true and maximumDiscountPolicies:500. It does not claim complete historical/deleted-policy coverage.

Select 1–100 active nondefault policies; missing IDs and the default are rejected with TICKET_POLICY_LIFECYCLE_UNVERIFIED. This getter creates no journal and sends no write. The public methods remain ticket_discount_settings_get/apply; there is no public ticket_policy_lifecycle_get/apply pair.

Complete deletion preparation with illustrative observed IDs:

{
  "channelCode": "L2NoYW5uZWxzLzk4",
  "pAppCode": "E00003",
  "eventId": "event-example",
  "view": {
    "kind": "delete",
    "policyIds": [
      "discount-example"
    ],
    "confirmation": "DELETE_DISCOUNT_POLICIES"
  }
}