publ betaReference (MCP guide)
Open publ console

publ Reference

commerce_create

Create the exact X00004 product draft prepared by commerce_creation_get. Explicit sale and visibility settings can make the product available when executed. This creates product configuration, not an order, payment, shipping dispatch or refund.

Connected source: Only X00004 is registered through this connection. There are 153 source registrations versus the older recorded 145-tool runtime; inspect current discovery.

Inputs

Field Required here Contract
pAppCode Yes one of: X00004, E00003
draft Yes When pAppCode is X00004: object
draft.name Yes When pAppCode is X00004: string; min length 2; max length 50
draft.oneLiner No When pAppCode is X00004: or string; min length 2; max length 100; default
draft.slug Yes When pAppCode is X00004: string; max length 150; pattern ^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9\s\-\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF]*$
draft.price Yes When pAppCode is X00004: string; pattern ^(0|[1-9]\d{0,9})(\.\d{1,2})?$
draft.originalPrice No When pAppCode is X00004: string; pattern ^(0|[1-9]\d{0,9})(\.\d{1,2})?$ or null; default null
draft.imageTaskIds Yes When pAppCode is X00004: array; items: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.; min items 1; max items 10
draft.description No When pAppCode is X00004: string; max length 50000; default ``
draft.returnPolicyContent Yes When pAppCode is X00004: string; min length 1; max length 50000
draft.shippingPolicyId Yes When pAppCode is X00004: 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.
draft.categoryIds No When pAppCode is X00004: 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 5; default []
draft.labelIds No When pAppCode is X00004: 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 5; default []
draft.badgeIds No When pAppCode is X00004: 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 5; default []
draft.saleStatus Yes When pAppCode is X00004: ACTIVE, DISCONTINUED
draft.visibilityStatus Yes When pAppCode is X00004: VISIBLE, DISABLED
draft.options Yes When pAppCode is X00004: one of: single, combined (by kind)
draft.options.sku No When pAppCode is X00004 and draft.options.kind is single: string; max length 100; pattern ^[a-zA-Z0-9-]*$; default ``
draft.options.quantity Yes When pAppCode is X00004 and draft.options.kind is single: integer; minimum 0; maximum 99999999
draft.options.groups Yes When pAppCode is X00004 and draft.options.kind is combined: array; min items 1; max items 3
draft.options.groups[].key Yes When pAppCode is X00004 and draft.options.kind is combined: 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.
draft.options.groups[].title Yes When pAppCode is X00004 and draft.options.kind is combined: string; min length 1; max length 25
draft.options.groups[].values Yes When pAppCode is X00004 and draft.options.kind is combined: array; min items 1; max items 300
draft.options.groups[].values[].key Yes When pAppCode is X00004 and draft.options.kind is combined: 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.
draft.options.groups[].values[].name Yes When pAppCode is X00004 and draft.options.kind is combined: string; min length 1; max length 50
draft.options.variants Yes When pAppCode is X00004 and draft.options.kind is combined: array; min items 1; max items 300
draft.options.variants[].sku No When pAppCode is X00004 and draft.options.kind is combined: string; max length 100; pattern ^[a-zA-Z0-9-]*$; default ``
draft.options.variants[].quantity Yes When pAppCode is X00004 and draft.options.kind is combined: integer; minimum 0; maximum 99999999
draft.options.variants[].additionalPrice No When pAppCode is X00004 and draft.options.kind is combined: string; pattern ^-?(0|[1-9]\d{0,9})(\.\d{1,2})?$; default 0
draft.options.variants[].saleStatus Yes When pAppCode is X00004 and draft.options.kind is combined: ACTIVE, DISCONTINUED
draft.options.variants[].values Yes When pAppCode is X00004 and draft.options.kind is combined: 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 3
draft.orderQuantityLimit No When pAppCode is X00004: integer; minimum 1; maximum 9999 or null; default null
draft.enableReviewFeature No When pAppCode is X00004: boolean; default false
draft.enableQuestionFeature No When pAppCode is X00004: boolean; default false
draft.searchIndexable No When pAppCode is X00004: boolean; default true
draft.seoTitle No When pAppCode is X00004: string; max length 100
draft.seoDescription No When pAppCode is X00004: string; max length 5000
draft.seoKeywords No When pAppCode is X00004: array; items: string; min length 1
draft.seoImgAltText No When pAppCode is X00004: string; max length 300
draft.inputOption No When pAppCode is X00004: object
draft.inputOption.title Yes When pAppCode is X00004: string; min length 1; max length 50
draft.inputOption.placeholder Yes When pAppCode is X00004: string; min length 1; max length 50
draft.addons No When pAppCode is X00004: object
draft.addons.title Yes When pAppCode is X00004: string; min length 1; max length 50
draft.addons.items Yes When pAppCode is X00004: array; min items 1; max items 3
draft.addons.items[].name Yes When pAppCode is X00004: string; min length 1; max length 50
draft.addons.items[].additionalPrice Yes When pAppCode is X00004: string; pattern ^(0|[1-9]\d{0,9})(\.\d{1,2})?$
draft.addons.items[].saleStatus Yes When pAppCode is X00004: ACTIVE, DISCONTINUED
channelCode Yes When pAppCode is X00004: 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.
requestId Yes When pAppCode is X00004: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
expectedRevision Yes When pAppCode is X00004: string; pattern ^[a-f0-9]{64}$; Exact revision returned by the matching read for this channel, installed pApp and resource.
dryRun No When pAppCode is X00004: boolean; default false
draft Yes When pAppCode is E00003: object
draft.title Yes When pAppCode is E00003: string; min length 1; max length 80
draft.summary No When pAppCode is E00003: string; max length 200; default ``
draft.description Yes When pAppCode is E00003: string; min length 1; max length 20000
draft.noticeGuidelines Yes When pAppCode is E00003: string; min length 1; max length 20000
draft.startDate Yes When pAppCode is E00003: string; pattern ^\d{4}-\d{2}-\d{2}$
draft.endDate Yes When pAppCode is E00003: string; pattern ^\d{4}-\d{2}-\d{2}$
draft.ageRated No When pAppCode is E00003: string; max length 100; default ``
draft.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation No When pAppCode is E00003: object
draft.translation.title No When pAppCode is E00003: object
draft.translation.title.ko No When pAppCode is E00003: string
draft.translation.title.en No When pAppCode is E00003: string
draft.translation.title.ja No When pAppCode is E00003: string
draft.translation.title.zh No When pAppCode is E00003: string
draft.translation.title.zh-Hant No When pAppCode is E00003: string
draft.translation.title.fr No When pAppCode is E00003: string
draft.translation.title.es No When pAppCode is E00003: string
draft.translation.title.vi No When pAppCode is E00003: string
draft.translation.title.ru No When pAppCode is E00003: string
draft.translation.title.it No When pAppCode is E00003: string
draft.translation.summary No When pAppCode is E00003: object
draft.translation.summary.ko No When pAppCode is E00003: string
draft.translation.summary.en No When pAppCode is E00003: string
draft.translation.summary.ja No When pAppCode is E00003: string
draft.translation.summary.zh No When pAppCode is E00003: string
draft.translation.summary.zh-Hant No When pAppCode is E00003: string
draft.translation.summary.fr No When pAppCode is E00003: string
draft.translation.summary.es No When pAppCode is E00003: string
draft.translation.summary.vi No When pAppCode is E00003: string
draft.translation.summary.ru No When pAppCode is E00003: string
draft.translation.summary.it No When pAppCode is E00003: string
draft.translation.description No When pAppCode is E00003: object
draft.translation.description.ko No When pAppCode is E00003: string
draft.translation.description.en No When pAppCode is E00003: string
draft.translation.description.ja No When pAppCode is E00003: string
draft.translation.description.zh No When pAppCode is E00003: string
draft.translation.description.zh-Hant No When pAppCode is E00003: string
draft.translation.description.fr No When pAppCode is E00003: string
draft.translation.description.es No When pAppCode is E00003: string
draft.translation.description.vi No When pAppCode is E00003: string
draft.translation.description.ru No When pAppCode is E00003: string
draft.translation.description.it No When pAppCode is E00003: string
draft.translation.ageRated No When pAppCode is E00003: object
draft.translation.ageRated.ko No When pAppCode is E00003: string
draft.translation.ageRated.en No When pAppCode is E00003: string
draft.translation.ageRated.ja No When pAppCode is E00003: string
draft.translation.ageRated.zh No When pAppCode is E00003: string
draft.translation.ageRated.zh-Hant No When pAppCode is E00003: string
draft.translation.ageRated.fr No When pAppCode is E00003: string
draft.translation.ageRated.es No When pAppCode is E00003: string
draft.translation.ageRated.vi No When pAppCode is E00003: string
draft.translation.ageRated.ru No When pAppCode is E00003: string
draft.translation.ageRated.it No When pAppCode is E00003: string
draft.translation.noticeGuidelines No When pAppCode is E00003: object
draft.translation.noticeGuidelines.ko No When pAppCode is E00003: string
draft.translation.noticeGuidelines.en No When pAppCode is E00003: string
draft.translation.noticeGuidelines.ja No When pAppCode is E00003: string
draft.translation.noticeGuidelines.zh No When pAppCode is E00003: string
draft.translation.noticeGuidelines.zh-Hant No When pAppCode is E00003: string
draft.translation.noticeGuidelines.fr No When pAppCode is E00003: string
draft.translation.noticeGuidelines.es No When pAppCode is E00003: string
draft.translation.noticeGuidelines.vi No When pAppCode is E00003: string
draft.translation.noticeGuidelines.ru No When pAppCode is E00003: string
draft.translation.noticeGuidelines.it No When pAppCode is E00003: string
draft.translation.thumbnailSrc No When pAppCode is E00003: object
draft.translation.thumbnailSrc.ko No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.ko.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.en No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.en.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.ja No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.ja.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.zh No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.zh.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.zh-Hant No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.zh-Hant.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.fr No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.fr.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.es No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.es.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.vi No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.vi.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.ru No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.ru.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.translation.thumbnailSrc.it No When pAppCode is E00003: object or ``
draft.translation.thumbnailSrc.it.imageTaskId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
draft.policy Yes When pAppCode is E00003: object
draft.policy.title Yes When pAppCode is E00003: string; min length 3; max length 50
draft.policy.presentationalTitle Yes When pAppCode is E00003: string; min length 3; max length 50; pattern ^[^\r\n]*$
draft.policy.translation No When pAppCode is E00003: object
draft.policy.translation.presentationalTitle Yes When pAppCode is E00003: object
draft.policy.translation.presentationalTitle.ko No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.en No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.ja No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.zh No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.zh-Hant No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.fr No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.es No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.vi No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.ru No When pAppCode is E00003: string
draft.policy.translation.presentationalTitle.it No When pAppCode is E00003: string
draft.policy.tierPrices Yes When pAppCode is E00003: array; min items 1; max items 100
draft.policy.tierPrices[].tierLabelId Yes When pAppCode is E00003: 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.
draft.policy.tierPrices[].amount Yes When pAppCode is E00003: string; pattern ^(0|[1-9]\d{0,9})(\.\d{1,2})?$
channelCode Yes When pAppCode is E00003: 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.
requestId Yes When pAppCode is E00003: string; pattern ^[A-Za-z0-9_-]{8,80}$; Reuse this requestId and the exact original input after interruption. Never change requestId to retry an uncertain write.
expectedRevision Yes When pAppCode is E00003: string; pattern ^[a-f0-9]{64}$; Exact revision returned by the matching read for this channel, installed pApp and resource.
dryRun No When pAppCode is E00003: boolean; default false

