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

# Get Current Subscription

> Retrieve the customer's current active subscription details including billing information and items. If the customer has multiple subscriptions, we recommend returning the next upcoming subscription.



## OpenAPI

````yaml /openapi.json get /zaymo/customer-portal/subscription
openapi: 3.0.1
info:
  title: Zaymo Custom Integration API
  description: >-
    API for managing product upsells, customer interactions, and custom actions
    in email campaigns
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.your-domain.com/example/
security:
  - apiKeyAuth: []
tags:
  - name: Upsells
    description: Endpoints for managing product upsells in emails
  - name: Customer Portal
    description: Endpoints for customer subscription management portal
  - name: Swap Up
    description: Endpoints for swapping a customer's current subscription product
  - name: Reactivate
    description: Endpoints for reactivating cancelled subscriptions
  - name: Custom Actions
    description: Endpoints for executing custom actions from email buttons
  - name: Discounts
    description: Endpoints for retrieving discount information
paths:
  /zaymo/customer-portal/subscription:
    get:
      tags:
        - Customer Portal
      summary: Get Current Subscription
      description: >-
        Retrieve the customer's current active subscription details including
        billing information and items. If the customer has multiple
        subscriptions, we recommend returning the next upcoming subscription.
      parameters:
        - name: email
          in: query
          description: The email address of the customer
          required: true
          schema:
            type: string
            format: email
      responses:
        '200':
          description: Successful response with subscription details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentSubscriptionResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Customer or subscription not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CurrentSubscriptionResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        data:
          type: object
          required:
            - next_billing_date
            - items
          properties:
            next_billing_date:
              type: string
              format: date
              description: The date of the next scheduled billing
              example: '2024-02-15'
            items:
              type: array
              items:
                $ref: '#/components/schemas/SubscriptionItem'
              description: Products included in the subscription with quantities
            shipping_total_cost:
              type: number
              format: float
              description: >-
                Total shipping cost for the subscription. This can be an
                estimated amount. If you do not have a shipping cost, you can
                return 0.
              example: 5.99
            order_discount_total:
              type: number
              format: float
              description: >-
                Total discount applied to this subscription order. This should
                not include discounts already applied to item prices. If there
                are no additional discounts, you can return 0.
              example: 5
            customer_tax_rate:
              type: number
              format: float
              description: >-
                Tax rate applied to the customer's subscription (as decimal,
                e.g., 0.08 for 8%). Used to calculate an estimated tax amount on
                current items and upsells. If you do not have a tax rate, you
                can return 0.
              example: 0.08
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Human-readable error message
    SubscriptionItem:
      type: object
      required:
        - id
        - title
        - price
        - images
        - quantity
      properties:
        id:
          type: string
          description: Unique identifier for the product
        title:
          type: string
          description: Name or title of the product
        price:
          type: number
          format: float
          description: Subscription line item price
          example: 29.99
        images:
          type: array
          items:
            type: string
            format: uri
          description: Array of image URL strings for the product
        description:
          type: string
          description: Optional description of the product
        quantity:
          type: integer
          description: Quantity of this product in the subscription
          example: 2
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Zaymo-API-Key
      description: Zaymo will authenticate requests using the API key you provide

````