{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gtm-api/json-schema/gtm-api-search-billing-subscriptions-response-schema.json",
  "title": "SearchBillingSubscriptionsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gtm-api-billing-subscriptions-api-openapi.yml#/components/schemas/SearchBillingSubscriptionsResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "operation": {
      "type": "string",
      "enum": [
        "search"
      ]
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "sid": {
                "type": "string"
              },
              "owner_user_sid": {
                "type": "string"
              },
              "team_sid": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "paddle_subscription_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "past_due",
                  "paused",
                  "canceled"
                ]
              },
              "collection_mode": {
                "type": "string",
                "enum": [
                  "automatic",
                  "manual"
                ]
              },
              "price_sid": {
                "type": "string"
              },
              "quantity": {
                "type": "number"
              },
              "addons": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "product_sid": {
                      "type": "string"
                    },
                    "price_sid": {
                      "type": "string"
                    },
                    "paddle_item_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "canceled"
                      ]
                    }
                  },
                  "required": [
                    "product_sid",
                    "price_sid",
                    "paddle_item_id",
                    "quantity",
                    "status"
                  ]
                }
              },
              "currency": {
                "type": "string"
              },
              "current_period_starts_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "current_period_ends_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_billed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "paused_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scheduled_resume_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scheduled_change": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "cancel",
                      "pause",
                      "resume"
                    ]
                  },
                  "effective_at": {
                    "type": "string"
                  },
                  "resume_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "action",
                  "effective_at",
                  "resume_at"
                ]
              },
              "canceled_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "canceled_by": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "actor_type": {
                    "type": "string",
                    "enum": [
                      "user",
                      "support",
                      "api_key",
                      "system",
                      "agent"
                    ]
                  },
                  "actor_sid": {
                    "type": "string"
                  },
                  "team_sid": {
                    "type": "string"
                  },
                  "permissions": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "request_sid": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "actor_type",
                  "actor_sid",
                  "team_sid",
                  "permissions",
                  "reason"
                ]
              },
              "created_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "sid",
              "owner_user_sid",
              "team_sid",
              "paddle_subscription_id",
              "status",
              "collection_mode",
              "price_sid",
              "quantity",
              "addons",
              "currency",
              "current_period_starts_at",
              "current_period_ends_at",
              "next_billed_at",
              "paused_at",
              "scheduled_resume_at",
              "scheduled_change",
              "canceled_at",
              "canceled_by",
              "created_at",
              "updated_at",
              "deleted_at"
            ]
          },
          "included": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "item",
          "included"
        ]
      }
    },
    "pagination": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "has_more": {
          "type": "boolean"
        },
        "total_count": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "next_cursor",
        "has_more",
        "total_count"
      ]
    },
    "applied_filters": {
      "type": "object",
      "additionalProperties": {}
    },
    "includes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "trace_id": {
          "type": "string",
          "description": "UUID v7; same 128-bit value as the X-Trace-Id header."
        },
        "span_id": {
          "type": "string",
          "pattern": "^[0-9a-f]{16}$",
          "description": "16 hex chars, root span of this request."
        },
        "timestamp": {
          "type": "string",
          "description": "ISO 8601 UTC (Y-m-dTH:i:sZ), response time."
        },
        "duration_ms": {
          "type": "integer",
          "minimum": 0,
          "description": "Server-side wall clock."
        },
        "team_sid": {
          "type": [
            "string",
            "null"
          ],
          "description": "The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends."
        },
        "actor_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends."
        }
      },
      "required": [
        "trace_id",
        "span_id",
        "timestamp",
        "duration_ms"
      ]
    },
    "counts": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "success",
    "operation",
    "items",
    "pagination",
    "applied_filters",
    "includes",
    "meta"
  ]
}