Require channelCode, pAppCode:X00004, the entire unchanged draft from the preparation contract, stable requestId and expectedRevision. requestId is 8–80 ASCII letters, digits, underscores or hyphens. Copy the preparation result's revision into expectedRevision, a 64-character lowercase hexadecimal string. dryRun is optional, default false.

All draft fields, defaults, single/combined options, currency limits, image order and initial stock rules are the same as preparation. Use only completed product-image task IDs for this exact current connection, operator, credential version, installed shop, purpose and storage. No caller image URL, raw create body, service route or credential override is accepted. Changing the draft requires preparing it again; do not reuse an existing product's settings/control revision.

The common connection must resolve the existing store, configured BCS/COMMERCE_V2 origin, image storage and current authorization. The source does not create a missing store or infer service configuration. Legacy X00002 and ticket-event drafts remain unconnected even though owner-domain schemas exist.

Save, identity and recovery

A fresh dry run returns COMMERCE_OPERATION_PLAN, the planned request/dependencies/images and writesPerformed:false without creating a new job or sending the create. A dry run against an existing task is historical inspection, not a fresh completion check.

The real call persists prepared then sent before one source POST. HTTP 200 must contain the product record; the existing-product success/action dispatch receipt is not the create contract. The returned exact product identity must be parsed and durably saved. The workflow then reads that product and its dependencies twice. A receipt alone is not completion.

