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

# Get All Subscriptions

> Retrieve details of all subscriptions.



## OpenAPI

````yaml openapi.json GET /subscriptions
openapi: 3.1.0
info:
  title: Spotflow
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - description: Production server
    url: https://api.spotflow.co/api/v1
security:
  - bearerAuth: []
paths:
  /subscriptions:
    get:
      description: >-
        Retrieve details of all subscriptions associated with a customer's plan
        ID or customer's email.
      operationId: listSubscriptions
      parameters:
        - name: customerId
          in: query
          required: false
          description: >-
            The unique identifier of the customer Id whose subscriptions are to
            be retrieved.
          schema:
            type: string
            format: uuid
        - name: email
          in: query
          required: false
          description: >-
            The unique identifier of the email whose subscriptions are to be
            retrieved.
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          required: false
          description: Page number for pagination (default is 0).
          schema:
            type: integer
            format: int32
            default: 0
        - name: size
          in: query
          required: false
          description: Number of items per page for pagination (default is 10).
          schema:
            type: integer
            format: int32
            default: 10
      responses:
        '200':
          description: A JSON array of subscription objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ListSubscriptionsResponse'
        '400':
          description: Not Found - No subscriptions found for the given plan ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized - Invalid or missing authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionError401'
components:
  schemas:
    ListSubscriptionsResponse:
      type: object
      properties:
        content:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: The unique identifier for the subscription.
              customerId:
                type: string
                format: uuid
                description: >-
                  The unique identifier for the customer associated with the
                  subscription.
              planId:
                type: string
                format: uuid
                description: >-
                  The unique identifier for the plan associated with the
                  subscription.
              status:
                type: string
                enum:
                  - active
                  - cancelled
                description: >-
                  The current status of the subscription (e.g., active,
                  canceled, past_due).
              startDate:
                type: string
                format: date-time
                description: The date and time when the subscription started.
              nextPaymentDate:
                type: string
                format: date-time
                description: The date and time when the subscription started.
              createdAt:
                type: string
                format: date-time
                description: The date and time when the subscription was created.
              customer:
                type: object
                description: Details of the customer associated with the subscription.
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The unique identifier for the customer.
                  email:
                    type: string
                    format: email
                    description: The email address of the customer.
                  name:
                    type: string
                    example: John Doe
                    description: The full name of the customer.
                required:
                  - id
                  - email
                  - name
              metadata:
                type: object
                description: >-
                  A set of key-value pairs that can be attached to the
                  subscription for storing additional information.
                properties:
                  additionalProp1:
                    type: string
                    example: string
                  additionalProp2:
                    type: string
                    example: string
                  additionalProp3:
                    type: string
                    example: string
              currency:
                type: string
                description: The currency in which the subscription is billed,
                example: NGN
              regionName:
                type: string
                description: The geographical region associated with the subscription.
                example: Nigeria
              amount:
                type: number
                format: float
                description: The amount to be charged for the subscription.
                example: 5000
        pageNumber:
          type: integer
        pageSize:
          type: integer
        totalElements:
          type: integer
        totalPages:
          type: integer
    Error400:
      type: object
      properties:
        error:
          type: string
          example: Missing Parameter
        message:
          type: string
          example: missing_parameter
        status:
          type: integer
          format: float
          example: 400
    SubscriptionError401:
      type: object
      properties:
        code:
          type: string
          example: AUTH_ERROR
        message:
          type: string
          example: Authorization token is required.
        statusCode:
          type: integer
          format: float
          example: 401
        requestMarker:
          type: string
          format: uuid
      required:
        - status
        - statusCode
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````