Implementation:Mage ai Mage ai Chargebee Common Customers Schema
| Knowledge Sources | |
|---|---|
| Domains | Data_Integration, Chargebee, Schema |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
JSON Schema definition for Chargebee customer records used by the Singer-based Chargebee source connector.
Description
This schema defines the structure and types for customer data extracted from the Chargebee API. It is loaded by the Chargebee source connector during stream discovery to validate and type-check extracted records. The schema follows the JSON Schema specification and includes properties such as id, first_name, last_name, email, phone, company, vat_number, auto_collection, offline_payment_method, net_term_days, created_at, updated_at, locale, consolidated_invoicing, and billing_date. The root type is a nullable object with additionalProperties set to false, ensuring strict validation against the defined property set.
Usage
This schema is automatically loaded by the Chargebee source connector during the discovery phase. It defines the available columns and their types for the customers stream.
Code Reference
Source Location
- Repository: mage-ai
- File: mage_integrations/mage_integrations/sources/chargebee/schemas/common/customers.json
- Lines: 1-428
Signature
{
"type": ["null", "object"],
"additionalProperties": false,
"properties": {
"id": { "type": ["null", "string"] },
"first_name": { "type": ["null", "string"] },
"last_name": { "type": ["null", "string"] },
"email": { "type": ["null", "string"] },
"phone": { "type": ["null", "string"] },
"company": { "type": ["null", "string"] },
"vat_number": { "type": ["null", "string"] },
"auto_collection": { "type": ["null", "string"] },
"offline_payment_method": { "type": ["null", "string"] },
"net_term_days": { "type": ["null", "integer"] },
"created_at": { "type": ["null", "string"], "format": "date-time" },
"updated_at": { "type": ["null", "string"], "format": "date-time" },
"locale": { "type": ["null", "string"] },
"consolidated_invoicing": { "type": ["null", "boolean"] },
"billing_date": { "type": ["null", "boolean"] }
// ... additional properties
}
}
Import
# Loaded automatically by Source.load_schemas_from_folder()
# Path: mage_integrations/mage_integrations/sources/chargebee/schemas/common/customers.json
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | JSON file | Yes | Loaded from disk by schema loader |
Outputs
| Name | Type | Description |
|---|---|---|
| schema | dict | JSON Schema object with properties, types, and format constraints |
Usage Examples
import json
import os
# Schema is auto-loaded by the Chargebee source connector
# Manual loading example:
schema_path = os.path.join(
"mage_integrations/mage_integrations/sources/chargebee/schemas/common",
"customers.json"
)
with open(schema_path) as f:
schema = json.load(f)
# schema["properties"] contains field definitions
print(list(schema["properties"].keys()))