The returned resourceId must equal the saved productId. New option/image/variant IDs must be distinct and internally consistent. Access-control absence in the source DTO is not proof of an unreturned backend field. Readback does not prove exclusive causality, atomicity, public rendering, stock availability at checkout or customer purchase behavior.

Use taskType commerce-creation. Central status reports historical saved progress; resume only observes and cannot dispatch prepared or sent work. Unattempted prepared work needs the identical original create call after revalidation. A sent request without saved identity stays pending/COMMERCE_CREATE_UNKNOWN: no title matching, inventory scan, identity adoption or resend is permitted. With a saved identity, recovery only reads that exact product. Readback differences remain COMMERCE_OPERATION_PENDING with a diagnostic lastCode. Keep the original task; never bypass uncertainty with a new requestId. Inspect saveAcknowledged and journalPersistence separately from verified completion.

Completed replays are historical with current verification false and no fresh success link. Read commerce_product_settings_get for current state. Verified fresh preparation/dry run opens products/create; verified creation opens the exact created product. Pending, mismatched and historical results do not gain a current success destination.

There is no automatic deletion, orphan-image cleanup, rollback or identity-preserving undo. Discontinuing or hiding a created product does not restore its prior absence. Initial input/add-on options have the later bounded contract below; existing-product group/item creation remains unavailable.

