{"method":"POST","path":"https://api.revcent.com/v2/subscription_profiles/{subscription_profile_id}","summary":"Edit A Subscription Profile","description":"Edit a previously created subscription profile using the subscription profile ID. Only include the properties you wish to modify. For example, if you only want to modify the name of the subscription profile, then only include the name property in the request body.<br><br>Important: Modifying a subscription profiles' billing frequency will affect all subscriptions using this profile. Make sure to understand the billing frequency properties and how they work together before modifying the billing frequency of a subscription profile. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/EditSubscriptionProfile.md for an in-depth overview of this operation.","operationId":"EditSubscriptionProfile","parameters":[{"in":"path","name":"subscription_profile_id","description":"The subscription profile ID","required":true,"schema":{"type":"string","description":"A 20 character subscription profile ID.","minLength":20,"maxLength":20}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"description":"The subscription profile name. Must be unique across all subscription profiles.","type":"string"},"description":{"description":"The subscription profile description.","type":"string"},"enabled":{"description":"Whether the subscription profile is currently enabled.","type":"boolean"},"frequency":{"description":"The subscription billing frequency type. Unit: Renews every value and unit. I.e. Every 30 (value) days (unit). Calendar: Renews on the nth unit of every parent unit. I.e. On the 2nd (nth) week (unit) of every month (parent unit). Fiscal: Renews every standard or infrequent fiscal period. Standard: Renews quarterly. Infrequent: renews every nth quarter.<br><br>Note: If modifying frequency, the corresponding frequency settings must be present. For example, if changing frequency from unit to calendar, then the frequency_calendar object with the corresponding calendar billing cycle settings must be included in the request body.","type":"string","enum":["unit","calendar","fiscal"]},"frequency_unit":{"type":"object","additionalProperties":false,"description":"If frequency is 'unit', this defines the subscription billing frequency based on the unit and value. For example, if the frequency value is 30, and the frequency unit is 'days', then the subscription will renew every 30 days.<br><br>Important: If you wish to modify frequency unit settings, the 'frequency' property must be present in the request body and the value must be 'unit'. If the 'frequency' property is not present and its value is not 'unit', the frequency_unit settings will be ignored.","properties":{"unit":{"description":"The subscription billing frequency unit. This is used in conjunction with the frequency value to determine the subscription billing cycle.","type":"string","enum":["days","weeks","months","years"]},"value":{"description":"The subscription billing frequency value. This is used in conjunction with the frequency unit to determine the subscription billing cycle.","type":"integer"}},"required":["unit","value"]},"frequency_calendar":{"type":"object","additionalProperties":false,"description":"If frequency is 'calendar', this defines the subscription billing frequency based on the calendar unit and nth value. For example, if the frequency is 'calendar', and the calendar unit is 'day', and the nth value is 1, and the parent unit is 'month', then the subscription will renew on the 1st day of every month.<br><br>Important: If you wish to modify frequency calendar settings, the 'frequency' property must be present in the request body and the value must be 'calendar'. If the 'frequency' property is not present and not set to 'calendar', the frequency_calendar settings will be ignored.","properties":{"unit":{"description":"The subscription billing frequency calendar unit. This is used in conjunction with the nth value and parent to determine the subscription billing cycle.","type":"string","enum":["day","week","month"]},"value":{"description":"The subscription billing frequency nth value. This is used in conjunction with the calendar unit and parent to determine the subscription billing cycle.","type":"integer"},"parent":{"description":"The subscription billing frequency calendar parent unit. This is used in conjunction with the calendar unit and nth value to determine the subscription billing cycle.","type":"string","enum":["week","month","year"]}},"required":["unit","value","parent"]},"frequency_fiscal":{"type":"object","additionalProperties":false,"description":"If frequency is 'fiscal', this defines the subscription billing frequency based on the fiscal period type. <br><br>Important: If you wish to modify frequency fiscal settings, the 'frequency' property must be present in the request body and the value must be 'fiscal'. If the 'frequency' property is not present and not set to 'fiscal', the frequency_fiscal settings will be ignored.","properties":{"unit":{"description":"The subscription billing frequency fiscal unit. This is used in conjunction with the fiscal value and fiscal setting to determine the subscription billing cycle based on fiscal periods.","type":"string","enum":["quarter","year"]},"value":{"description":"The subscription billing frequency fiscal nth value. Only applies if the fiscal setting is set to 'infrequent'. For example, if the fiscal setting is set to 'infrequent', and the fiscal unit is quarter, and the fiscal value is 2, then the subscription will renew every 2nd quarter.","type":"integer"},"setting":{"description":"The subscription billing frequency fiscal period type. Standard fiscal periods renew quarterly or yearly. Infrequent fiscal periods renew every nth fiscal unit, based on the fiscal value.","type":"string","enum":["standard","infrequent"]}},"required":["unit","setting"]},"occurrences":{"type":"string","description":"Specify whether subscriptions associated with this profile should renew indefinitely or for a specific number of renewals. If set to specific, the subscription will renew for the number of times specified in the occurrences_value property. If set to indefinite, the subscription will continue to renew until suspended or cancelled. Default is indefinite.","enum":["indefinite","specific"]},"occurrences_value":{"type":"integer","description":"If the occurrences property is set to 'specific', the maximum number of times to renew subscriptions associated with this profile."},"overdue_limit":{"type":"integer","description":"The maximum number of overdue renewals a subscription associated with this profile can have before it is automatically suspended."},"prefer_gateway":{"type":"object","additionalProperties":false,"description":"","properties":{"enabled":{"description":"Whether to force the subscription to renew on the last successful transaction gateway. This will limit the subscription to renew on a single fixed gateway and ignore the subscription profiles' associated payment profile. For advanced users. Recommended set to False.","type":"boolean"},"lock_gateway":{"description":"If prefer_gateway.enabled = true, whether to force the subscription to renew only on the originating sales' successful transaction gateway. This will limit the subscription to renew on a single fixed gateway and ignore the subscription profiles' associated payment profile. For advanced users. Recommended set to False.","type":"boolean"},"max":{"description":"If prefer_gateway.enabled = true, the maximum number of times to use the preferred gateway for renewals of subscriptions associated with this profile. If the preferred gateway has been used for the number of times specified in the max property, RevCent will attempt to process subsequent renewals using the subscription profiles' associated payment profile.","type":"integer"}}},"shipping_profile":{"type":"string","description":"A 20 character shipping profile ID. Optional. Meant for granting a specific shipping rate for all subscriptions associated with this subscription profile. Provide a shipping profile if shippable products will use this subscription profile and you wish to set a specific rate, regardless of shipment destination. Otherwise, RevCent will calculate shipping by finding a match within all shipping profiles. Important: If provided, the first rate listed in the shipping profile will be used, i.e. no product, product group, revenue rules or country restrictions are taken into account within the shipping profile.<br><br>Note: to remove a shipping profile, set shipping_profile to null or an empty string.","minLength":20,"maxLength":20},"payment_profile":{"type":"string","description":"A 20 character payment profile ID. The payment profile which determines the processing flow of subscription renewals using this subscription profile.","minLength":20,"maxLength":20}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"subscription_profile_id":{"type":"string","description":"A 20 character subscription profile ID.","minLength":20,"maxLength":20},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}