Elastic Path · Schema

Subscriptions Introduction

Elastic Path Subscriptions allows you to offer your customers subscriptions and recurring billing for your plans and services. Elastic Path Subscriptions gives you the flexibility to pause, update, or reactivate your subscription offerings, change subscription cycles and apply discounts.

CommerceHeadless CommerceComposable CommerceeCommerceB2BProductsCatalogsOrdersPromotionsSubscriptionsPayments
View JSON Schema on GitHub

JSON Schema

subscriptions.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/elastic-path/main/json-schema/subscriptions.json",
  "title": "Subscriptions Introduction",
  "description": "Elastic Path Subscriptions allows you to offer your customers subscriptions and recurring billing for your plans and services. Elastic Path Subscriptions gives you the flexibility to pause, update, or reactivate your subscription offerings, change subscription cycles and apply discounts.",
  "version": "26.0427.7514362",
  "$defs": {
    "ActivePricingOption": {
      "type": "boolean",
      "description": "Whether a pricing option is active on a subscription using that offering. The `active_pricing_option` attribute is null if a pricing option is not active in a subscription.",
      "example": true
    },
    "ActivePlan": {
      "type": "boolean",
      "description": "Whether a plan is active on a subscription using that offering. The `active_plan` attribute is null if a plan is not active in a subscription.",
      "example": true
    },
    "ExternalRef": {
      "description": "A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.",
      "type": "string",
      "example": "abc123",
      "maxLength": 2048
    },
    "ExternalRefUpdate": {
      "description": "A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.",
      "type": "string",
      "example": "abc123",
      "maxLength": 2048,
      "nullable": true
    },
    "SubscriptionType": {
      "type": "string",
      "example": "subscription",
      "enum": [
        "subscription"
      ]
    },
    "ProrationPolicyType": {
      "type": "string",
      "example": "subscription_proration_policy",
      "enum": [
        "subscription_proration_policy"
      ]
    },
    "SubscriptionDunningRuleType": {
      "type": "string",
      "example": "subscription_dunning_rule",
      "enum": [
        "subscription_dunning_rule"
      ]
    },
    "SubscriptionFeatureType": {
      "type": "string",
      "example": "subscription_feature",
      "enum": [
        "subscription_feature"
      ]
    },
    "SubscriptionOfferingType": {
      "type": "string",
      "example": "subscription_offering",
      "enum": [
        "subscription_offering"
      ]
    },
    "SubscriptionOfferingFeatureType": {
      "type": "string",
      "example": "subscription_offering_feature",
      "enum": [
        "subscription_offering_feature"
      ]
    },
    "SubscriptionOfferingPlanType": {
      "type": "string",
      "example": "subscription_offering_plan",
      "enum": [
        "subscription_offering_plan"
      ]
    },
    "SubscriptionOfferingPricingOptionType": {
      "type": "string",
      "example": "subscription_offering_pricing_option",
      "enum": [
        "subscription_offering_pricing_option"
      ]
    },
    "SubscriptionJobType": {
      "type": "string",
      "example": "subscription_job",
      "enum": [
        "subscription_job"
      ]
    },
    "SubscriptionImportType": {
      "type": "string",
      "example": "subscription_import",
      "enum": [
        "subscription_import"
      ]
    },
    "SubscriptionImportErrorType": {
      "type": "string",
      "example": "subscription_import_error",
      "enum": [
        "subscription_import_error"
      ]
    },
    "SubscriptionImportError": {
      "type": "object",
      "required": [
        "id",
        "type",
        "meta"
      ],
      "properties": {
        "id": {
          "$ref": "#/components/schemas/UUID"
        },
        "type": {
          "$ref": "#/components/schemas/SubscriptionImportErrorType"
        },
        "meta": {
          "$ref": "#/components/schemas/SubscriptionImportErrorMeta"
        }
      }
    },
    "SubscriptionImportErrorMeta": {
      "type": "object",
      "required": [
        "owner",
        "timestamps",
        "error",
        "field",
        "line_number"
      ],
      "properties": {
        "owner": {
          "type": "string",
          "example": "store"
        },
        "timestamps": {
          "$ref": "#/components/schemas/Timestamps"
        },
        "error": {
          "type": "string",
          "example": "offering name cannot be empty"
        },
        "field": {
          "type": "string",
          "example": "name"
        },
        "line_number": {
          "type": "integer",
          "description": "The line in the imported JSONL file at which the validation error occurred. Starts from 1.",
          "example": 123
        },
        "external_ref": {
          "$ref": "#/components/schemas/ExternalRef"
        }
      }
    },
    "SubscriptionInvoiceType": {
      "description": "This represents the type of resource object being returned. Always `subscription_invoice`.",
      "type": "string",
      "example": "subscription_invoice",
      "enum": [
        "subscription_invoice"
      ]
    },
    "SubscriptionInvoicePaymentType": {
      "type": "string",
      "description": "This represents the type of resource object being returned. Always `subscription_invoice_payment`.",
      "example": "subscription_invoice_payment",
      "enum": [
        "subscription_invoice_payment"
      ]
    },
    "SubscriptionInvoicePaymentRefundType": {
      "type": "string",
      "description": "This represents the type of resource object being returned. Always `subscription_invoice_payment_refund`.",
      "example": "subscription_invoice_payment_refund",
      "enum": [
        "subscription_invoice_payment_refund"
      ]
    },
    "Links": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/Link"
      }
    },
    "Link": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/LinkURI"
        },
        {
          "$ref": "#/components/schemas/LinkObject"
        }
      ]
    },
    "LinkURI": {
      "type": "string",
      "format": "uri",
      "example": "http://example.com/articles/1/comments",
      "nullable": true
    },
    "LinkObject": {
      "type": "object",
      "properties": {
        "href": {
          "type": "string",
          "format": "uri",
          "example": "http://example.com/articles/1/comments"
        },
        "title": {
          "type": "string",
          "example": "Comments"
        },
        "describedby": {
          "type": "string",
          "format": "uri",
          "example": "http://example.com/schemas/article-comments"
        }
      }
    },
    "Timestamps": {
      "required": [
        "created_at",
        "updated_at"
      ],
      "properties": {
        "updated_at": {
          "description": "The date and time a resource was updated.",
          "type": "string",
          "example": "2017-01-10T11:41:19.244842Z"
        },
        "created_at": {
          "description": "The date and time a resource was created.",
          "type": "string",
          "example": "2017-01-10T11:41:19.244842Z"
        }
      }
    },
    "Status": {
      "type": "string",
      "description": "The status of a subscription, either `active` or `inactive`.",
      "example": "active",
      "enum": [
        "active",
        "inactive"
      ],
      "x-go-type": "model.SubscriptionStatus",
      "x-go-type-import": {
        "name": "model",
        "path": "gitlab.elasticpath.com/commerce-cloud/subscriptions.svc/internal/domain/model"
      }
    },
    "RelationshipsRequest": {
      "description": "Enumerates a list of resources that are related.",
      "required": [
        "data"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/RelationshipData"
          }
        }
      }
    },
    "Relationships": {
      "description": "Relationships are established between different subscription entities. For example, a plan and a pricing option are related to an offering, as both are attached to it.",
      "additionalProperties": {
        "$ref": "#/components/schemas/Relationship"
      },
      "example": {
        "pricing-options": {
          "links": {
            "related": "/offerings/:offering-id/pricing-options",
            "self": "/offerings/:offering-id"
          },
          "data": {
            "type": "offering-pricing-option",
            "id": "625fe958-7b4b-40a0-a2c0-dbb8f31eec0d"
          }
        }
      }
    },
    "Relationship": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/SingleRelationship"
        },
        {
          "$ref": "#/components/schemas/ManyRelationship"
        }
      ]
    },
    "ManyRelationship": {
      "description": "The list of resources that are related.",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/RelationshipData"
          }
        },
        "links": {
          "$ref": "#/components/schemas/RelationshipLinks"
        }
      }
    },
    "SingleRelationship": {
      "description": "The subscription resource that is related.",
      "properties": {
        "data": {
          "$ref": "#/components/schemas/RelationshipData"
        },
        "links": {
          "$ref": "#/components/schemas/RelationshipLinks"
        }
      }
    },
    "RelationshipData": {
      "type": "object",
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "$ref": "#/components/schemas/UUID"
        },
        "type": {
          "type": "string",
          "description": "This represents the type of resource being returned.",
          "example": "11111111-2222-3333-4444-555555555555"
        }
      }
    },
    "RelationshipLinks": {
      "description": "Links are used to allow you, as an API consumer, to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there aren\u2019t enough entities for a project to fill multiple pages. In this situation, we return some defaults, instead of expecting you to",
      "type": "object",
      "properties": {
        "related": {
          "type": "string",
          "example": "foo.bar"
        }
      }
    },
    "TimePeriod": {
      "description": "A period of time between a start and end point.",
      "required": [
        "start",
        "end"
      ],
      "properties": {
        "start": {
          "description": "The date and time a billing period started.",
          "type": "string",
          "format": "date-time",
          "example": "2017-07-21T17:32:28Z"
        },
        "end": {
          "description": "The date and time a billing period ended.",
          "type": "string",
          "format": "date-time",
          "example": "2017-07-21T17:32:28Z"
        }
      }
    },
    "SingleCurrencyPrice": {
      "description": "A price in a single currency.",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "description": "The three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in uppercase, associated with a price.",
          "example": "USD",
          "maxLength": 1024
        },
        "amount": {
          "type": "integer",
          "format": "int64",
          "description": "The value as a whole number of the currency's smallest subdivision.",
          "example": 100
        },
        "includes_tax": {
          "type": "boolean",
          "description": "Whether the amount includes any taxes.",
          "example": true
        }
      },
      "example": {
        "currency": "USD",
        "amount": 100,
        "includes_tax": false
      }
    },
    "PriceUnits": {
      "type": "object",
      "description": "The timeframe during which the plan price is applicable. For example, for a streaming service, the price is $12.99 and the `unit` is `months` and the `amount` is `1`. In other words, the streaming service is available for $12.99 a month. You may want to specify a unit price if you have many plans th",
      "required": [
        "unit",
        "amount"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "description": "A unit of time.",
          "enum": [
            "day",
            "month"
          ],
          "example": "day",
          "x-go-type": "model.PriceUnitsUnit",
          "x-go-type-import": {
            "name": "model",
            "path": "gitlab.elasticpath.com/commerce-cloud/subscriptions.svc/internal/domain/model"
          }
        },
        "amount": {
          "type": "integer",
          "description": "The number of days or months the period covers.",
          "example": 7,
          "minimum": 1
        }
      }
    },
    "NullablePriceUnits": {
      "type": "object",
      "nullable": true,
      "description": "The timeframe during which the plan price is applicable. For example, for a streaming service, the price is $12.99 and the `unit` is `months` and the `amount` is `1`. In other words, the streaming service is available for $12.99 a month. You may want to specify a unit price if you have many plans th",
      "required": [
        "unit",
        "amount"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "description": "A unit of time, either days or months.",
          "enum": [
            "day",
            "month"
          ],
          "example": "day",
          "x-go-type": "model.PriceUnitsUnit",
          "x-go-type-import": {
            "name": "model",
            "path": "gitlab.elasticpath.com/commerce-cloud/subscriptions.svc/internal/domain/model"
          }
        },
        "amount": {
          "type": "integer",
          "description": "The number of days or months the period covers.",
          "example": 7,
          "minimum": 1
        }
      }
    },
    "Price": {
      "additionalProperties": {
        "type": "object",
        "description": "The base price.",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "example": 100,
            "description": "The value as a whole number of the currency's smallest subdivision."
          },
          "includes_tax": {
            "type": "boolean",
            "example": true,
            "description": "Indicates whether the amount includes any taxes."
          }
        }
      },
      "example": {
        "USD": {
          "amount": 100,
          "includes_tax": false
        },
        "GBP": {
          "amount": 90,
          "includes_tax": true
        }
      }
    },
    "NullablePrice": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "example": 100,
            "description": "The value as a whole number of the currency's smallest subdivision."
          },
          "includes_tax": {
            "type": "boolean",
            "example": true,
            "description": "Whether the amount includes any taxes."
          }
        },
        "nullable": true
      },
      "example": {
        "USD": {
          "amount": 100,
          "includes_tax": false
        },
        "GBP": {
          "amount": 90,
          "includes_tax": true
        }
      },
      "nullable": true
    },
    "OfferingPlanPrices": {
      "type": "object",
      "description": "A list of plan prices for each of its pricing options.",
      "additionalProperties": {
        "$ref": "#/components/schemas/OfferingPlanPriceForPricingOption"
      }
    },
    "OfferingPlanPriceForPricingOption": {
      "properties": {
        "price": {
          "$ref": "#/components/schemas/Price"
        },
        "display_price": {
          "$ref": "#/components/schemas/DisplayPrice"
        }
      }
    },
    "DisplayPrice": {
      "properties": {
        "without_tax": {
          "$ref": "#/components/schemas/PriceFormatting"
        },
        "with_tax": {
          "$ref": "#/components/schemas/PriceFormatting"
        },
        "tax": {
          "description": "Tax component when itemized (for example on subscription invoices). Omitted for catalog prices\nthat only expose with/without tax.\n",
          "$ref": "#/components/schemas/PriceFormatting"
        }
      },
      "example": {
        "without_tax": {
          "amount": 100,
          "currency": "USD",
          "formatted": "$1.00"
        },
        "with_tax": {
          "amount": 110,
          "currency": "USD",
          "formatted": "$1.10"
        },
        "tax": {
          "amount": 10,
          "currency": "USD",
          "formatted": "$0.10"
        }
      }
    },
    "PriceFormatting": {
      "required": [
        "amount",
        "currency",
        "formatted"
      ],
      "properties": {
        "amount": {
          "type": "integer",
          "format": "int64",
          "example": 100,
          "description": "The unformatted amount for the objects."
        },
        "currency": {
          "type": "string",
          "format": "string",
          "example": "USD",
          "description": "The three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in uppercase, associated with a price."
        },
        "formatted": {
          "type": "string",
          "format": "string",
          "example": "$1.00",
          "description": "The formatted amount for the objects."
        }
      }
    },
    "Feature": {
      "required": [
        "type",
        "attributes",
        "meta"
      ],
      "properties": {
        "id": {
          "$ref": "#/components/schemas/UUID"
        },
        "type": {
          "$ref": "#/components/schemas/SubscriptionFeatureType"
        },
        "attributes": {
          "$ref": "#/components/schemas/FeatureResponseAttributes"
        },
        "meta": {
          "$ref": "#/components/schemas/FeatureMeta"
        }
      }
    },
    "FeatureMeta": {
      "readOnly": true,
      "required": [
        "owner",
        "timestamps"
      ],
      "properties": {
        "owner": {
          "$ref": "#/components/schemas/OwnerMeta"
        },
        "timestamps": {
          "$ref": "#/components/schemas/Timestamps"
        }
      }
    },
    "FeatureCreate": {
      "required": [
        "type",
        "attributes"
      ],
      "properties": {
        "type": {
          "$ref": "#/components/schemas/SubscriptionFeatureType"
        },
        "attributes": {
          "$ref": "#/components/schemas/FeatureAttributes"
        }
      }
    },
    "FeatureUpdate": {
      "required": [
        "id",
        "type",
        "attributes"
      ],
      "properties": {
        "id": {
          "$ref": "#/components/schemas/UUID"
        },
        "type": {
          "$ref": "#/components/schemas/SubscriptionFeatureType"
        },
        "attributes": {
          "$ref": "#/components/schemas/FeatureUpdateAttributes"
        }
      }
    },
    "OfferingFeatureCreate": {
      "required": [
        "type",
        "attributes"
      ],
      "properties": {
        "type": {
          "$ref": "#/components/schemas/SubscriptionOfferingFeatureType"
        },
        "attributes": {
          "$ref": "#/components/schemas/FeatureAttributes"
        }
      }
    },
    "FeatureResponseAttributes": {
      "allOf": [
        {
          "$ref": "#/components/schemas/FeatureAttributes"
        }
      ]
    },
    "FeatureTag": {
      "type": "string",
      "description": "A tag to add to the customer's account when entitled to the feature.",
      "minLength": 1,
      "maxLength": 64,
      "pattern": "^[0-9A-Za-z_-]+$",
      "example": "digital_library_access"
    },
    "FeatureAccessAttributes": {
      "required": [
        "type",
        "tag"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "access"
          ],
          "example": "access"
        },
        "tag": {
          "$ref": "#/components/schemas/FeatureTag"
        }
      }
    },
    "FeaturePromotion": {
      "required": [
        "name",
        "tag"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the feature.",
          "minLength": 3,
          "maxLength": 1024,
          "example": "Digital library access"
        },
        "tag": {
          "$ref": "#/components/schemas/FeatureTag"
        },
        "promotion_id": {
          "$ref": "#/components/schemas/UUID"
        }
      }
    },
    "FeaturePromotionAttributes": {
      "required": [
        "type",
        "promotions"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "promotion"
          ],
          "example": "promotion"
        },
        "promotions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/FeaturePromotion"
          }
        }
      }
    },
    "FeatureUsageAttributes": {
      "required": [
        "type",
        "tag",
        "label",
        "default_value"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "usage"
          ],
          "example": "usage"
        },
        "tag": {
          "$ref": "#/components/schemas/FeatureTag"
        },
        "label": {
          "type": "string",
          "description": "The property that has a usage limit.",
          "minLength": 3,
          "maxLength": 1024,
          "example": "Digital downloads"
        },
        "default_value": {
          "type": "integer",
          "description": "The default initial value",
          "example": 10
        }
      }
    },
    "FeatureConfiguration": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "The type of feature, one of access, promotion or usage.",
          "enum": [
            "access",
            "promotion",
            "usage"
          ],
          "example": "access",
          "x-go-type": "string"
        }
      },
      "oneOf": [
        {
          "$ref": "#/components/schemas/FeatureAccessAttributes"
        },
        {
          "$ref": "#/components/schemas/FeaturePromotionAttributes"
        },
        {
          "$ref": "#/components/schemas/FeatureUsageAttributes"
        }
      ],
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "access": "#/components/schemas/FeatureAccessAttributes",
          "promotion": "#/components/schemas/FeaturePromotionAttributes",
          "usage": "#/components/schemas/FeatureUsageAttributes"
        }
      }
    },
    "FeatureAttributes": {
      "required": [
        "name",
        "configuration"
      ],
      "properties": {
        "external_ref": {
          "$ref": "#/components/schemas/ExternalRef"
        },
        "name": {
          "type": "string",
          "description": "The name of the feature.",
          "minLength": 3,
          "maxLength": 1024,
          "example": "Digital library access"
        },
        "description": {
          "type": "string",
          "description": "The feature description to display to customers.",
          "maxLength": 1024,
          "example": "Access to over 100 ebooks via the digital library."
        },
        "configuration": {
          "$ref": "#/components/schemas/FeatureConfiguration"
        }
      }
    },
    "FeatureUpdateAttributes": {
      "properties": {
        "external_ref": {
          "$ref": "#/components/schemas/ExternalRefUpdate"
        },
        "name": {
          "type": "string",
          "description": "The name of the feature.",
          "minLength": 3,
          "maxLength": 1024,
          "example": "Digital library access"
        },
        "description": {
          "type": "string",
          "description": "The feature description to display to customers.",
          "maxLength": 1024,
          "example": "Access to over 100 ebooks via the digital library.",
          "nullable": true
        },
        "configuration": {
          "$ref": "#/components/schemas/FeatureConfiguration"
        }
      }
    },
    "PlanMeta": {
      "readOnly": true,
      "required": [
        "owner",
        "timestamps"
      ],
      "properties": {
        "prices": {
          "$ref": "#/components/schemas/OfferingPlanPrices"
        },
        "display_price": {
          "$ref": "#/components/schemas/DisplayPrice"
        },
        "owner": {
          "$ref": "#/components/schemas/OwnerMeta"
        },
        "timestamps": {
          "$ref": "#/components/schemas/Timestamps"
        },
        "active_plan": {
          "$ref": "#/components/schemas/ActivePlan"
        }
      }
    },
    "OfferingPlanCreate": {
      "required": [
        "type",
        "attributes"
      ],
      "properties": {
        "type": {
          "$ref": "#/components/schemas/SubscriptionOfferingPlanType"
        },
        "attributes": {
          "$ref": "#/components/schemas/OfferingPlanAttributes"
        },
        "relationships": {
          "$ref": "#/components/schemas/Relationships"
        }
      }
    },
    "OfferingPlanAttributes": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PlanAttributes"
        },
        {
          "$ref": "#/components/schemas/OfferingPlanExtraAttributes"
        }
      ]
    },
    "OfferingPlanResponseAttributes": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PlanResponseAttributes"
        },
        {
          "$ref": "#/components/schemas/OfferingPlanResponseExtraAttributes"
        }
      ]
    },
    "OfferingPlanExtraAttributes": {
      "properties": {
        "feature_configurations": {
          "type": "object",
          "description": "A map of configurations indicating which features are available for the plan",
          "additionalProperties": {
            "$ref": "#/components/schemas/FeaturePlanConfiguration"
          }
        }
      }
    },
    "OfferingPlanResponseExtraAttributes": {
      "required": [
        "feature_configurations"
      ],
      "properties": {
        "feature_configurations": {
          "type": "object",
          "description": "A map of configurations indicating which features are available for the plan",
          "additionalProperties": {
            "$ref": "#/components/schemas/FeaturePlanConfiguration"
          }
        }
      }
    },
    "PlanResponseAttributes": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PlanAttributes"
        },
        {
          "$ref": "#/components/schemas/Timestamps"
        }
      ]
    },
    "PlanAttributes": {
      "required": [
        "name"
      ],
      "properties": {
        "external_ref": {
          "$ref": "#/components/schemas/ExternalRef"
        },
        "name": {
          "type": "string",
          "description": "The name of the plan.",
          "minLength": 3,
          "maxLength": 1024,
          "example": "Magazine"
        },
        "description": {
          "type": "string",
          "description": "The plan or service description to display to customers.",
          "maxLength": 1024,
          "example": "A lovely magazine that is published every month."
        },
        "sku": {
          "type": "string",
          "description": "A stock keeping unit for the plan, if appropriate.",
          "maxLength": 1024,
          "example": "MAGAZINE1"
        },
        "main_image": {
          "type": "string",
          "format": "uri",
          "description": "A URL from which an image or file for the plan can be fetched. You can either upload your images and files to Commerce using the Commerce Files API or you can use your own content delivery network. If you are using the Commerce Files API, use [**Create a File**](/docs/api/pxm/files/create-a-file) to upload your file and return an HREF link in the response. An extensive range of [**media and file extensions**](/docs/api/pxm/files/files-service-api) are supported.",
          "maxLength": 1024,
          "example": "https://magazine.com/cover.jpg"
        },
        "price": {
          "$ref": "#/components/schemas/Price"
        },
        "price_units": {
          "$ref": "#/components/schemas/PriceUnits"
        }
      }
    },
    "OfferingPlanUpdateAttributes": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PlanUpdateAttributes"
        },
        {
          "$ref": "#/components/schemas/OfferingPlanUpdateExtraAttributes"
        }
      ]
    },
    "OfferingPlanUpdateExtraAttributes": {
      "properties": {
        "feature_configurations": {
          "type": "object",
          "description": "A map of configurations indicating which features are available for the plan",
          "additionalProperties": {
            "$ref": "#/components/schemas/FeaturePlanConfigurationUpdate"
          }
        }
      }
    },
    "PlanUpdateAttributes": {
      "properties": {
        "external_ref": {
          "$ref": "#/components/schemas/ExternalRefUpdate"
        },
        "name": {
          "type": "string",
          "description": "The name of the plan.",
          "minLength": 3,
          "maxLength": 1024,
          "example": "Magazine"
        },
        "description": {
          "type": "string",
          "description": "The plan or service description to display to customers.",
          "maxLength": 1024,
          "example": "A lovely magazine that is published every month.",
          "nullable": true
        },
        "sku": {
          "type": "string",
          "description": "A stock keeping unit for the plan, if appropriate.",
          "maxLength": 1024,
          "example": "MAGAZINE1",
          "nullable": true
        },
        "main_image": {
          "type": "string",
          "format": "uri",
          "description": "A URL from which an image or file for the plan can be fetched. You can either upload your images and files to Commerce using the Commerce Files API or you can use your own content delivery network. If you are using the Commerce Files API, use [**Create a File**](/docs/api/pxm/files/create-a-file) to upload your file and return an HREF link in the response. An extensive range of [**media and file extensions**](/docs/api/pxm/files/files-service-api) are supported.",
          "maxLength": 1024,
          "example": "https://magazine.com/cover.jpg",
          "nullable": true
        },
        "price": {
          "$ref": "#/components/schemas/NullablePrice"
        },
        "price_units": {
          "$ref": "#/components/schemas/NullablePriceUnits"
        }
      }
    },
    "DunningRule": {
      "required": [
        "type",
        "attributes",
        "meta"
      ],
      "properties": {
        "id": {
          "$ref": "#/components/schemas/UUID"
        },
        "type": {
          "$ref": "#/components/schemas/SubscriptionDunningRuleType"
        },
        "attributes": {
          "$ref": "#/components/schemas/DunningRuleAttributes"
        },
        "meta": {
          "$ref": "#/components/schemas/DunningRuleMeta"
        }
      }
    },
    "DunningRuleMeta": {
      "readOnly": true,
      "required": [
        "owner",
        "timestamps"
      ],
      "properties": {
        "owner": {
          "$ref": "#/components/schemas/OwnerMeta"
        },
        "timestamps": {
          "$ref": "#/components/schemas/Timestamps"
        }
      }
    },
    "DunningRuleCreate": {
      "required": [
        "type",
        "attributes"
      ],
      "properties": {
        "type": {
          "$ref": "#/components/schemas/SubscriptionDunningRuleType"
        },
        "attributes": {
          "$ref": "#/components/schemas/DunningRuleAttributes"
        }
      }
    },
    "DunningRuleUpdate": {
      "required": [
        "id",
        "type",
        "attributes"
      ],
      "properties": {
        "id": {
          "$ref": "#/components/schemas/UUID"
        },
        "type": {
          "$ref": "#/components/schemas/SubscriptionDunningRu

# --- truncated at 32 KB (147 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/json-schema/subscriptions.json