HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

Merchant commerce

Create product

/api/v2/commerce/products
AUTHENTICATIONBearer token · commerce:writeAUTHORITATIVE OWNERcommerce-serviceCONTRACT AUTHORITYGenerated Rust OpenAPISTATUSSource ready · production listed

PURPOSE + BUSINESS CONTEXT

Create a reusable product with pricing, currency, fulfillment, and metadata.

WHEN THIS CALL IS USEFUL

Create one reusable merchant-owned catalog draft after resolving its SKU, exact price, denomination, public description, tax classification, and fulfillment evidence policy.

OUTCOME · Create or advance

What changes

Creates a DRAFT catalog record and immutable terms commitment only. It does not publish the offer, create checkout, issue an invoice, reserve inventory, collect payment, calculate tax, deliver anything, or move value.

WHY IT MATTERS

  • Gives people and agents a contract-backed way to advance product.
  • Connects catalog and invoice operations to payment collection and treasury reconciliation without making presentation state or a reserved address proof of payment.

ISOLATION + AUTHORITY

Tenant, workspace, merchant, product, customer, invoice, checkout, collection wallet, payment, custody, treasury settlement, tax or compliance policy, and finality remain distinct. Merchant configuration or invoice state cannot authorize wallet signing, move funds, prove settlement, or grant publisher, matching, or trading authority.

BEFORE YOU CALL

  • Authenticate at the documented boundary: bearer+scope.
  • Supply the required merchant_uuid (body), sku (body), name (body), unit_price (body), currency (body), fulfillment_policy (body), step_up_token (body) exactly as defined by the live contract.
  • Use one Idempotency-Key only for retries of the same byte-equivalent logical mutation.

WHAT TO DO NEXT

  • Re-read product using the canonical identifier returned by this operation.
  • Reconcile an ambiguous response with the same idempotency key before attempting another mutation.
  • Open the canonical merchant, invoice, payment, or rotational-wallet record for the next stage and verify settlement independently before marking the commercial obligation complete.

AGENT GUIDANCE

  • Use product only for the purpose and lifecycle stage described by this operation; do not treat it as authority for an adjacent action.
  • Supply the required merchant_uuid (body), sku (body), name (body), unit_price (body), currency (body), fulfillment_policy (body), step_up_token (body) exactly as defined by the live contract.
  • Distinguish merchant readiness, product availability, invoice issuance, checkout presentation, payment observation, wallet synchronization, treasury settlement, cancellation, and reconciliation.
  • After a timeout or conflict, read authoritative state before deciding whether an equivalent retry is safe.
MACHINE CONTRACT

The exact deployed parameters, schemas, responses, security requirements, and Hybrid-Chain agent metadata are authoritative at this operation's production OpenAPI JSON Pointer. The readable tables below add integration guidance; the deployed OpenAPI controls if guidance and the machine contract ever differ.

Open the authoritative production contract

EXTENDED INTEGRATION GUIDANCE

Readable request and response reference

Examples illustrate integration intent; the referenced OpenAPI operation and component schemas define the executable shape.

PARAMETERS

Headers, path, query, and body

NAMELOCATIONPRESENCETYPE / RULES / PURPOSE
AuthorizationheaderRequired

Bearer tokenCredential containing commerce:write authority.EXAMPLEBearer hc_live_…

Idempotency-KeyheaderRequired

ASCII string · 1–128Caller-generated stable key reused for retries of the same logical mutation.EXAMPLEpost-api-v2-commerce-products-request-001

X-Request-IDheaderOptional

stringOptional caller correlation identifier. The gateway emits the effective value on the response.

Content-DigestheaderRequired

stringRFC 9530 sha-256 digest of the exact transmitted request-body bytes.

Signature-InputheaderRequired

stringRFC 9421 sig1 input covering @method, @path, content-digest, content-type, and idempotency-key, with created, expires, nonce, keyid, and alg=ed25519.

SignatureheaderRequired

stringRFC 9421 sig1 Ed25519 signature made by an active key registered to the bearer client.

