> ## Documentation Index
> Fetch the complete documentation index at: https://developer.surecart.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update

> Updates the current account.



## OpenAPI

````yaml /openapi/v1/core.json patch /v1/account
openapi: 3.1.0
info:
  title: SureCart Core Resources API
  description: >-
    Fundamental platform resources including accounts, brands, events, exports,
    imports, processors, and webhook endpoints
  termsOfService: https://surecart.com/terms-and-conditions
  version: '1.0'
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.surecart.com
security:
  - bearer_auth: []
tags:
  - name: Abandonded Checkouts
    description: >-
      An abandonded checkout represents a customer's most recent incomplete
      checkout.

      When a checkout is associated with a customer and is left unpaid for 30
      minutes a corresponding abandoned checkout is created. Only one abandoned
      checkout will be created per customer every 10 days.
  - name: Abandoned Checkout Protocols
    description: >-
      An abandoned checkout protocol represents the abandoned checkout settings
      for an account.
  - name: Accounts
    description: >-
      This is an object representing a SureCart account. You can retrieve it to
      see properties on the account like it's current - name or default
      currency.
  - name: Activations
    description: An activation represents a single use of a license.
  - name: Affiliation Products
    description: >-
      An affiliation product allows for setting a specific commission structure
      for a product and affiliation.
  - name: Affiliation Protocols
    description: An affiliation protocol represents the affiliate settings for an account.
  - name: Affiliation Requests
    description: >-
      An affiliation request represents a request from an affiliate to join an
      account's affiliate program.
  - name: Affiliations
    description: >-
      An affiliation represents a relationship between an affiliate and an
      account.
  - name: Balance Transactions
    description: >-
      You may modify a customer's balance by creating a balance transaction,
      which increments or decrements the customer's balance by the specified
      amount.
  - name: Balances
    description: >-
      Each customer has a balance value for each currency, which denotes a debit
      or credit that's automatically applied to their next invoice upon
      finalizing.
  - name: Brands
    description: A brand represents the design and branding settings for an account.
  - name: Bulk Actions
    description: >-
      A bulk action is a way to perform a single action on multiple resources at
      once.
  - name: Bumps
    description: >-
      A bump represents a price that will be conditionally recommended to
      customers during checkout. Bumps are displayed below the checkout summary
      and offer an easy way to add additional products to the checkout. They are
      a more powerful alternative to swaps, but they are more intrusive to the
      checkout experience.
  - name: Cancellation Acts
    description: A cancellation act represents a customer attempt to cancel a subscription.
  - name: Cancellation Reasons
    description: >-
      Cancellation reasons are specific reasons that a customer can select from
      when cancelling a subscription.
  - name: Charges
    description: >-
      A Charge represents a credit or debit card transaction that was captured
      through one of your processors. Only succesfully captured charges are
      recorded in SureCart.
  - name: Checkouts
    description: >-
      A checkout represents a collection of one-time and/or subscription
      products that a customer intends to purchase.
  - name: Checkout Portal Protocols
    description: >-
      A checkout portal protocol represents the checkout portal settings for an
      account.
  - name: Clicks
    description: >-
      A click is a record of a customer clicking on an affiliate link. Click
      records are associated with checkouts to create referrals.
  - name: Coupons
    description: >-
      A coupon contains information about a percent-off or amount-off discount.

      The coupon object can be used to discount either one-time payments or
      subscriptions. There are some additional parameters that apply to
      subscriptions, but are not applicable to one-time payments, such as
      duration. Regardless of what duration is set to, it only applies once for
      one-time payments.
  - name: Customer Links
    description: >-
      Customer links are temporary objects that allow access to customers
      through email lookup.

      Each customer link is valid for the greater of 1 hour after it's
      `created_at` time or 1 hour after it's `first_used_at` time. This means
      that if a customer link is not used within the first hour it expires. If a
      customer link is used within the first hour then it is valid for another
      hour starting from the time it was first used. So, a customer link that is
      used 30min after it's created will be valid for a total of 1hr 30min.
  - name: Customer Notification Protocols
    description: >-
      A customer notification protocol represents the customer notification
      settings for an account.
  - name: Customers
    description: >-
      Customer objects allow you to perform recurring charges, and to track
      multiple charges, that are associated with the same customer.
  - name: Customer Portal Protocols
    description: >-
      A customer portal protocol represents the customer portal settings for an
      account.
  - name: Display Currencies
    description: >-
      Display currencies are the currencies that are available to customers from
      the currency selector on your store.
  - name: Downloads
    description: >-
      Downloads represent the medias that can be downloaded when a specific
      product is purchased.
  - name: Events
    description: >-
      Events are our way of letting you know when something interesting happens
      in your account. When an interesting event occurs, we create a new `Event`
      object. For example, when a subscription updates, we create a
      `subscription.updated` event.
  - name: Exports
    description: Exports allow you to download your raw data from your SureCart account.
  - name: Fees
    description: >-
      A fee represents an additional amount added or subtracted from a specific
      line item.
  - name: Fulfillment Items
    description: >-
      A fulfillment item represents a specific line item being shipped to a
      customer within a fulfillment.
  - name: Fulfillments
    description: >-
      A fulfillment represents a shipment of products within an order to a
      customer.
  - name: Imports
    description: >-
      Imports allow you to upload raw data into your SureCart account to batch
      create customers, products, subscriptions, etc.
  - name: Invoices
    description: >-
      Invoices are statements of amounts owed by a customer. They wrap a
      checkout and can be configured to collect payment automatically or be sent
      to the customer for payment.
  - name: Licenses
    description: >-
      A license represents permission for a customer to use a specific product.
      Each license has an auto-generated `key` which can be used with the public
      license endpoints.
  - name: Line Items
    description: >-
      A line item represents a price and it's quantity being purchased by a
      customer within a checkout.
  - name: Manual Charges
    description: >-
      A manual charge represents record of a payment that was captured outside
      of SureCart.
  - name: Manual Payment Methods
    description: >-
      Manual payment methods are used to allow customers to checkout with manual
      approval – i.e. cash on delivery, bank transfers, etc.
  - name: Medias
    description: >-
      Medias represent files that are hosted on our servers. Medias are uploaded
      directly to the underlying hosting service. To learn more about how medias
      work, please contact support.
  - name: Notes
    description: >-
      Notes are snippets of text that can be attached to objects to provide
      extra context. Notes can be added to `Customer`, `Order`, and
      `Subscription` objects.
  - name: Order Protocols
    description: A order protocol represents the order settings for an account.
  - name: Orders
    description: >-
      An order is a customer's completed request to purchase one or more
      products. An order is created when a checkout is paid.
  - name: Parcel Templates
    description: >-
      A parcel template is a saved set of package dimensions and weight that can
      be reused for shipping calculations.
  - name: Payment Failures
    description: A payment failure represents an attempt to pay a checkout that failed.
  - name: Payment Intents
    description: >-
      A payment intent represents the process of collecting a payment method
      from your customer.
  - name: Payment Methods
    description: Payment method objects represent your customer's payment instruments.
  - name: Payout Groups
    description: A payout group represents a group of payouts that are created together.
  - name: Payouts
    description: A payout represents a payment to an affiliate.
  - name: Periods
    description: A period represents a billing interval for a subscription.
  - name: Prices
    description: >-
      Prices define the unit cost, currency, and (optional) billing cycle for
      both recurring and one-time purchases of products. Products help you track
      inventory or provisioning, and prices help you track payment terms.
      Different physical goods or levels of service should be represented by
      products, and pricing options should be represented by prices.

      This approach lets you change prices without having to change your
      provisioning scheme. For example, you might have a single \"gold\" product
      that has prices for $10/month, $100/year, and €9 once.
  - name: Processors
    description: >-
      A processor represents a connection to a third-party payment processor
      like Stripe.
  - name: Product Collections
    description: A list of related products - used to categorize products.
  - name: Product Groups
    description: >-
      A group of related products – used to configure which products a customer
      can switch between when updating a subscription.
  - name: Product Medias
    description: Product medias represent a product's images.
  - name: Products
    description: >-
      Products describe the specific goods or services you offer to your
      customers. For example, you might offer a Standard and Premium version of
      your goods or service; each version would be a separate Product. They can
      be used in conjunction with Prices to configure pricing and Subscriptions.
  - name: Promotions
    description: >-
      A Promotion represents a customer-redeemable code for a coupon. It can be
      used to create multiple codes for a single coupon.
  - name: Purchases
    description: >-
      A purchase represents a specific product that a customer has paid for
      (one-time products), or is currently paying for (recurring products via a
      subscription). The purchase model is a summary of all products that a
      customer current should have "access" to.
  - name: Referral Items
    description: A referral item represents a specific line item within a referral.
  - name: Referrals
    description: A referral represents a checkout that is associated with an affiliate.
  - name: Refunds
    description: >-
      Refund objects allow you to refund a charge that has previously been
      created but not yet refunded. Funds will be refunded to the credit or
      debit card that was originally charged.
  - name: Return Items
    description: >-
      A return item represents a specific line item being returned from a
      customer within a return request.
  - name: Return Requests
    description: >-
      A return request represents a return of products within an order from a
      customer.
  - name: Reviews
    description: A review represents a customer's review of a product.
  - name: Review Medias
    description: Review medias represent the media that is associated with a review.
  - name: Review Protocols
    description: A review protocol represents the review settings for an account.
  - name: Shipments
    description: >-
      A shipment represents a package being sent via a shipping provider (e.g.
      Shippo) with rate quoting, label purchasing, and tracking.
  - name: Shipping Methods
    description: >-
      Shipping methods represent the different speeds/classes of shipping that a
      store offers – i.e. `Express`, `Ground`, etc.
  - name: Shipping Profiles
    description: >-
      A shipping profile is a grouping of products that have the same shipping
      zones and rates. Each product can belong to one shipping profile.
  - name: Shipping Protocols
    description: A shipping protocol represents the shipping settings for an account.
  - name: Shipping Rates
    description: >-
      Shipping rates represent the specific rules for determining the cost of
      shipping based on the products within a checkout.
  - name: Shipping Zones
    description: >-
      A shipping zone represents a geographical (group of countries) boundary
      for setting specific shipping rates within a shipping profile.
  - name: Statistics
    description: A group of endpoints that provide high level statistics on resources.
  - name: Subscription Protocols
    description: >-
      A subscription protocol represents the subscription settings for an
      account.
  - name: Subscriptions
    description: >-
      A Subscription represents a recurring schedule to charge a customer on one
      of your processors.
  - name: Swaps
    description: >-
      A swap represents a price that will be conditionally recommended to
      customers during checkout. Swaps are displayed in the checkout summary and
      can be easily toggled on or off. They are non-intrusive alternative to
      bumps, and offer customers an easy way to flip between two prices.
  - name: Tax Overrides
    description: >-
      A tax override is a manual tax rate that will be applied to products in a
      collection or shipping within a specific tax zone.
  - name: Tax Protocols
    description: A tax protocol represents the tax settings for an account.
  - name: Tax Registrations
    description: >-
      A tax registration represents a tax zone that is enabled for an account.
      Taxes will not be calculated for checkouts within a tax zone unless a
      matching tax registration exists.
  - name: Tax Zones
    description: >-
      A tax zone represents a geographic area (country and state combinations)
      that taxes can be calculated for.
  - name: Trackings
    description: >-
      A tracking represents the tracking number information from a shipping
      courier.
  - name: Upsell Funnels
    description: >-
      An upsell funnel represents a group of upsells that will be presented to
      customers after checkout in a specific order.
  - name: Upsells
    description: >-
      An upsell represents a price (maybe discounted) that will be offered to
      customers after checkout.
  - name: Variant Options
    description: >-
      Variant options represent the custom properties of a product – i.e.
      `Size`, `Color`, etc.
  - name: Variant Values
    description: >-
      Variant values represent the custom values of a specific variant option.
      For example, a variant option named `Color` could have variant values of
      `Red` and `Blue`.
  - name: Variants
    description: >-
      A variant represents one version of a product with several options. Each
      product can have a maximum of three variant options and a maximum of 100
      variants.
  - name: Warehouses
    description: >-
      A warehouse represents a "ship from" address that can be set as the
      account default for outbound shipments.
  - name: Verification Codes
    description: >-
      Verification codes are short-lived authentication codes that can be used
      to verify access to an email address. They provide a secure way of
      granting access to the customer portal without requiring the customer to
      have a password.

      Each verification code is valid for 10 minutes, and you are limited to
      creating 1 every minute per email address.
  - name: Webhook Endpoints
    description: >-
      You can configure webhook endpoints via the API to be notified about
      events that happen in your SureCart account.

      Most users configure webhooks from the dashboard, which provides a user
      interface for registering and testing your webhook endpoints.
