{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-oms-meta-data-schema.json",
  "title": "OmsMetaData",
  "description": "Configuration data from Order Management (OMS) that the storefront requires to render cancel and return experiences.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-shopper-orders-api-openapi.yml#/components/schemas/OmsMetaData",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "cancelReasonCodes",
    "returnReasonCodes"
  ],
  "properties": {
    "cancelReasonCodes": {
      "description": "The reason codes available for cancelling an order. The server applies the reason marked with `default` when no reason is supplied on the cancel request.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/OmsReasonCode"
      }
    },
    "returnReasonCodes": {
      "description": "The reason codes available for returning order items. The server applies the reason marked with `default` when no reason is supplied on a returned item.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/OmsReasonCode"
      }
    }
  },
  "$defs": {
    "OmsReasonCode": {
      "description": "A single reason code configured in Order Management (OMS).",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "reason",
        "default"
      ],
      "properties": {
        "reason": {
          "description": "The reason value as configured in OMS.",
          "type": "string",
          "maxLength": 256
        },
        "default": {
          "description": "Whether this reason is the default that the server uses when no reason is supplied on a cancel or return request.",
          "type": "boolean"
        }
      }
    }
  }
}