ZeroSettle Migration API

Switch & Save migration tracking

OpenAPI Specification

zerosettle-migration-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: ZeroSettle IAP Cancel Flow Migration API
  description: The ZeroSettle IAP API powers the iOS, Android, and Flutter SDKs. It enables product catalog fetching, web checkout, entitlement management, subscription lifecycle operations, and StoreKit transaction syncing. All endpoints are authenticated via the `X-ZeroSettle-Key` header.
  version: 1.0.0
  contact:
    name: ZeroSettle Support
    email: support@zerosettle.io
    url: https://zerosettle.io
servers:
- url: https://api.zerosettle.io/v1
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Migration
  description: Switch & Save migration tracking
paths:
  /iap/migration-converted:
    post:
      operationId: migrationConverted
      summary: Report Migration Conversion
      description: Reports that a Switch & Save migration was shown or converted. Used to track migration campaign analytics.
      tags:
      - Migration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                variant_id:
                  type: integer
                  description: The experiment variant ID, if the migration campaign is part of an A/B test.
      responses:
        '200':
          description: Conversion recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  conversions:
                    type: integer
                    description: Total number of conversions for this campaign.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      description: Error response.
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Machine-readable error code (not always present).
      required:
      - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-ZeroSettle-Key
      description: Your publishable API key. Use `zs_pk_test_*` for sandbox or `zs_pk_live_*` for production.