Input example

Illustrative dry run of the preparation example. Replace the all-zero expectedRevision with that call's returned revision and retain the complete intended draft. Image-task and dependency identities must actually exist in the same authorized context.

{
  "channelCode": "selected-channel",
  "pAppCode": "X00004",
  "requestId": "shop-create-001",
  "expectedRevision": "0000000000000000000000000000000000000000000000000000000000000000",
  "draft": {
    "name": "Sample notebook",
    "slug": "sample-notebook",
    "price": "1000",
    "originalPrice": null,
    "imageTaskIds": ["shop-image-001"],
    "returnPolicyContent": "Use the existing store return policy.",
    "shippingPolicyId": "observed_shipping_policy",
    "saleStatus": "DISCONTINUED",
    "visibilityStatus": "DISABLED",
    "options": {"kind": "single", "sku": "NOTEBOOK-01", "quantity": 10}
  },
  "dryRun": true
}

Creation SEO connection boundary

MCP adds optional seoTitle, seoDescription, seoKeywords and seoImgAltText to the X00004 draft. Older drafts omitting all four fields retain their prior contract.

Explicit requested blanks/keyword arrays participate in exact created-product readback while omitted fields stay absent. Obtain a fresh preparation revision after changing metadata, retain the complete draft and original request identity, and never resend a sent create to repair missing metadata or a lost product ID. The existing shared status/resume observation rules and lack of rollback are unchanged.

Initial input and add-on children

MCP extends the complete creation draft with one optional input field and one optional nonrequired add-on group of1–3 items. These are part of one whole-product CREATE, with the same commerce-creation task and parent product receipt.

Readback validates requested child fields and exact parents/store/currency/ordering with distinct consistent IDs over two stable product reads. It does not independently pin every child ID to the historical CREATE response. Missing parent receipt cannot be repaired with child matching or another create. No new group/item creation on an existing product, checkout validation, automatic deletion or restoration is added.