paths:
  /v1/account:
    patch:
      tags:
        - Accounts
      summary: Update
      description: Updates the current account.
      operationId: update_account
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/account_body'
              example:
                account:
                  name: New Account Name
                  currency: aud
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                id: 3e9e8fee-43a7-464c-acbe-1accf42089d9
                object: account
                cache_keys:
                  coupons: >-
                    coupons/query-6980418d6c80c6214022dadfc02329e4-2-20260505195411347797
                  display_currencies: >-
                    display_currencies/query-0c87deb5fb3af8cef6dce1d284e87bf8-2-20260505195411355019
                  manual_payment_methods: >-
                    manual_payment_methods/query-10c5d3365d4a37b2be70cec814cc56b0-0
                  processors: >-
                    processors/query-feeb2e7ee7995c3cbbb3ff70b9203ca2-1-20260505195411299005
                  products: products/query-d03082ff0e187a55be8462aa9614d700-0
                  product_collections: product_collections/query-92ef107e305a26a68ea32b26ba4fa1d1-0
                  reviews: reviews/query-c53a5b63206ac8cb2d6b0c3a09043934-0
                  shipping_providers: shipping_providers/query-bea59a45901f8d5bd8d397910ca28f80-0
                  webhook_endpoints: webhook_endpoints/query-a79ef0c710389f4335bd0a51c832f557-0
                claimed: true
                claim_url: null
                claim_window_ends_at: null
                currency: aud
                currency_locked: false
                locale: en
                medias_total_byte_size: 0
                name: New Account Name
                slug: test-account
                time_zone: Etc/UTC
                url: null
                plan:
                  free: true
                  name: Launch
                public_token: pt_UjmDYVLLEMRBCY1QKzNW7jw5
                seeded_at: null
                abandoned_checkout_protocol: 6f674f20-6013-4a75-a7c3-82cafe1d2275
                affiliation_protocol: 7cc117d1-0de0-4764-8cad-df3a18fe9213
                brand: f67a72d4-debd-4a37-9a38-86dd2f51e014
                checkout_portal_protocol: 05806d57-b035-4dda-b50a-d0e96cf49054
                customer_notification_protocol: 98f2d7e8-f2d5-4022-b02e-aceb8ab6b0a1
                customer_portal_protocol: 96a6c324-9317-49dc-98a3-0b1adaa86d0f
                order_protocol: b0b1eb9b-0f3b-4eda-b1de-f9591a0681d6
                review_protocol: bd5fc3c1-024c-4103-ad41-b79b9e6753c5
                shipping_protocol: 790a6dd8-b39b-4112-a1b4-fa3cfbfd64af
                subscription_protocol: 0b5793ac-8456-4124-9bbb-a134ea4cab3d
                tax_protocol: ffd9b46b-6b7d-4ad1-a98f-7f5c18441aa6
                test_data_purged_at: null
                created_at: 1778010851
                updated_at: 1778010851
              schema:
                $ref: '#/components/schemas/account_response'
