channel.package.upsert

Mirror a marketplace package (status, cargo, invoice, estimate/actual, supersession) onto its Mozaik order — runtime-issued.

Payload

fieldtyperequirednotes
packageIdstring (/^pkg_[a-zA-Z0-9]{1,32}$/)yes
orderIdstring (/^ord_[a-zA-Z0-9]{1,32}$/)yes
channelstring (/^[a-z0-9_]{2,24}$/)yes
extensionIdconst "manual" | string (/^[a-z0-9-]+\.[a-z0-9-]+$/)yes
externalPackageIdstring (≤64 chars)yes
externalOrderNostring (≤64 chars)yes
statusstring (≤40 chars)yes
statusNorm"new" | "preparing" | "invoiced" | "shipped" | "delivered" | "undelivered" | "cancelled" | "unsupplied" | "returned" | "split"yes
createdBystring (≤24 chars)no
supersededBystring (/^pkg_[a-zA-Z0-9]{1,32}$/) | nullno
invoiceStatus"none" | "required" | "sent" | "failed"no
invoiceRefobject | nullno
commissionBpinteger (0..10000) | nullno
estimateobjectno
actualobjectno
agreedDeliveryAtstring | nullno
cargoobjectno
linesarray<object> (≤50)no
payloadobjectno
labelZplstring (≤65536 chars) | nullno
externalModifiedAtstring | nullno

JSON Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "packageId": {
      "type": "string",
      "pattern": "^pkg_[a-zA-Z0-9]{1,32}$"
    },
    "orderId": {
      "type": "string",
      "pattern": "^ord_[a-zA-Z0-9]{1,32}$"
    },
    "channel": {
      "type": "string",
      "pattern": "^[a-z0-9_]{2,24}$"
    },
    "extensionId": {
      "anyOf": [
        {
          "type": "string",
          "const": "manual"
        },
        {
          "type": "string",
          "pattern": "^[a-z0-9-]+\\.[a-z0-9-]+$"
        }
      ]
    },
    "externalPackageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "externalOrderNo": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "status": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "statusNorm": {
      "type": "string",
      "enum": [
        "new",
        "preparing",
        "invoiced",
        "shipped",
        "delivered",
        "undelivered",
        "cancelled",
        "unsupplied",
        "returned",
        "split"
      ]
    },
    "createdBy": {
      "type": "string",
      "maxLength": 24
    },
    "supersededBy": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^pkg_[a-zA-Z0-9]{1,32}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "invoiceStatus": {
      "type": "string",
      "enum": [
        "none",
        "required",
        "sent",
        "failed"
      ]
    },
    "invoiceRef": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "commissionBp": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        {
          "type": "null"
        }
      ]
    },
    "estimate": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "actual": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "agreedDeliveryAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "cargo": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "lines": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "payload": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "labelZpl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 65536
        },
        {
          "type": "null"
        }
      ]
    },
    "externalModifiedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "packageId",
    "orderId",
    "channel",
    "extensionId",
    "externalPackageId",
    "externalOrderNo",
    "status",
    "statusNorm"
  ],
  "additionalProperties": false
}
Generated from the live platform registries at build time — reference pages cannot go stale. Markdown variant: /reference/commands/channel.package.upsert.md