currencybodyRequired

uppercase asset or ISO currency codePrice denomination admitted by the merchant checkout policy.EXAMPLEUSD

descriptionbodyOptional

string · max 2000 · nullableOptional customer-visible description without credentials, regulated evidence, or executable content.Explicit null acceptedEXAMPLEOn-demand training with one year of access.

fulfillment_policybodyRequired

bounded objectTyped delivery kind, timing, and evidence requirements. It cannot assert that fulfillment occurred.EXAMPLE[object Object]

merchant_uuidbodyRequired

workspace merchant identifierActive or review-eligible merchant that will own the catalog product.EXAMPLEmerchant-01

metadatabodyOptional

bounded string map · max 20 entries · nullableOptional non-secret integration metadata. Keys and values are length-bounded and cannot carry customer evidence, URLs with credentials, or authority assertions.Explicit null acceptedEXAMPLE[object Object]

namebodyRequired

string · 2–160Customer-visible product name. It is validated as part of the request body before any operation is attempted.EXAMPLEHybrid Foundations Course

skubodyRequired

merchant-unique string · 1–96Stable merchant SKU used for reconciliation; case and whitespace are normalized under merchant policy.EXAMPLECOURSE-FOUNDATIONS

step_up_tokenbodyRequired

purpose-bound tokenFresh COMMERCE_PRODUCT_CREATION authorization bound to merchant, SKU, price, currency, and fulfillment policy.EXAMPLEhcsu_…

tax_codebodyOptional

merchant policy code · max 64 · nullableOptional tax classification reference; Commerce does not calculate or attest tax compliance merely because a code is stored.Explicit null acceptedEXAMPLEDIGITAL_SERVICE

unit_pricebodyRequired

positive exact decimal stringCanonical unit price represented without binary floating-point conversion.EXAMPLE125.00

REQUEST

JSON body example

{
  "currency": "USD",
  "description": "example-description",
  "fulfillment_policy": "example-fulfillment-policy",
  "merchant_uuid": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "metadata": "example-metadata",
  "name": "example-name",
  "sku": "example-sku",
  "step_up_token": "example-step-up-token",
  "tax_code": "example-tax-code",
  "unit_price": "100.00"
}

RESPONSES

Status and payload examples

