{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-consent-subscription-bulk-request-schema.json",
  "title": "ConsentSubscriptionBulkRequest",
  "description": "Bulk request for updating multiple consent subscriptions",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-shopper-consents-api-openapi.yml#/components/schemas/ConsentSubscriptionBulkRequest",
  "type": "object",
  "required": [
    "subscriptions"
  ],
  "properties": {
    "subscriptions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ConsentSubscriptionRequest"
      },
      "minItems": 1,
      "maxItems": 50,
      "description": "Array of subscription consent updates to process"
    }
  },
  "$defs": {
    "ChannelType": {
      "type": "string",
      "enum": [
        "email",
        "sms",
        "whatsapp"
      ]
    },
    "ConsentStatus": {
      "type": "string",
      "description": "The consent status of the subscription as supplied or recorded by this system",
      "enum": [
        "opt_in",
        "opt_out"
      ]
    },
    "ConsentSubscriptionRequest": {
      "type": "object",
      "description": "Consent subscription update request",
      "required": [
        "subscriptionId",
        "contactPointValue",
        "channel",
        "status"
      ],
      "properties": {
        "subscriptionId": {
          "$ref": "#/$defs/SubscriptionId"
        },
        "contactPointValue": {
          "$ref": "#/$defs/ContactPointValue"
        },
        "channel": {
          "$ref": "#/$defs/ChannelType"
        },
        "status": {
          "$ref": "#/$defs/ConsentStatus"
        }
      }
    },
    "ContactPointValue": {
      "type": "string",
      "minLength": 3,
      "maxLength": 320,
      "description": "The customer's contact point value, polymorphic based on the channel type as below:\n- `sms` - Subject's phone number in E.164 format, ex: `+1 424 535 3546`\n- `email` - Subject's email address in RFC 5321 & RFC 5322 format, ex: `jack.sparrow@salesforce.com`\n"
    },
    "SubscriptionId": {
      "type": "string",
      "description": "Identifier for the communication subscription",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    }
  }
}