components:
  schemas:
    account_body:
      allOf:
        - $ref: '#/components/schemas/account_base'
    account_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/account_base'
        - properties:
            abandoned_checkout_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated abandoned checkout protocol ID.
                - $ref: '#/components/schemas/abandoned_checkout_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated abandoned checkout protocol object.
            affililiation_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated affililiation protocol ID.
                - $ref: 0db584aa-3ebe-4382-b23a-d446862d24b3
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated affililiation protocol object.
            brand:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated brand ID.
                - $ref: '#/components/schemas/brand_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated brand object.
            cache_keys:
              type: object
              description: >-
                A collection of cache keys for various resource collections on
                this account. These values can be used to invalidate your local
                cache for each resource collection.
            claimed:
              type: boolean
              description: Whether or not this account has been claimed yet.
            claim_url:
              type: string
              nullable: true
              description: If not claimed, the URL where this account can be claimed.
            claim_window_ends_at:
              type: integer
              nullable: true
              description: >-
                If not claimed, the time at which the claim window for this
                account ends. Measured in seconds since the Unix epoch.
            currency_locked:
              type: boolean
              description: >-
                Whether or not the currency is locked for this account. The
                currency is locked once the first live order is created.
            checkout_portal_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated checkout portal protocol ID.
                - $ref: '#/components/schemas/checkout_portal_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated checkout portal protocol object.
            customer_notification_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated customer notification protocol ID.
                - $ref: '#/components/schemas/customer_notification_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated customer notification protocol object.
            customer_portal_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated customer portal protocol ID.
                - $ref: '#/components/schemas/customer_portal_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated customer portal protocol object.
            entitlements:
              type: object
              description: The specific features that this account is entitled to.
            medias_total_byte_size:
              type: integer
              description: The total number of bytes from this account's medias.
            plan:
              type: object
              description: Details of the current plan this account is on.
            public_token:
              type: string
              description: The public API token for this account.
            review_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated review protocol ID.
                - $ref: '#/components/schemas/review_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated review protocol object.
            shipping_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated shipping protocol ID.
                - $ref: '#/components/schemas/shipping_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated shipping protocol object.
            subscription_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated subscription protocol ID.
                - $ref: '#/components/schemas/subscription_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated subscription protocol object.
            tax_protocol:
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated tax protocol ID.
                - $ref: '#/components/schemas/tax_protocol_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated tax protocol object.
            seeded_at:
              type: integer
              nullable: true
              description: Time when the account was seeded.
            test_data_purged_at:
              type: integer
              nullable: true
              description: Time at which the test data was last purged.
        - $ref: '#/components/schemas/model_timestamps'
    account_base:
      properties:
        currency:
          type: string
          description: >-
            The default currency for this account. This will be used as the
            default value for `Price`, `Checkout`, and other objects that have
            the `currency` attribute.
        name:
          type: string
          description: >-
            The full name, business name, or other short descriptor for this
            account.
        locale:
          type: string
          description: >-
            The language that will be used for all customer notifications,
            invoices, etc. Current available locales are `en`, `bg`, `de`, `es`,
            `fr`, `it`, `ja`, `nl`, `pl`, `pt`, `pt_br`.
        time_zone:
          type: string
          description: >-
            The time zone of the account. Values must be a valid IANA time zone
            database identifier.
        url:
          type: string
          nullable: true
          description: >-
            The URL of this account's store. This will be used as the base for
            all redirects back to your store.
    model_identifiers:
      properties:
        id:
          type: string
          nullable: true
          description: The UUID of the specific object.
        object:
          type: string
          description: A string describing the object type returned.
    abandoned_checkout_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/abandoned_checkout_protocol_body'
        - properties:
            coupon:
              anyOf:
                - type: string
                  description: >-
                    The coupon that is used when creating discounts for
                    abandoned checkouts.


                    [Expandable](/api-reference/expanding-responses) – The
                    associated coupon ID.
                - $ref: '#/components/schemas/coupon_response'
                  description: >-
                    The coupon that is used when creating discounts for
                    abandoned checkouts.


                    [Expanded](/api-reference/expanding-responses) – The
                    associated coupon object.
        - $ref: '#/components/schemas/model_timestamps'
    brand_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/brand_base'
        - properties:
            dark_logo:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated media ID.
                - $ref: '#/components/schemas/media_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated media object.
            logo:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated media ID.
                - $ref: '#/components/schemas/media_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated media object.
            address:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – The
                    associated address ID.
                - $ref: '#/components/schemas/address_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – The
                    associated address object.
        - $ref: '#/components/schemas/model_timestamps'
    checkout_portal_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/checkout_portal_protocol_body'
        - $ref: '#/components/schemas/model_timestamps'
    customer_notification_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/customer_notification_protocol_body'
        - $ref: '#/components/schemas/model_timestamps'
    customer_portal_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/customer_portal_protocol_body'
        - $ref: '#/components/schemas/model_timestamps'
    review_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/review_protocol_base'
        - $ref: '#/components/schemas/model_timestamps'
    shipping_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/shipping_protocol_body'
        - $ref: '#/components/schemas/model_timestamps'
    subscription_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/subscription_protocol_body'
        - properties:
            preservation_coupon:
              anyOf:
                - type: string
                  description: >-
                    The coupon that is applied to subscriptions when a
                    cancellation reason with `coupon_enabled=true` is selected
                    and the susbcription is preserved.


                    [Expandable](/api-reference/expanding-responses) – The
                    associated preservation coupon ID.
                - $ref: 9e8040bc-fce3-4ea5-95c2-56788084bd48
                  description: >-
                    The coupon that is applied to subscriptions when a
                    cancellation reason with `coupon_enabled=true` is selected
                    and the susbcription is preserved.


                    [Expanded](/api-reference/expanding-responses) – The
                    associated preservation coupon object.
        - $ref: '#/components/schemas/model_timestamps'
    tax_protocol_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/tax_protocol_base'
        - properties:
            address:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    The address used for tax calculations.


                    [Expandable](/api-reference/expanding-responses) – The
                    associated address ID.
                - $ref: '#/components/schemas/address_response'
                  description: >-
                    The address used for tax calculations.


                    [Expanded](/api-reference/expanding-responses) – The
                    associated address object.
            ca_tax_identifier:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    The Canadian tax identifier.


                    [Expandable](/api-reference/expanding-responses) – The
                    associated ca tax identifier ID.
                - $ref: 8d3c79e0-8d4b-48cf-8da2-5cdbb18805b0
                  description: >-
                    The Canadian tax identifier.


                    [Expanded](/api-reference/expanding-responses) – The
                    associated ca tax identifier object.
            eu_tax_identifier:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    The EU tax identifier.


                    [Expandable](/api-reference/expanding-responses) – The
                    associated eu tax identifier ID.
                - $ref: 16b6e835-2675-4b2c-accd-a5f078e952ef
                  description: >-
                    The EU tax identifier.


                    [Expanded](/api-reference/expanding-responses) – The
                    associated eu tax identifier object.
        - $ref: '#/components/schemas/model_timestamps'
    model_timestamps:
      properties:
        created_at:
          type: integer
          nullable: true
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        updated_at:
          type: integer
          nullable: true
          description: >-
            Time at which the object was last updated. Measured in seconds since
            the Unix epoch.
    abandoned_checkout_protocol_body:
      properties:
        enabled:
          type: boolean
          description: >-
            If set to `true` abandonded checkout reminder emails will be sent to
            customers.
        first_promotion_notification:
          type: integer
          nullable: true
          description: >-
            The first notification that should have an auto-generated promotion
            code – can be one of `1`, `2`, `3` or `null`. For example, if set to
            `2` the promotion code will be generated when the second
            notification is sent. If `null` a promotion code will never be
            generated.
        grace_period_days:
          type: integer
          description: >-
            The number of days to wait after a customer's purchase before
            allowing an abandoned checkout to be created. This helps to prevent
            abandoned checkouts being created for customers very soon after they
            have made a purchase.
        ignore_purchased_products:
          type: boolean
          description: >-
            Whether or not to ignore checkouts where the customer has already
            purchased all of the products in the checkout.
        notification_delays:
          type: array
          description: >-
            The timing schedule for abandoned checkout notifications. It is an
            array of integers representing the delay in seconds for all
            notifications. For example, a value of `[3600, 86400, 432000]`
            indicates that notifications will be sent 1 hour, 24 hours, and 5
            days after a checkout is abandoned. The number of notifications
            (items in array) must be between 1 and 3.
        promotion_expires_after_days:
          type: integer
          nullable: true
          description: >-
            The number of days that the auto-generated promotion code should be
            valid for. If set to 'null' it is valid forever.
        test_mode_enabled:
          type: boolean
          description: >-
            Whether or not abandoned checkouts should be created for test mode
            checkouts.
    coupon_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/coupon_base'
        - properties:
            archived_at:
              type: integer
              nullable: true
              description: >-
                Time at which the object was archived. Measured in seconds since
                the Unix epoch.
            currency:
              type: string
              description: >-
                Three-letter ISO currency code, in lowercase. This value will
                match the `Account` currency.
            discounts:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – Property
                    not returned unless expanded.
                - $ref: '#/components/schemas/list_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – A list of
                    associated discount objects.
            expired:
              type: boolean
              description: >-
                Taking into account the above properties, whether this coupon
                can still be applied to a checkout.
            promotions:
              nullable: true
              anyOf:
                - type: string
                  description: >-
                    [Expandable](/api-reference/expanding-responses) – Property
                    not returned unless expanded.
                - $ref: '#/components/schemas/list_response'
                  description: >-
                    [Expanded](/api-reference/expanding-responses) – A list of
                    associated promotion objects.
            times_redeemed:
              type: integer
              description: >-
                Number of times this coupon has been applied to a checkout
                and/or subscription.
        - $ref: '#/components/schemas/model_discarded_timestamp'
        - $ref: '#/components/schemas/model_timestamps'
    brand_base:
      properties:
        color:
          type: string
          nullable: true
          description: >-
            The primary brand color. Used for buttons, links, loading states,
            etc.
        dark_color:
          type: string
          nullable: true
          description: >-
            The primary brand color in dark mode. Used for buttons, links,
            loading states, etc.
        email:
          type: string
          nullable: true
          description: >-
            The email address that will be shown to customers for support, on
            statements, etc.
        phone:
          type: string
          nullable: true
          description: >-
            The phone number that will be shown to customers for support, on
            statements, etc.
        theme:
          type: string
          description: >-
            The color theme for all store branded pages (i.e. affiliate portal).
            One of `light` or `dark`.
        website:
          type: string
          nullable: true
          description: >-
            The website that will be shown to customers for support, on
            statements, etc.
    media_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - properties:
            byte_size:
              type: integer
              description: The size of the media in bytes.
            content_type:
              type: string
              description: The content type (i.e. image/png, image/jpg, application/pdf).
            extension:
              type: string
              description: The extension (i.e. png, jpg, pdf).
            filename:
              type: string
              description: The full filename with extension.
            height:
              type: string
              nullable: true
              description: If the media is an image, this will be the height in pixels.
            public_access:
              type: boolean
              description: Whether or not this media is publicly accessible.
            release_json:
              type: object
              nullable: true
              description: >-
                The JSON that was extracted from the `release.json` file within
                the ZIP file.
            url:
              type: string
              nullable: true
              description: >-
                The URL for accessing this media. If the media is public, this
                will be a permanent URL. If the media is private, this will be a
                short-lived URL if the media has been exposed.
            url_expires_at:
              type: integer
              nullable: true
              description: >-
                The time at which the URL expires. This will only be present if
                the media is private and has been exposed.
            width:
              type: string
              nullable: true
              description: If the media is an image, this will be the width in pixels.
        - $ref: '#/components/schemas/model_timestamps'
    address_response:
      allOf:
        - $ref: '#/components/schemas/model_identifiers'
        - $ref: '#/components/schemas/address_body'
        - properties:
            formatted_string:
              type: string
              description: A formatted string representation of the address.
        - $ref: '#/components/schemas/model_timestamps'
    checkout_portal_protocol_body:
      properties:
        back_url:
          type: string
          nullable: true
          description: >-
            The back URL that is shown to customers on the checkout portal. This
            can be overridden by a `back_url` on a `Checkout`.
        external_enabled:
          type: boolean
          description: Whether or not an external checkout portal is being used.
        external_url:
          type: string
          nullable: true
          description: >-
            If `external_enabled=true`, where is the external portal hosted? If
            empty, the store's URL is used.
        manual_checkout_finalize_enabled:
          type: boolean
          description: >-
            Whether or not finalizing a checkout with `manual_payment=true` is
            allowed.
        thank_you_heading:
          type: string
          nullable: true
          description: The heading that is shown to customers on the order thank you page.
        thank_you_description:
          type: string
          nullable: true
          description: >-
            The description that is shown to customers on the order thank you
            page.
        wordpress_plugin_enabled:
          type: boolean
          description: Whether or not the WordPress plugin is hosting the checkout portal.
    customer_notification_protocol_body:
      properties:
        free_order_enabled:
          type: boolean
          description: >-
            Whether or not order confirmation and subscription renewal emails
            will be sent to customers when the order is free.
        notifications_enabled:
          type: boolean
          description: >-
            Whether or not any notifications should be sent to customers. If
            `false` no notifications will be sent to customers and all other
            settings will be ignored.
        order_enabled:
          type: boolean
          description: Whether or not order confirmation emails will be sent to customers.
        payment_failure_enabled:
          type: boolean
          description: >-
            Whether or not subscription dunning emails will be sent to
            customers.
        purchase_enabled:
          type: boolean
          description: Whether or not product access emails will be sent to customers.
        refund_enabled:
          type: boolean
          description: Whether or not refund emails will be sent to customers.
        subscription_cancellation_enabled:
          type: boolean
          description: >-
            Whether or not subscription cancellation emails will be sent to
            customers.
        subscription_reminder_enabled:
          type: boolean
          description: >-
            Whether or not subscription reminder emails will be sent to
            customers.
        subscription_renewal_enabled:
          type: boolean
          description: >-
            Whether or not subscription renewal emails will be sent to
            customers.
        from_name:
          type: string
          nullable: true
          description: The from name to use when sending emails to customers.
        reply_to_email:
          type: string
          nullable: true
          description: The reply-to email address to use when sending emails to customers.
        upsell_accepted_enabled:
          type: boolean
          description: >-
            Whether or not post purchase offer accepted emails will be sent to
            customers.
    customer_portal_protocol_body:
      properties:
        back_url:
          type: string
          nullable: true
          description: >-
            The back URL that is shown to customers on the customer portal. This
            can be overridden by a `back_url` on a `CustomerPortalSession`.
        external_enabled:
          type: boolean
          description: Whether or not an external customer portal is being used.
        external_url:
          type: string
          nullable: true
          description: >-
            If `external_enabled=true`, where is the external portal hosted? If
            empty, the store's URL is used.
        login_enabled:
          type: boolean
          description: >-
            Whether or not customer's can login with their email and a
            verification code on the hosted customer portal. If disabled, the
            only way to authenticate a customer is with a
            `CustomerPortalSession`.
        privacy_url:
          type: string
          nullable: true
          description: >-
            The privacy policy link that is shown to customers on the customer
            portal.
        subscription_cancellations_enabled:
          type: boolean
          description: >-
            Whether or not customers can cancel subscriptions from the customer
            portal.
        subscription_updates_enabled:
          type: boolean
          description: >-
            Whether or not customers can make subscription changes from the
            customer portal.
        subscription_quantity_updates_enabled:
          type: boolean
          description: >-
            Whether or not customers can change subscription quantities from the
            customer portal.
        terms_url:
          type: string
          nullable: true
          description: >-
            The terms of service link that is shown to customers on the customer
            portal.
        wordpress_plugin_enabled:
          type: boolean
          description: Whether or not the WordPress plugin is hosting the customer portal.
    review_protocol_base:
      properties:
        reviews_enabled:
          type: boolean
          description: >-
            If set to `true`, reviews will be enabled globally for all products
            in the account. Individual products must also have reviews enabled
            for reviews to be shown.
        solicit_reviews:
          type: boolean
          description: >-
            If set to `true`, review solicitation emails will be sent to
            customers who have purchased products. Individual products must also
            have solicitation enabled.
        solicit_reviews_after_days:
          type: integer
          description: >-
            The number of days after an order is fulfilled that a review
            solicitation email will be sent to the customer.
    shipping_protocol_body:
      properties:
        shipping_enabled:
          type: boolean
          description: >-
            If set to `true` a shipping choice will be required for checkouts
            that have `shipping_enabled` products.
    subscription_protocol_body:
      properties:
        bypass_duplicate_trials:
          type: boolean
          description: >-
            Whether or not to skip the trial period for a product if the
            customer has already been in a trial.
        cancel_behavior:
          type: string
          description: >-
            Controls how subscription cancellations should be handled – one of
            `immediate` or `pending`.
        cancel_window_enabled:
          type: boolean
          description: Whether or not the subscription cancel window is enabled.
        cancel_window_days:
          type: integer
          description: >-
            The number of days prior to a subscription renewing that the cancel
            option will be visible to customers.
        default_payment_method_detach_enabled:
          type: boolean
          description: Whether or not default payment methods can be removed.
        default_payment_method_fallback_enabled:
          type: boolean
          description: >-
            Whether or not the customer's default payment method should be used
            as a fallback when a subscription does not have a payment method.
        downgrade_behavior:
          type: string
          description: >-
            Controls how subscription changes should be handled when downgrading
            – one of `immediate` or `pending`.
        payment_retry_window_weeks:
          type: integer
          description: >-
            The number of weeks to retry failed subscription payments before
            canceling the subscription.
        preservation_enabled:
          type: boolean
          description: Whether or not subscription preservation is enabled.
        preservation_locales:
          type: object
          description: >-
            A collection of locale strings that will be used when displaying the
            subscription preservation flow to customers. These strings have
            access to the following liquid variables: `amount` and `name`.
        remind_at_period_percent_remaining:
          type: number
          description: >-
            Specifies the percentage of time remaining in the subscription
            period at which a reminder should be sent. For example, if set to
            25%, the reminder will be triggered when there is 25% of the
            subscription period remaining.
        remind_after_days:
          type: integer
          nullable: true
          description: >-
            Specifies the minimum number of days that must pass since the last
            reminder (or subscription creation if no reminder has been sent)
            before a new reminder can be sent. For example, if set to 180, a
            reminder will only be sent if at least 180 days have passed since
            the last reminder. This prevents reminders from being sent too
            frequently across multiple subscription periods.
        reschedule_existing_reminders:
          type: boolean
          nullable: true
          default: false
          description: >-
            Whether or not existing subscription reminders should be
            recalculated. Only applicable when
            `remind_at_period_percent_remaining` or `remind_after_days` are
            changed.
        require_upfront_payment_method:
          type: boolean
          description: >-
            Whether or not a payment method should be required for subscriptions
            that have an initial period amount of $0 (free trial or coupon).
        revoke_purchases_on_past_due:
          type: boolean
          description: >-
            Whether or not a purchase should be revoked when a subscription
            becomes past_due. If the subscription transitions to the `active` or
            `trialing` state the associated purchase will be automatically
            invoked again.
        upgrade_behavior:
          type: string
          description: >-
            Controls how subscription changes should be handled when upgrading –
            one of `immediate` or `pending`.
    tax_protocol_base:
      properties:
        ca_tax_enabled:
          type: boolean
          description: >-
            If set to `true` GST taxes will be calculated for all Canadian
            provinces.
        default_rate:
          type: number
          nullable: true
          description: >-
            The default tax rate to use for checkouts when a specific
            `tax_registration` is not found. This will only apply if
            `default_tax_enabled=true`.
        default_tax_enabled:
          type: boolean
          description: >-
            Whether or not to use the `default_rate` when a specific
            `tax_registration` is not found.
        eu_micro_exemption_enabled:
          type: boolean
          description: >-
            If set to `true` VAT taxes will be calculated using the account's
            home country VAT rate.
        eu_tax_enabled:
          type: boolean
          description: If set to `true` VAT taxes will be calculated for all EU countries.
        tax_behavior:
          type: string
          description: >-
            Determines how taxes will be calculated. One of `exclusive` or
            `inclusive`.
        tax_enabled:
          type: boolean
          description: If set to `true` taxes will be automatically calculated.
        eu_vat_required:
          type: boolean
          description: >-
            Whether or not an `eu_vat` tax identifier is required when a
            customer's address is in the EU.
        eu_vat_unverified_behavior:
          type: string
          description: >-
            Determines how `eu_vat` tax identifiers will be handled when they
            are not verified against VIES. One of `apply_reverse_charge`,
            `error`, or `skip_reverse_charge`.
        eu_vat_local_reverse_charge:
          type: boolean
          description: >-
            Whether or not reverse charge should be applied when the customer's
            address is in the same country as the tax protocol address.
    coupon_base:
      allOf:
        - properties:
            archived:
              type: boolean
              description: Whether or not this coupon is archived.
            amount_off:
              type: integer
              nullable: true
              description: >-
                Amount (in the `currency` specified) that will be taken off the
                subtotal of any checkout.
            duration:
              type: string
              description: >-
                One of `forever`, `once`, and `repeating`. Describes how long a
                discount with this coupon will be applied. (The `repeating` and
                `forever` values only apply to subscriptions.)
              default: once
            duration_in_months:
              type: integer
              nullable: true
              description: >-
                If `duration` is `repeating`, the number of months the coupon
                applies. Null if coupon `duration` is `forever` or `once`.
            max_redemptions:
              type: integer
              nullable: true
              description: >-
                Maximum number of times this coupon can be redeemed in total
                across all customers.
            max_redemptions_per_customer:
              type: integer
              nullable: true
              description: >-
                Maximum number of times this coupon can be redeemed per
                customer.
            max_subtotal_amount:
              type: integer
              nullable: true
              description: >-
                The maximum `subtotal_amount` that is allowed for the coupon to
                be applicable to a checkout or subscription.
            min_subtotal_amount:
              type: integer
              nullable: true
              description: >-
                The minimum `subtotal_amount` that is required for the coupon to
                be applicable to a checkout or subscription.
            name:
              type: string
              description: Name of the coupon displayed to customers.
            percent_off:
              type: number
              nullable: true
              description: >-
                Percent that will be taken off the subtotal of any checkout. For
                example, a coupon with percent_off of `50` will make a $100
                checkout $50 instead.
            product_ids:
              type: array
              description: An array of product IDs that this coupon applies to.
            redeem_by:
              type: integer
              nullable: true
              description: Date after which the coupon can no longer be redeemed.
        - $ref: '#/components/schemas/model_metadata'
    list_response:
      type: object
      properties:
        object:
          type: string
          description: A string describing the object type returned.
        pagination:
          type: object
          properties:
            count:
              type: integer
              description: The total number of items.
            limit:
              type: integer
              nullable: true
              description: >-
                The number of items per page. The default is `20` and the
                maximum is `100`.
            page:
              type: integer
              nullable: true
              description: The current page.
        data:
          type: array
          description: An array of objects.
    model_discarded_timestamp:
      properties:
        discarded_at:
          type: integer
          nullable: true
          description: >-
            Time at which the object was discarded. Measured in seconds since
            the Unix epoch.
    address_body:
      properties:
        city:
          type: string
          description: City, district, suburb, town, or village.
        country:
          type: string
          description: >-
            The two-letter code of the country - ISO 3166-1. (Reference the
            Atlas API for all available codes.)
        line_1:
          type: string
          description: Address line 1 (e.g., street, PO Box, or company name).
        line_2:
          type: string
          nullable: true
          description: Address line 2 (e.g., apartment, suite, unit, or building).
        name:
          type: string
          description: >-
            The full name or business name for this address. (If empty, this
            will fallback to the customer's name.)
        postal_code:
          type: string
          description: ZIP or postal code.
        state:
          type: string
          description: >-
            The code of the state - ISO 3166-2. (Reference the Atlas API for all
            available codes.)
    model_metadata:
      properties:
        metadata:
          type: object
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````