201A merchant-owned DRAFT product with canonical price, fulfillment policy, and immutable creation commitment is returned; no checkout, invoice, payment, or fulfillment is created.Mutation completed · JSON RESPONSE+
{}
INTEGRATION DECISION
CALLER ACTION
Accept the returned representation or receipt, then re-read product using the canonical identifier returned by this operation.
RETRY SAFETY
Do not repeat a successful mutation merely to confirm it. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Persist returned identifiers, versions, commitments, and receipts. Re-read the merchant or product version, invoice and linked payment-request state, and the exact network-scoped wallet projection before retrying with the same idempotency key and byte-equivalent request. Invoice state alone is not payment, settlement, or fulfillment finality.
400The merchant, SKU, name, description, exact price, currency, tax code, fulfillment policy, metadata, step-up token, signature, or idempotency key is malformed.Request must change · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Rebuild the request from the live OpenAPI operation and correct the rejected method, media type, header, parameter, or body field.
RETRY SAFETY
Do not retry the same invalid request. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Compare the submitted values with the documented constraints before another call. Re-read the merchant or product version, invoice and linked payment-request state, and the exact network-scoped wallet projection before retrying with the same idempotency key and byte-equivalent request. Invoice state alone is not payment, settlement, or fulfillment finality.
ESCALATE WHEN
Escalate when a protected transition remains ambiguous after authoritative Commerce, Payments, and operational-wallet reconciliation. Commerce settlement execution remains frozen; never manufacture value movement by combining invoice, payment, or wallet calls.
401The bearer credential is missing, expired, or invalid.Authentication required · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Discard the rejected credential, complete the documented authentication or reassertion flow, and rebuild any request signature with fresh timestamps and nonces.
RETRY SAFETY
Retry only with a newly valid credential and fresh replay-protection values. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Assume the outcome is unknown only when the connection failed after transmission; otherwise authentication failed before domain work. Re-read the merchant or product version, invoice and linked payment-request state, and the exact network-scoped wallet projection before retrying with the same idempotency key and byte-equivalent request. Invoice state alone is not payment, settlement, or fulfillment finality.
ESCALATE WHEN
Escalate when a protected transition remains ambiguous after authoritative Commerce, Payments, and operational-wallet reconciliation. Commerce settlement execution remains frozen; never manufacture value movement by combining invoice, payment, or wallet calls.
403The principal lacks commerce:write, merchant catalog authority, or fresh COMMERCE_PRODUCT_CREATION authorization.Authority or policy denied · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Verify the exact scope, tenant or workspace membership, owner boundary, step-up purpose, feature policy, and resource eligibility. Never broaden authority automatically.
RETRY SAFETY
Do not retry until the missing authority or policy condition has been deliberately resolved with least privilege.
STATE RECONCILIATION
Confirm the caller and resource resolve to the same authority boundary for workspace-isolated merchant profiles, catalog publication, invoices, linked payment requests, and verify-only rotational-wallet observations.
ESCALATE WHEN
Escalate when a protected transition remains ambiguous after authoritative Commerce, Payments, and operational-wallet reconciliation. Commerce settlement execution remains frozen; never manufacture value movement by combining invoice, payment, or wallet calls.
409The SKU, merchant lifecycle, catalog policy, or Idempotency-Key conflicts with retained state.State reconciliation required · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Stop the mutation sequence and fetch the latest authoritative resource, lifecycle state, version, ETag, reservation, or existing idempotency result.
RETRY SAFETY
Retry only after reconciling the conflict. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Re-read the merchant or product version, invoice and linked payment-request state, and the exact network-scoped wallet projection before retrying with the same idempotency key and byte-equivalent request. Invoice state alone is not payment, settlement, or fulfillment finality.
ESCALATE WHEN
Escalate when a protected transition remains ambiguous after authoritative Commerce, Payments, and operational-wallet reconciliation. Commerce settlement execution remains frozen; never manufacture value movement by combining invoice, payment, or wallet calls.
503Commerce catalog, merchant policy, currency, fulfillment, or evidence ownership is unavailable; no product is created.Dependency unavailable or outcome uncertain · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Preserve the exact request and treat the outcome as uncertain until authoritative state proves whether it committed.
RETRY SAFETY
Reconcile before retrying. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions. Use bounded backoff with jitter.
STATE RECONCILIATION
Re-read the merchant or product version, invoice and linked payment-request state, and the exact network-scoped wallet projection before retrying with the same idempotency key and byte-equivalent request. Invoice state alone is not payment, settlement, or fulfillment finality.
ESCALATE WHEN
Escalate when a protected transition remains ambiguous after authoritative Commerce, Payments, and operational-wallet reconciliation. Commerce settlement execution remains frozen; never manufacture value movement by combining invoice, payment, or wallet calls.

OPERATIONAL NOTES

Security and lifecycle guarantees

  • Create a reusable product with pricing, currency, fulfillment, and metadata. Authoritative owner: commerce-service.
  • The Rust gateway validates the public contract and routes only to the authoritative owner; clients never address internal services directly.
  • Mutations are retry-safe only when the same Idempotency-Key and canonical request body are reused.
  • The tables and examples are derived from the current gateway source OpenAPI. Re-fetch the deployed OpenAPI before execution; deployment status is shown separately on this page.
  • Only parameters present in the OpenAPI operation are accepted; undocumented query keys fail closed with HTTP 422.
DOCUMENTATION STATUS

This route is implemented in canonical gateway source and appears in the production OpenAPI snapshot observed 2026-09-11T06:35:11.572Z. Authentication, tenant, feature, venue, and market policy still apply.

Verify the exact production OpenAPI operation Return to the V2 directory