Update subscriptionAsk AIput https://www.pelcro.com/api/v1/core/subscriptions/{id}Update an existing subscription.Path Paramsidint32requiredThe unique identifier of the subscription.Query Paramssite_idint32requiredThe unique identifier your site.Body Paramsshipments_remainingint32Shipments remaining to update the current oneauto_renewbooleanA boolean that determines whether the subscription will auto-renew or not at the end of the last phase. (overrides the plan configuration when set)metadataobjectSet of key-value pairs that can be saved on subscription level. This can be useful for storing additional information about the object in a structured format.metadata objectip_addressesarray of stringsIP addresses that will identify end-users as members of this subscription upon registration/login. This attribute can only be set when the subscription plan type is membership. Two format are accepted for strings: A single public IP address This should be a valid public IP address following the standard IPv4 format (e.g., 192.168.1.100). A range of public IP addresses This should be a range of public IP addresses following the CIDR notation (e.g., 198.51.100.0/24). You can use this tool calculate the appropriate CIDR notation for your needs.ip_addressesADD stringdomainsarray of stringsEmail domains that will allow end-users with these domains to be members of this subscription upon registration/login. It can only be sent when the subscription plan type is membership.domainsADD stringend_dateint32A valid Unix timestamp in the future represents the exact day to which the subscription will be extended. Note: While you can set an exact Unix timestamp, the end_date will be rounded to the end of that specified day (23:59:59 in UTC). Please note you may only change the end date to a time after the current period end.collection_methodstringenumThe payment collection method of subscription.Allowed:send_invoicecharge_automaticallyrecommended_plan_idint32Plan ID to set as the recommended pricing plan for the subscription based on market-based pricingis_importedbooleanA boolean that determines whether subscription is imported.source_idint32The unique identifier of the payment method. Must be in a chargeable state. Required if collection_method is set to charge_automatically.address_idintegerShipping address ID. Cannot be updated together with plan_id when taxes are enabled.plan_idintegerTarget plan ID to change to. Cannot be used with auto_renew. Cannot downgrade to a lower-priced plan.vendor_tip_amountinteger | null≥ 0Vendor tip amount. Minimum 0.proration_behaviorstring | nullenumProration behavior when changing plan. Default: always_invoice. Only applicable when plan_id is set.Allowed:always_invoicecreate_prorationsnonepayment_behaviorstring | nullenumPayment behavior for plan change. Default: allow_incomplete. Only applicable when plan_id is set.Allowed:allow_incompletedefault_incompleteerror_if_incompletepending_if_incompletebilling_cycle_anchorstring | nullBilling cycle anchor for plan change. Values: unchanged (default), automatic, now, or a Unix timestamp. Only applicable when plan_id is set.HeadersAuthorizationstringrequiredDefaults to Bearer eyJ***Responses 200Success. 400Invalid request. 401Unauthenticated. 404Not found. 500Server error.Updated about 6 hours ago